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. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Web and WebWorks Development

Reply
Contributor
chaivck
Posts: 24
Registered: ‎01-19-2011
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.

 

 

Please use plain text.
BlackBerry Development Advisor
oros
Posts: 839
Registered: ‎04-12-2010
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...

Please note that I will be unavailable between May 19th and June 4th. Sincere apologies for any delays during this time. I will do my best to follow-up as soon as I am able.

Erik Oros
BlackBerry Development Advisor
@WaterlooErik
Please use plain text.
BlackBerry Development Advisor
oros
Posts: 839
Registered: ‎04-12-2010
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".

Please note that I will be unavailable between May 19th and June 4th. Sincere apologies for any delays during this time. I will do my best to follow-up as soon as I am able.

Erik Oros
BlackBerry Development Advisor
@WaterlooErik
Please use plain text.
Contributor
chaivck
Posts: 24
Registered: ‎01-19-2011
My Carrier: AT &T

Re: Internationalization for WebWorks App

Hi Erik Oros,

 

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

 

 

Thanks,

Chaivck.

Please use plain text.