Pointui » Home 2 Scripting Support

[sticky]

Internationalize your Applet!

(19 posts)
  • Started 1 year ago by Montecristoff
  • Latest reply from gronostaj
  • This topic is sticky
  • This topic is not a support question
  1. 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!

    ;)

    Posted 1 year ago #
  2. babayshik
    Member

    Can i write in unicode? I now that unicode is not supported, but if i write in unicode, it will be good to other wersions with unicode support? I hope you anderstand me )))

    Posted 1 year ago #
  3. POST REMOVED

    Contents moved to the 1st post.

    Posted 1 year ago #
  4. As usual captain, great addition! ;)
    Added it in the first post.

    The only problem I see with this, it's when you use a ROM with a language which is different from your Home language...
    But hey, if you're able to flash your device with a foreign ROM (a WWE for instance), I think you're able to tweak Home in your own language :p

    Posted 1 year ago #
  5. SteX986
    Member

    Another possibility can be to select, in the release version of pointui, to select the main language to use (so you can resolve the foreign language rom problem)...

    If the selected language is not present in the applet, it can use an international language like english!

    Posted 1 year ago #
  6. The only problem I see with this, it's when you use a ROM with a language which is different from your Home language...
    But hey, if you're able to flash your device with a foreign ROM (a WWE for instance), I think you're able to tweak Home in your own language :p

    Oh well, in that case I kindly allow you to edit the "Terms.xml" file directly instead of adding a "Terms.WhyTheHeckShouldYouHaveaROMLanguageDifferent.xml" file. :PPPPP

    Posted 1 year ago #
  7. mnwildguy
    Member

    Great Program

    ive been using the home 1.5 on Tmobile dash HTC s620 (non touch) and i love it, but home 2 dont work on it right the screen is shrunk inside the task bar and the top desk bar is there anyway you could fix this for 320x240 similar smartphones Dash HTC s620

    Posted 1 year ago #
  8. We don't support smartphones yet, although next release should fix those problems.

    Posted 1 year ago #
  9. mnwildguy
    Member

    Thanks for the reply,

    Keep up the good work, this might make windows mobile based phones easier to use in the future.

    Posted 1 year ago #
  10. louistav
    Member

    im not good in programming.. i dont understand how i can read greeks in pointui.. change the xml yes, but....... how....???

    Posted 1 year ago #
  11. mnwildguy
    Member

    Well this isnt for smartphones Yet, Hopefully on the next release ,,,,,,,,,,

    Posted 1 year ago #
  12. mnwildguy
    Member

    Great program and spectacular features ,amazing.........

    Posted 1 year ago #
  13. pilatus
    Member

    Very good initiative, but sadly enough this does not apply to the standard Home2 applets like Today.......

    Posted 1 year ago #
  14. pilatus
    Member

    International version of Today here ;)

    Posted 1 year ago #
  15. ndam
    Member

    Hi guys,

    can't we just make a section on this website where we can place our translations. I'm not a codewiz myself, so maybe if you give me a list of words to be translated I can translate and post, so that somebody else can work the codes.

    (I can translate from English to German, French and Dutch)

    Posted 1 year ago #
  16. hi ndam,
    my applet lacks of Dutch, maybe you could help me:
    http://community.pointui.com/topic/applet-finally-infinitihome-v2-black-edition#post-9052

    Posted 1 year ago #
  17. Hi AKILalmaZZ,

    I think it would be interesting to share here your nice internationalization implementation (screen + code) in order to help old/new devs to manage translations.
    What do you think about that?

    @ndam: you will find this section in this dedicated forum

    Posted 1 year ago #
  18. @Monte,
    Pourquoi pas?
    Tout le monde est libre d'utiliser une partie de mon code et autres trucs en condition de mentionner mon nom :).

    Posted 1 year ago #
  19. Hey guys, you can use my TermEd tool to edit translations :) It's available in the Tools store.

    Posted 1 year ago #

RSS feed for this topic

Reply

You must log in to post.