default_locale_file_generation_script_notice
no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
Next revision | |||
— | default_locale_file_generation_script_notice [2015/04/23 12:15] – created mhatz | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== How to 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 translations: | ||
+ | |||
+ | //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 widget. So, when translating, | ||
+ | |||
+ | 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 = " | ||
+ | | ||
+ | ==== Vocal messages ==== | ||
+ | |||
+ | Vocal messages work differently. In your code, you must register vocal messages like this: | ||
+ | SpeechObject.Singleton.AddVoiceString(" | ||
+ | | ||
+ | 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/ | ||
+ | - 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