Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
Contributor
Posts: 24
Registered: ‎01-19-2011
My Device: Torch
My Carrier: AT &T

Re: Internationalization for WebWorks App

Hi Erik Oros,

 

Thank you very much for the links. The solution is working perfect.

 

But we have one problem.

 

If user changes the device locale from device options and if he/she didn't restart the phone, the application title is not changed.

 

Is there anyway we can overcome this problem?

 

Thanks,

Chaivck.

 

 

Retired
Posts: 1,561
Registered: ‎04-12-2010
My Device: BlackBerry Z10
My Carrier: Bell

Re: Internationalization for WebWorks App

That might be a little more difficult; I'm not aware of any such listener that could be implemented.

 

One step closer would be implementing the onForeground event to update the title when the application is activated:

https://developer.blackberry.com/html5/apis/blackberry.app.event.html#.onForeground

 

That still doesn't give you an immediate update, but it does prevent the need for a restart (i.e. it updates each time the app is launched.)

 

Unless you're setting some internal timer to check the locale every ~5s or so and never actually quitting your application, then I don't think you'll be able to get an immediate change. The timer could potentially run only when the app is in the background to minimize performance impact in your app. I'm not sure of the overall impact this would have on the OS performance though if the call is being made regularly.

 

Perhaps someone in the community has a better idea though...


Erik Oros | @WaterlooErik | eoros@blackberry.com | Developer Issue Tracker

If a reply has answered your question, please click Accept as Solution to help other visitors in the future.
Retired
Posts: 1,561
Registered: ‎04-12-2010
My Device: BlackBerry Z10
My Carrier: Bell

Re: Internationalization for WebWorks App

[ Edited ]

Actually, just found these:

 

http://supportforums.blackberry.com/t5/Java-Development/System-Global-Events/ta-p/444824

 

http://supportforums.blackberry.com/t5/Java-Development/Global-Events-and-Global-Event-Listeners/ta-...

 

On the Java side, there are some global events that would be triggered on a change. There is already a community extension for global events:

 

https://github.com/blackberry/WebWorks-Community-APIs/tree/master/Smartphone/GlobalEvent

 

So it seems the implementation should be fairly "simple".


Erik Oros | @WaterlooErik | eoros@blackberry.com | Developer Issue Tracker

If a reply has answered your question, please click Accept as Solution to help other visitors in the future.
Highlighted
Contributor
Posts: 24
Registered: ‎01-19-2011
My Device: Torch
My Carrier: AT &T

Re: Internationalization for WebWorks App

Hi Erik Oros,

 

Thank you for the help. The solution is working great.

 

 

Thanks,

Chaivck.