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

Java Development

Reply
Developer
neeraj_chauhan
Posts: 86
Registered: ‎10-28-2010
My Device: Blackberry Curve, Bold and Strom
Accepted Solution

How to make an application in french

Hi Everyone,

 

    How to change the application default language to french? 

 

 

Thanks & Regards
Neeraj Chauhan
Developer
peter_strange
Posts: 19,610
Registered: ‎07-14-2008
My Device: Not Specified

Re: How to make an application in french

Look at the Locale class. 

Developer
Aman_vivek
Posts: 216
Registered: ‎02-18-2010
My Device: 9350,8520

Re: How to make an application in french

Use this code

 

Locale.setDefault(Locale.get(Locale.LOCALE_fr));

Trusted Contributor
omar123456789
Posts: 103
Registered: ‎11-07-2010
My Device: Not Specified

Re: How to make an application in french

its very simple.

 

you can include french translations for your language file and providing a menu item which chane tha language then on selecting change you should reload your texts from the french file.

 

 

Developer
neeraj_chauhan
Posts: 86
Registered: ‎10-28-2010
My Device: Blackberry Curve, Bold and Strom

Re: How to make an application in french

Thanks all, 

 

              Can you also tell me how to use this Locale class to set the language?

 It would be greate if you can provide me some sample code.

 

Thanks again to all of you for your immidiate response.

 

 

 

Thanks & Regards
Neeraj Chauhan
Developer
peter_strange
Posts: 19,610
Registered: ‎07-14-2008
My Device: Not Specified

Re: How to make an application in french

Developer
neeraj_chauhan
Posts: 86
Registered: ‎10-28-2010
My Device: Blackberry Curve, Bold and Strom

Re: How to make an application in french

Thanks Peter,

 

           Now my application work fine and I am able to make an application in french.

 

But can you tell me if i want to add an editfield to that application and I selected English language keyboard should come in English Language and if I used French language, keyboard should come in french language. Same for another language. 

 I am using blackberry strorm,............

 

 

 

Thanks for your reply 

Thanks & Regards
Neeraj Chauhan
Developer
peter_strange
Posts: 19,610
Registered: ‎07-14-2008
My Device: Not Specified

Re: How to make an application in French

Actually I'm not sure. 

 

I do not believe that changing the locale changes the keyboard.  In other words, if you have a QWERTY keyboard and your change to the German locale, I think pressing the Y will still give you a Y and not a Z.  If you had a German QWERTZ device, then the Z is next to the Y and I think you will get a Z.  In short, I think the hardware layer that converts from keycode to char is not dependent on the locale that an application is using, it is dependent on the device.

 

But I could be wrong, this would be a good thing to test. 

Developer
pankajace12
Posts: 206
Registered: ‎04-30-2011
My Device: BlackBerry Z10

Regarding support Icon in French & English

Hi Peter,

 

Can u please let me know. How to update the icon of Application with launching the app.

 

i have two icon: 

 

1) Engl.png  2) french.png

 

I want that, If you do change language from English to French, then application icon should change automatically, VS FR to EN.

 

I m using this code.

 

This code works fine, i have to launch the app.  that i don't want. i want automatically changing.

 

if(Locale.getDefaultForSystem().getLanguage().toString().equals("fr"))
{
HomeScreen.updateIcon(Bitmap.getBitmapResource("fren.png"));
}
else
{
HomeScreen.updateIcon(Bitmap.getBitmapResource("engl.png"));
}

 

 

Thanks in Advance

Pawan Jha