Curtis L. Olson wrote:
> Having given a very tiny bit of thought to 'internationalizing'
> flightgear I thought perhaps a first start would be to provide
> translated versions of menu.xml and options.xml
> 
> It would be nice to do this in a sensible organzied way so that when
> we add a menu option to the default menu, we don't have a logistical
> nightmare with maintaining the translated versions.
> 
> Maybe something like:
> 
> <language include=text.default.xml>
> <language include=text.<translation>.xml>
> 
>  <menu>
>   <submenu>
>    <name>/langauge/menu/file-text</name>
>    <option>
>     <name>/langauge/menu/save-file-text</name>
>     <call>saveFlight</call>
>    </option>
>    .
>    .
>    .
> 
> Then text.usa.xml (or whatever naming scheme we use) could look
> something like
> 
> <language>
>   <menu>
>     <file-text>File</file-text>
>     <save-file-text>Save File</save-file-text>
>   </menu>
> </language>
> 
> We could do something similar for the options.xml file.

If I understand the properties load code well enough, it would be 
enought to have a <country-code>.xml file which gets loaded after the 
default file, overriding everything defined in the language specific file.

For example:

menu.xml :

  <menu>
   <submenu>
    <name>File</name>
    <option>
     <name>Save flight</name>
     <call>saveFlight</call>
    </option>

    ...

menu.nl.xml would become:

  <menu>
   <submenu>
    <name>Bestand</name>
    <option>
     <name>Vlucht opslaan</name>
    </option>

    ...

Now we just need a loader which determines the default language and 
loads two files into one single root node.

> 
> The idea would then be that we first load in the 'default'
> translation, and then overwrite it with the local user specified
> translation.
> 
> This way, if a new option is added to FlightGear, the system will have
> a default translation there and you don't see garbage or wierdness.
> We only have to maintain one menu.xml/options.xml file and one
> translations file per language.
> 
> If an item is added to FlightGear and not translated, it will stick
> out like a sore thumb and the individual translaters can add that to
> their <language>.xml file.

This would countr for the above solution as well.
We must keep in minf that there will be extensions to the 
menu.xml/options.xml files which don't affect the translation (scripting 
for example), so it would be nice if translations only require small 
language speciffic changes.

> 
> Does this sound reasonable?  Can we pull this off (or something
> similar) with the property system?

As far as I know, we could.

Erik






_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel

Reply via email to