How to set locale on the BlackBerry PlayBook?

edited April 2012 in Enyo 1.0
Hi all,

my app, MeOrg!, supports multiple languages (english, german and french) and that works perfectly on webOS. On the BlackBerry PlayBook it's always the english locale active. I've already tried to set the locale manually with enyo.g11n.setLocale({ uiLocale: 'de' }); but that did not change anything (I've tried to set it before I create my app via the index.html and I tried it in the create-function of my main class as well).

Any help would be really much appreciated!

Cheers,
Sven

Comments

  • Is my question that dumb that nobody answers, or does really nobody else had this problem before?

    Cheers,
    Sven
  • edited May 2012
    Is it only on the Playbook that this fails? Are there any errors?
    enyo.g11n.setLocale is done with a synchronous XHR in 1.0, and I wonder if the Playbook OS doesn't support that.
  • It also fails on my chrome browser and I can not see any errors at all.

    Can the language be changed during runtime, maybe for example by a button click? Or must that be done before the main object is created?

    Cheers,
    Sven
  • I'm pretty sure you can change the language at any time, but I believe you have to rerender the component that you want to see the change in.
  • I'm not getting this stupid thing done.

    It even did not work on the chrome browser... Can someone please provide me a working code-snipplet? Than I could check what I'm actually missing...

    Thanks,
    Sven
  • Does anyone had already ported a multi-language app to the BlackBerry PlayBook or the Chrome Browser?

    Thanks,
    Sven
  • Check out this post I made a few months back. Made it work perfectly in Chrome and on the PlayBook (just tested it with German on my PlayBook and it worked)
  • Hi Arthur,

    thanks for your feedback, but I don't know which post you mean?

    Cheers,
    Sven
  • edited May 2012
    Sorry, could've sworn I'd included the link..

    http://forums.enyojs.com/discussion/comment/580/#Comment_580
  • Thanks for the link, but I'm not sure that will help?! I tried it without luck. What else did you do?

    I want to mention that my issue is that the app itself is not getting translated. $L did not work on Chrome or on the PlayBook for me. I have no troubles with number- or date-formatting.

    Did you test strings in another language with your app?

    Cheers,
    Sven
  • Okay, for future reference for anyone who may read this thread later on - we've solved the problem Sven was having.

    Apparently the JSON interpreter for WebWorks apps (or perhaps just all BB apps) is super strict so you have to make sure your JSON in your strings files are completely compliant.

    You can check by putting your JSON into http://www.jsonlint.com and having it validate it.
  • To be even more precise: I had a trailing comma after my last entry in my language files... No problem with any webOS device, but won't work on the PlayBook. Thanks again Arthur, for your great help!

    Cheers,
    Sven
Sign In or Register to comment.