Skip to content

Translating ElevenClock

Martí Climent edited this page Jan 25, 2022 · 18 revisions

Table of contents

Translating ElevenClock

Since ElevenClock is an app that wants to reach every single person in the world running Windows 11, on issue #111 it was requested to add this feature. And here we are. On this page you will find useful information about how does the ElevenClock translation program works and how to participate on it, because anyone can contribute here!

You can check the supported languages here

How does it work (Nerd section)

The method ElevenClock uses to translate the UI is based on dictionaries, containing a reference sentence and a translated sentence. Those dictionaries are stored in python files and divided into sections, to make them easier to read and to maintain. Every languagge file codes for a different language, and every language is stored on one signle file. If a translation is missing, the program will fallback to english, providing always a readable UI for everyone. Those language files need to be registered to be used, and this is done in languages.py. The addition of language files is not dynamic in order to prevent hackers from inserting malicious .py files into the code.

Adding a new language

To translate ElevenClock to a new language:

  1. Download this file. This file has all the language definitions.
  2. Rename so it matches the following pattern: lang_[LANG_CODE].py. For example, lang_en.py for english or lang_ca.py for catalan. More information about language codes can be found Here
  3. Translate the sentences that you will find on each line. DO NOT replace the english reference strings, but rather write the translation between the quotation marks present at th end of the line. Please follow the rules established in the Rules section in order to provide a functional translation.
  4. When the translation job is done, you can either submit a pull request (If you know how to) or, if you don't know how to, just send me the translated file at [email protected]. I'll review it and publish it with the new version.

Example translation: (On the left the english references which SHOULD NOT be modified. On the right the catalan translations)

image

Updating or improving an existing translation

  1. Go to this folder and download language file which corresponds to the languge you want to update.
  2. Translate every non-translated sentence in between the quotation marks that you will find at the very end of every line. The non-translated sentences will be at the top of the document. Please follow the rules established in the Rules section in order to provide a functional translation.
  3. In order to publish changes, you can either submit a pull request (If you know how to) or, if you don't know how to, just send me the updated file at [email protected]. I'll review it and publish it with the new version.

Rules:

  • Make sure not to modify the original strings. If this happened the translation wouldn't work at all.
  • Make sure to add any final stop/colon/semicolon/hyphen/etc.
  • Make sure to add the {0} symbols, since they code for variable values
  • If you are creating a new translation, you can give you credits in a specific place (marked in the file). If you update a language file, you can also add your credits but without removing the previous one. Thi could be achieved by writing something like "Translated to Catalan by @user1 and @user2"!
    image

Supported languages

  • Catalan
  • Czech (Čeština)
  • Danish
  • Dutch
  • English
  • Finnish
  • French
  • German
  • Greek
  • Hebrew
  • Hungarian
  • Indonesian
  • Italian
  • Japanese
  • Korean
  • Latvian
  • Lithuanian
  • Norwegian
  • Polish
  • Portuguese (Brazil)
  • Portuguese (Portugal)
  • Russian
  • Simplified Chinese (China)
  • Serbian
  • Slovak
  • Spanish
  • Swedish
  • Traditional Chinese (Taiwan)
  • Turkish
  • Ukranian
  • Vietnamese
  • Arabic

ElevenClock

Eleven Clock demo

Customize your Windows 11 taskbar clocks, including those on secondary monitors
Downloads@latest
Release Version Badge
Issues Badge
Closed Issues Badge
Clone this wiki locally