localization, jungle files, screen size/devices

So i am looking at adding language localization to an app.
Currently i am using monkey.jungle to handle various device models and screen sizes so there are many lines in there related to this.
In the documentation i can see examples of using the jungle files to handle either localization OR screen/device types.
I have not found a good example of how to handle BOTH in the same file. The documentation is pretty sparse.
I hope that i do not need to handle all the permutations of both language and devices making for a very long file.
Can anyone point to a good example of a jungle file that shows how to do this?

  • There is also reference to a 'default jungle file' in the SDK. I am having trouble finding this. Docs dont seem to say where it is.

  • It's in the SDK's bin directory and called default.jungle

  • Thanks i can now see it in SDK 3.2.5 as you said. Issue is i was looking in the 4.0.1 sdk and it is not there.

  • I see it in the 4.0.1 SDK - same place and name

  • Hmm, well i guess you are lucky. I am removing and installing 4.0.1 and it is never there. Will go bang my head against the wall a bit and see if that helps.

  • So i remain stumped by the missing file in 4.0.1 but can look at older SDK. Will park that for now.

    I have not been able to figure out how to support added languages without tons of duplcation.
    I have a lot of folders and jungle code which relates only to graphics and not to text language.
    My current monkey.jungle file has a pile of lines like this to adjust icons/fonts but they do not contain language text.
    edge_1000.resourcePath = $(edge_1000.resourcePath);resources-icon36x36;resources-largerFont

    I suspect i am not really understanding these jungle files very well.

    I have added a folder resourses-fre to contain the text resources. It has very little in it, ideally just the replacement text.
    \resources-fre\strings\strings.xml

    When i run the simulator for french it does use the french text. However the font settings applicable for the device are gone.
    Returning to english the font settings are correct again.

    So is there a way to do this with duplicating all the folders and jungle lines that relate to graphics and have nothing to do with language?
    My hope is to add several languages so tons of duplication would not be good.

  • When i run the simulator for french it does use the french text. However the font settings applicable for the device are gone.
    Returning to english the font settings are correct again.

    If I understand correctly, you are doing localization (via the resources-fre folder) and you are doing custom fonts for different devices (presumably via something like resources-largerFont you mention above) and the localized strings are working properly but the device-specific fonts are not?

  • Well actually a bit the opposite. All was working fine with fonts in english only.
    I was using 'strings' in folders like resources-largerFont to make flags the application could read and then adjust fonts.

    Then i added the fre folder and it would handle the text translation, however the fonts got messed up for french and my flags.

    But i guess the new strings for french conflicted somehow.
    I had hoped that strings would just merge and all be available, language strings and also my settings strings.
    But it seems maybe that two sets 'strings' somehow colided?


    So i just re-did it all using properties rather than strings for these flags.
    That sort of worked, but in the simulator is records the 'properties' for the first device i run, and then they persist, so if i use another device, it uses the old properties rather than the ones in the appropriate folders.
    If i use the simulator file/reset all app data the app works. but i have to do that every time i test a different device.


    So banging ahead my theory is that this is all wrong and i need to use 'excludeannotation' etc so i can hard code the different flags for different devices.


    Really not sure what the best approach is. And not fully understanding the jungle files.

    PS: puzzled about the missing file in the 4.0.1 sdk as mentioned above, but can work around that.

  • ok re-wrote it again using excludeAnnotation and all seems to work now in both languages. deleted the settings in the resources files now. Works in the end, just took a while to get there. Sometime it would be good to see more examples perhaps in the samples folder showing more than just a trivial case.

  • Have you looked at the Strings sample in the SDK?