Plugin localization (1 Viewer)

Jupek

Portal Member
March 6, 2006
24
5
Home Country
Finland Finland
Hi!

Would like to ask what is strategy to localize plugin? I know there is language XML files on language/country folders and you can use GUILocalizeStrings class to get items from there. My question is though that should I put my plugins strings to that common file or is there way (=supported way) to make own XML file for each plugin? Of course I can make my own XML file and make code to retrieve data there or use satelite resource files for each language but want to know if I'm missing some info before doing that. :)
 

samuel337

Portal Pro
August 25, 2004
772
0
Melbourne, Australia
There are common language files in the Mediaportal\language folder. By using these files (i.e. MediaPortal\language\<language name>\strings.xml) and the GUILocalizeStrings class, MP will automatically select the configured language file.

There isn't much of a numbering scheme going on there, so feel free to start somewhere that hasn't been used. Just don't go above 99999 as above that they are the names for the windows in MP (once you've defined your windowIDs for your plugin, you may want to add in window names in that section - the naming scheme is basically 100000 + windowID, that is, with windowID=150, the window name string is at ID 100150).

Sam
 

Jupek

Portal Member
March 6, 2006
24
5
Home Country
Finland Finland
samuel337 said:
the naming scheme is basically 100000 + windowID, that is, with windowID=150, the window name string is at ID 100150).

Okay. That was the good info because I was wondered how you manage these if those all are in same file. Going to add my strings to there then.

Thank you!
 

mzemina

Retired Team Member
  • Premium Supporter
  • February 23, 2005
    2,065
    14
    Tulsa, OK
    Home Country
    United States of America United States of America
    Shouldn't authors (or others) be using the MPLE (MediaPortal Language Editor) for this?

    Or am I missing something?

    Mike
     

    Jupek

    Portal Member
    March 6, 2006
    24
    5
    Home Country
    Finland Finland
    I'm noob with MP, but I understood that MPLE tool is for translation for the core project. You can't add new entries with that and if you make a plugin I understood you are pretty much with your own. Just tried to ask what is standard way to make localization for the plugin...non core plugin.
     

    Users who are viewing this thread

    Top Bottom