User Tools

Site Tools


default_locale_file_generation_script_notice

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
default_locale_file_generation_script_notice [2015/04/23 12:15] – created mhatzdefault_locale_file_generation_script_notice [2023/04/25 16:52] (current) – external edit 127.0.0.1
Line 1: Line 1:
-====== How to translate Mail2Voice? ====== +See http://dev.mail2voice.org/wiki/doku.php/translate_mail2voice
- +
-===== Generalities ===== +
- +
-In Mail2Voice, the translation is made with XML files (named with the .lng extension). All locales files are in the locales folder. +
- +
-In a .lng file, there are two types of translationsthe widgets labels and the vocal messages. The widgets labels are grouped by panel whereas all vocal messages are grouped in the "voiceSentences" section. +
- +
-//Note: the translations are sorted alphabetically in each section.// +
- +
-===== Link the code to the translation ===== +
- +
-==== Widgets ==== +
- +
-For Widgets, Mail2Voice is capable of translating the Text and TextHeader properties of any widgetSo, when translating, it looks in the .lng file and translate these properties for each "setting" entry (except for the "vocalSentences" section of course). +
- +
-There are two rules:  +
-- Every translatable widget must be created in *.Designer.cs files. +
-- in your code, you must use the widget name as the widget variable identifier, like this: +
-    this.mailtoContactButton.Name = "mailtoContactButton"; +
-     +
-==== Vocal messages ==== +
- +
-Vocal messages work differently. In your code, you must register vocal messages like this:  +
-    SpeechObject.Singleton.AddVoiceString("emailAddError", "You must specify an email to add this contact."); +
-     +
-The first parameter is the identifier of the string which will be used in the .lng file. +
- +
-Unlike widgets, these messages must be created in *.cs files. +
- +
-===== Update translations ===== +
- +
-To update locales files, you must : +
-  - generate the default file (default.lng), +
-    - in Mail2Voice root folder, open Git Bash : right click > Git Bash, +
-    - type: utils/generate_locale_file.sh +
-    - check for the default.lng file in the locales folder. +
-  - replace the english.lng file with the default.lng file, +
-  - merge changes between the new english.lng and the other locales files and translate the new strings. +
- +
- +
- +
default_locale_file_generation_script_notice.txt · Last modified: 2023/04/25 16:52 by 127.0.0.1