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

Reply
Contributor
chaivck
Posts: 24
Registered: ‎01-19-2011
My Device: Torch
Accepted Solution

Internationalization for WebWorks App

Hi,

 

How to change the app title depending on the device locale (language)? Can we set it using config.xml file?

 

Thanks,

Chaivck.

Developer
Developer
LBP
Posts: 607
Registered: ‎04-29-2011
My Device: PlayBook 16GB, BB10 LE Z10 (red)
My Carrier: none

Re: Internationalization for WebWorks App

As far as I know you can add set up app icons for different languages (WebWorks Webcast Slides page 12). For localization of the app name, perhaps it is working using the config.xml's <name> element together with its xml:lang attribute to use it in that way for example:

 

<name xml:lang="en">Hello World! application</name>
<name xml:lang="de">Hallo Welt! Anwendung</name>
...

 I don't know if this is working, if not it would be a good point for some more declarations in the documentation if this element could be used in such an use case or, if not, to add a feature request to the github repos, isn't it?

 


"Like" if you liked the post.
"Accept as Solution" if the post solves your question.
Contributor
chaivck
Posts: 24
Registered: ‎01-19-2011
My Device: Torch

Re: Internationalization for WebWorks App

Thanks for the quick reply. I tried that approach. But, it didn't work on the device.I am testing it on Blackberry Smartphone. Please let me know if you have any other solution.

 

Thanks,

Chaivck.

Developer
Developer
LBP
Posts: 607
Registered: ‎04-29-2011
My Device: PlayBook 16GB, BB10 LE Z10 (red)
My Carrier: none

Re: Internationalization for WebWorks App

I filed a feature request to the Github repo for BB10 and immediately got a response to it and it seems they are already working on it for the WebWorks packager.


"Like" if you liked the post.
"Accept as Solution" if the post solves your question.
Contributor
chaivck
Posts: 24
Registered: ‎01-19-2011
My Device: Torch

Re: Internationalization for WebWorks App

That's great.  I am working for Blackberry 7.0 devices.. Does this fix apply for smartphones with 7.0 OS?

 

Thanks,

Chaivck

Developer
Developer
LBP
Posts: 607
Registered: ‎04-29-2011
My Device: PlayBook 16GB, BB10 LE Z10 (red)
My Carrier: none

Re: Internationalization for WebWorks App

Good question, but I don't know if this will be possible for BB OS for SmartPhones, PlayBook and BB10 in the future since the request is "only" in the BB10 packager repo at this time. Give it a try and ask the guys if it will be possible. I couldn't find the github for BB OS, only PlayBook and BB10 I can find.


"Like" if you liked the post.
"Accept as Solution" if the post solves your question.
BlackBerry Development Advisor
oros
Posts: 1,557
Registered: ‎04-12-2010
My Device: BlackBerry Z10

Re: Internationalization for WebWorks App

Hi there,

 

There is a similar topic here with an approach:

http://supportforums.blackberry.com/t5/Web-and-WebWorks-Development/Is-it-possible-to-localize-a-wid...

 

Basically, this involved having an auto-start entry point that runs, checks the locale, and updates the application name on the home screen then shuts itself down. It's not pretty, but the BBOS unfortunately doesn't have a full-fledged solution at this time.


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.
Developer
Developer
LBP
Posts: 607
Registered: ‎04-29-2011
My Device: PlayBook 16GB, BB10 LE Z10 (red)
My Carrier: none

Re: Internationalization for WebWorks App

That might be really an approach for BB OS for Smartphones at this time, but since the <name> element with an xml:lang attribute is documented I couldn't find an use case other than to change the app name "automatically" to OS language specific, isn't it? Is it documented and not implemented yet?


"Like" if you liked the post.
"Accept as Solution" if the post solves your question.
Contributor
chaivck
Posts: 24
Registered: ‎01-19-2011
My Device: Torch

Re: Internationalization for WebWorks App

Hi Erik Oros,

 

Thank you very much for the reply.

 

I read the thread you are referenced to. I understand that there is an JavaSctipt API to change the application name.

 

But i really don't know how to create an auto-start entry point application.

Can you please refer us to a place where we can find documentation or an example code to create an auto-start application?

 

 

Thanks,

Chaitanya.

BlackBerry Development Advisor
oros
Posts: 1,557
Registered: ‎04-12-2010
My Device: BlackBerry Z10

Re: Internationalization for WebWorks App

Sure thing.

 

For a run-at-start entry point, check out this config.xml tag:

https://developer.blackberry.com/html5/documentation/rim_background_element_1265316_11.html

 

Then, in the auto-start HTML file, you can imlpement some JavaScript that leverages this community extension to get the locale:

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

 

With that locale, you can then leverage the setHomeScreenName method to do your update.

 

It's a few steps, but should be able to achieve what you're after. If you get stuck at any step, just let us know.


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.