Hi,
To all devs & translators, here is a reminder about the way to manage your applet internationalization.
1. Read this documentation about Terms substitution.
2. For each text, label, ... which needs to be translate, you must write your code like that:
...
lblAppletTitle.SetText(Terms.Get("This is my applet title"));
...
btnCancel.SetText(Terms.Get("Cancel"));
...
3. You can also add an "autoselect language" feature to your applets, using the control "GetPrimaryLanguage". Here an example:
String strLanguage, strTerms;
void Load()
{
// Get device language
strLanguage = Device.GetPrimaryLanguage();
// Set localized terms file name
strTerms = "Terms.";
strTerms += strLanguage;
strTerms += ".xml";
// Load "default" terms file (in case localized version is not found)
Terms.LoadFromFile("Terms.xml");
// Load localized terms file
Terms.LoadFromFile(strTerms);
}
So, for example, if Iyou have an italian ROM, you just have to put the file "Terms.italian.xml" in the applet folder and the italian localization will be loaded. If the "italian" file is not found, the file "Terms.xml" will be loaded.
The output string of control "GetPrimaryLanguage" can be found here.
4. Create a new file Terms.xml:
<terms>
<term name="This is my applet title"></term>
<term name="Cancel"></term>
</terms>
5. This Terms.xml will be your reference and must be added in your Applet folder.
6. Each translator will provide his own Terms.Language.xml file.
For instance, here is the french Terms.French.xml for the previous sample:
<terms>
<term name="This is my applet title">Ceci est le titre de mon applet</term>
<term name="Cancel">Annuler</term>
</terms>
It's easier to manage translations that way because nobody has to edit/modify your script (i.e. your .cs file) to translate it (with all risks it incurs).
Thanks to implement it consistently!
;)

sticky
not a support question