Re: [android-developers] Re: Dynamically changing the language at runtime

2012-08-22 Thread authorwjf
Related to this same question, if it is not supported to change the locale outside of the built-in OS configurations, how can I request a language specific soft keyboard on-the-fly? I don't necessarily need code, just a push in the right direction. -- You received this message because you are

Re: [android-developers] Re: Dynamically changing the language at runtime

2012-08-21 Thread authorwjf
> > I know this is a pretty old thread, but I'm curious if it is still the > contention of the team at Google that changing the language at runtime is a > bad idea? If so, what are my alternatives? I am doing a kisosk > application for a corporate customer so I can't fire the intent to bring

[android-developers] Re: Dynamically changing the language at runtime

2009-02-09 Thread Dianne Hackborn
Like I said, there isn't really a way. You are doing stuff that isn't really supported, so you're going to be hacking around. Forcibly changing the configuration of resources is already a hack -- for example if the user flips the lid the configuration will change, blowing away what you set. I pr

[android-developers] Re: Dynamically changing the language at runtime

2009-02-09 Thread Evgeny V
So, what can be a best way to restart the app except to ask user restart manually? Thanks, Evgeny On Mon, Feb 9, 2009 at 9:49 PM, Dianne Hackborn wrote: > You will need to do all of the UI recreation in your activity. We don't > currently have a way for an activity to ask that it be restarted,

[android-developers] Re: Dynamically changing the language at runtime

2009-02-09 Thread Dianne Hackborn
You will need to do all of the UI recreation in your activity. We don't currently have a way for an activity to ask that it be restarted, sorry. Like I said, this isn't really supported. On Mon, Feb 9, 2009 at 11:29 AM, Mark Nuetzmann wrote: > > I have a settings dialog/activity where I allow th

[android-developers] Re: Dynamically changing the language at runtime

2009-02-09 Thread Mark Nuetzmann
I have a settings dialog/activity where I allow the user to change the locale. Within that activity i call Resources res = ctx.getResources(); // Change locale settings on the device DisplayMetrics dm = res.getDisplayMetrics(); andr

[android-developers] Re: Dynamically changing the language at runtime

2009-01-26 Thread Raja Nagendra Kumar
Diannel thank you, Deep thank you for the complete source spippet.. On Jan 27, 1:23 am, "deepdr...@googlemail.com" wrote: > ya, great, thanks, this works for me ! : > >                 Resources res = getResources(); >                 DisplayMetrics dm = res.getDisplayMetrics(); >              

[android-developers] Re: Dynamically changing the language at runtime

2009-01-26 Thread deepdr...@googlemail.com
ya, great, thanks, this works for me ! : Resources res = getResources(); DisplayMetrics dm = res.getDisplayMetrics(); Configuration conf = res.getConfiguration(); conf.locale = Locale.GERMANY; res.updateConfiguration(

[android-developers] Re: Dynamically changing the language at runtime

2009-01-26 Thread Dianne Hackborn
You can't just modify the structure, you need to give a new Configuration of new values to Resources.updateConfiguration(). On Mon, Jan 26, 2009 at 11:21 AM, deepdr...@googlemail.com < deepdr...@googlemail.com> wrote: > > I tried : > >Resources res = getResources(); >

[android-developers] Re: Dynamically changing the language at runtime

2009-01-26 Thread deepdr...@googlemail.com
I tried : Resources res = getResources(); res.getConfiguration().locale = Locale.GERMANY; firstline= res.getString(R.string.firstline); in my onCreate() . But, although I do have res/values-de/strings.xml this still gives me the english string for

[android-developers] Re: Dynamically changing the language at runtime

2009-01-25 Thread Raja Nagendra Kumar
On Jan 25, 2:28 am, Dianne Hackborn wrote: > This isn't really supported, though you can change the language of the > Configuration used by your Resources object. Could you pl. let me know the API to make this change.. Regards, Nagendra --~--~-~--~~~---~--~~ You

[android-developers] Re: Dynamically changing the language at runtime

2009-01-24 Thread Dianne Hackborn
This isn't really supported, though you can change the language of the Configuration used by your Resources object. This will only impact your own app, though, not things displayed by others like your notifications (those will still use the system's locale). On Fri, Jan 23, 2009 at 10:39 PM, Raja

[android-developers] Re: Dynamically changing the language at runtime

2009-01-23 Thread Raja Nagendra Kumar
Hi Romain, Thank You Romain, a follow up to this how do I change the default languge to choose in my application based on the menu we provide with in the andorid application.. I may still want to keep my phone locale some thing deferent than the application locale. Regards, Nagendra On Jan 24,

[android-developers] Re: Dynamically changing the language at runtime

2009-01-23 Thread Romain Guy
Hi, All you need to do is place your resources in locale specific directories. For instance: res\ drawable-en\ values-fr\ layout-jp\ In your example to localize the app in English and German, you would have: res\ values\ strings.xml values-de\ strings.xml And Android will au