next time, I'll try to read comments also :). Thank you very much, you
point me to finally working solution.

On Mar 4, 11:41 am, Adrian Vintu <[email protected]> wrote:
> Hi Menion,
>
> Yes, you have to set the locale in onCreate. It was written in the comments
> of the article.
>
> BR,
> Adrian Vintu
>
> http://adrianvintu.com
>
> On Thu, Mar 4, 2010 at 6:33 AM, Menion <[email protected]> wrote:
> > Hi Adrian,
> >  thanks for you response. Your code is very similar to mine. Only
> > base diference is that you use
> > Activity.getBaseContext().getResources() instead of mine used
> > Activity.getResources(). But this not help with my main problem.
> > Probably in your code, every display rotate call same
>
> > INFO/ActivityManager(1160): Config changed: { scale=1.0 imsi=230/3
> > loc=en_GB touch=3 keys=2/1/1 nav=2/1 orien=2 layout=34}
>
> > and after that, locale change to default.
>
> > but is seems that only solution is to call language change code in
> > every onCreate() in every activity. Little bit weird but cannot find
> > any other "permanent" solution.
>
> > On Mar 3, 10:38 pm, Adrian Vintu <[email protected]> wrote:
> > > Hope this will helphttp://
> > adrianvintu.com/blogengine/post/Force-Locale-on-Android.aspx
>
> > > BR,
> > > Adrian Vintu
>
> > >http://adrianvintu.com
>
> > > On Sat, Feb 27, 2010 at 3:09 PM, Menion <[email protected]> wrote:
> > > > Hi mot12,
> > > >  sorry not post earlier. I don't know, if you find my info still
> > > > useful ..., but
>
> > > > ad 1) Yes, it's my own function that check if user selected Czech or
> > > > English, so this return "cz" or "en" String.
>
> > > > ad 2) I didn't tried this. When user change locale in
> > > > PreferenceScreen, I force him to restart application. Changing of
> > > > application language is not a common activity, so restart is not a bad
> > > > solution I think :). But with your problem, it's relevant to my
> > > > another problem. Did you try set another locale (language) and then
> > > > rotate display? With my current solution, ActivityManager send this
> > > > event
>
> > > > INFO/ActivityManager(1160): Config changed: { scale=1.0 imsi=230/3
> > > > loc=en_GB touch=3 keys=2/1/1 nav=2/1 orien=2 layout=34}
>
> > > > and language of whole application set from my (e.g. "cz", to default
> > > > (in this case to "loc=en_GB"). I think that this is similar to your
> > > > problem. Grr ...
>
> > > > Hope we find any solution ...
>
> > > > On Feb 14, 11:45 am, mot12 <[email protected]> wrote:
> > > > > Menion,
> > > > > Ok, now I feel silly because I thought I could figure it out from
> > your
> > > > > post.
>
> > > > > 1) Settings.getLanguage() is from your own preference settings?
> > > > > It is no android.provider.Settings, right?
>
> > > > > 2) When my app loads, I read the language preference from my own app
> > > > > preference settings and set the locale using the code you gave. Works
> > > > > great. But if I change the language preference in my settings using
> > > > > updateConfiguration, I hoped I would trigger the
> > > > > onConfigurationChanged of my main Activity. But that doesn't happen
> > > > > despite my entries "android:configChanges="locale" for the main
> > > > > activity and <uses-permission
> > > > > android:name="android.permission.CHANGE_CONFIGURATION"/> in the
> > > > > manifest.
>
> > > > > Let's say I am in the main activity. I load the locale specified in
> > > > > the settings in OnCreate. Everything is great. Now I go from there to
> > > > > a preference activity, change the desired locale, update the
> > > > > configuration via updateConfiguration and using the 'back' key I go
> > > > > back to my main activity. Instead of "onConfigurationChanged" I get
> > > > > "onResume", giving me no possibility to reload my resources.
>
> > > > > Any idea?
>
> > > > --
> > > > You received this message because you are subscribed to the Google
> > > > Groups "Android Developers" group.
> > > > To post to this group, send email to
> > [email protected]
> > > > To unsubscribe from this group, send email to
> > > > [email protected]<android-developers%[email protected]>
> > <android-developers%[email protected]<android-developers%[email protected]>
>
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/android-developers?hl=en
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to [email protected]
> > To unsubscribe from this group, send email to
> > [email protected]<android-developers%[email protected]>
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to