Android :: Changing Locale Within The App Itself
Feb 15, 2010
My users can change the Locale within the app (they may want to keep their phone settings in English but read the content of my app in French, Dutch or any other language ...)
Why is this working perfectly fine in 1.5/1.6 but NOT in 2.0 anymore?
CODE:..........
The problem is that the MENU "shrinks" more and more everytime the user is going through the lines of code above ...
This is the Menu that gets shrunk:
CODE:.........
What should I do in API Level 5 to make this work again ?
HERE IS THE FULL CODE IF YOU WANT TO TEST THIS :
CODE:..............
AND HERE IS THE MANIFEST :
CODE:..........
THIS IS WHAT I FOUND :
<uses-sdk android:minSdkVersion="5" />
=> IT WORKS JUST FINE ...
<uses-sdk android:minSdkVersion="3" />
=> Menu shrinks every time you change the locale!
As I want to keep my application accessible for users on 1.5.
View 3 Replies
Sep 10, 2010
I am trying to change the locale programmatically on Android. The code I have below works fine on the Incredible(2.2) and Droid(2.2). However, it doesn't on the DroidX(2.1 Update 1) Anyone here have encountered similar problem ?? Any insight would be helpful.
public void overrideLocale(String languageToLoad) {
Locale locale = new Locale(languageToLoad);
Locale.setDefault(locale);
Configuration config = new Configuration();
config.locale = locale;
getBaseContext().getResources().updateConfiguration(config, null);
Intent intent = new Intent(this, ActivityB.class);
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(intent); }
View 1 Replies
View Related
Apr 15, 2010
I have a language setting in my application. When the language is switched, I would like all the textviews etc to change language immediately. Currently I just change the locale in the configuration, so the language has changed when the user restarts the activity.
Solution to my problem would be to make each textview load the new resources each time the language is changed. Is there a better solution? Perhaps a neat way to discretely restart the activity? Or maybe just force reload of the resources?
View 2 Replies
View Related
Jul 28, 2010
I created a set of text resources in different languages:
res/values-de/strings.xml
res/values-fr/strings.xml
res/values-ja/strings.xml
when a user runs our application, the Android system selects which resources to load, based on the device's locale.
So basically I want to add language option in my application and save user language preference, then load text resources based on user preference.
Is there any way to do this?
View 2 Replies
View Related
Mar 10, 2010
For automated testing (using Hudson) I have a script that generates a bunch of emulators for many combinations of Android OS version, screen resolution, screen density and language.
This works fine, except for the language part.
I need to find a way to change the Android system locale automatically.
Here's some approaches I can think of, in order of preference:
Extracting/editing/repacking a QEMU image directly before starting the emulator
Running some sort of system-locale-changing APK on the emulator after startup
Changing the locale settings on the emulator filesystem after startup
Changing the locale settings in some SQLite DB on the emulator after startup
Running a key sequence (via the emulator's telnet interface) that would open the settings app and change the locale
Manually starting the emulator for each platform version, changing the locale by hand in the settings, saving it and archiving the images for later deployment
Any ideas whether this can be done, either via the above methods or otherwise?
Do you know where locale settings are persisted to/read from by the system?
I have updated his answer below with the details.
View 2 Replies
View Related
Jun 24, 2010
Locale is one of my faverate App, it can create situations specifying conditions under which your phone's settings should change. For example, your "At School" situation notices when your location condition is "77 Massachusetts Ave.," and changes your ringer volume setting to vibrate.
With Locale's advanced touch-screen interface, you'll be set up in no time. Quickly define locations that are important to you using a simple Google Maps interface.
If you think this is exactly what you are looking for, you can download it in the market
View 4 Replies
View Related
Jun 15, 2009
Does anyone know how to get current locale in program?
View 3 Replies
View Related
Jun 16, 2009
So there is Locale for all other countries/languages where apps are available but I can't set Locale for Spain/Spanish?
See Locale list: http://developer.android.com/reference/java/util/Locale.html
How can I get Locale.SPANISH so that I can set my app to spanish? res/ values-es
How can I find or create a Locale.SPANISH?
View 2 Replies
View Related
Dec 7, 2009
Does that just make too much sense to hope for? I'd love for my home screens to automatically change for qork, travel, weekends, nights, etc.
View 1 Replies
View Related
Jan 28, 2009
Is there any way to get rid of the the stupid red balloon locale icon that shows up in the notification bar? I can't stand having icons up there, its a pain to clear them.
View 3 Replies
View Related
Apr 17, 2010
I'm about to get my first Android phone and I'm wondering what your favorite alternative to Locale is? I'm seeing reviews that are less and less favorable and for a $10 app, it out to be darn amazing in my book.
View 21 Replies
View Related
Aug 2, 2009
I've been looking for this app:
Locale for Android
The website states that it can be downloaded over at Android Market but I can't find it anywhere.
View 7 Replies
View Related
Oct 12, 2010
Does anyone know a Locale-like application that is free? I don't really care about GPS settings, more time.
View 5 Replies
View Related
Feb 11, 2010
Is there a way to slow down the gps update setting on locale? It seems to check about every 4 - 5 mins or so for me. is there a way to slow it down? I fear it is killing my battery
View 10 Replies
View Related
Oct 27, 2010
I am writing a service in which I want to have an observer kind of thing for the phone Locale, which lets me know if any one has changed the Locale through Settings->Language & keyboard. Is there a way to do this?
View 2 Replies
View Related
Jan 21, 2010
I'm using PackageManager.getApplicationLabel(ApplicationInfo) to retrieve application labels. It looks like the label that is returned depends on the Locale set for the phone. For instance with the music app I get "Music" in English, vs. "Musica" if I have my locale set to Spanish. Is there a way to get the default application label (perhaps as defined in strings.xml)? I want to be able to retrieve an application label for each app that is independent of locale.
View 1 Replies
View Related
Jun 16, 2010
I've already read the issues with Locale, and that's sad, because I love the concept of the app. Even before I bought a smartphone and knew about Locale, I wished the existence of such a thing would exist. Hence my excitement when I got it was off the charts, but now, not so much. The situations aren't enabling and it's the same 'ole story of "Defaults" dicking everything up.
Can someone please make a Locale that works? (rhetorical question...).
Anyways, another frustration I've come across is that my Wi-Fi keeps turning on. Does anyone know what setting is causing this? I'm about to do a hard reset again and just say screw it.
View 4 Replies
View Related
Jul 28, 2009
I have different text packaged into my app for different locale. The Resource.getString(int resid) method automatically returns me the string for the CURRENT locale of the phone. Is there a way I can specifically obtain resources while passing in a locale? For example, there isn't such method as: Resource.getString(int resId, Locale myLocale);
View 3 Replies
View Related
Sep 23, 2009
Is there a way to add my IME Preferences to the "Locale&Text" menu, just like the Latin and Pinyin IME's. Or is this restricted to the keyboards that ship with the platform?
View 6 Replies
View Related
Jun 10, 2010
Changing the locale for a device is done in the settings, and can't be done by an app AFAIK.I know how to force my own app to a specific locale,So now to my question. Can I force, programatically, the local of an activity that isn't mine?I can imagine 2 ways this could be possible:Specifying the locale in an Intent used to start the activity.
Access and manipulate the configuration of running activities (in the same way as I can modify my own activities' configurations).Any thoughts? Is it possible? Is it reasonable?
I guess 2. would be more direct, but require some kind of permission (e.g. the modified atcitiy must allow it in the manifest file). But I'd settle for 1. or similar.
What I want is to be able to see certain apps in a different language, but rather not change the system locale. E.g. the Android Market, that only displays comments in one language. Can't think of other things right now.Can't find much written on Locale in the documentation, what is and isn't possible. But hoping some undocumented feature might enable this :)
View 2 Replies
View Related
Feb 3, 2012
Ok im now using huawei u8120 and I have installed modificated 2.1 android (yes i can install 2.3.7 cm7 but its slow) and i wanna ask how can i add more languages (locale)in to 2.1 android like lithuania locale ?
View 1 Replies
View Related
Nov 6, 2009
I'm looking for an app that will allow me to set up different profiles for phone settings that can be switched easily by choosing a "profile" from a list.I DON'T want Locale. i want to be able to do this by choosing from a list, NOT based on my location.For example, a user could set up a Power Saver profile, a Power User profile, an Online Profile, etc. Each of these profiles should be customizable. For example, I should be able to customize the "Power Saver" profile to the power settings I want (ie. Screen brightness, WiFi off, Bluetooth Off, Syncing Off, etc).Is there anything like this? Ideally I'm hoping for something that has a free version, as I am in Canada and we can't get paid apps yet.For the record, I am using Useful Switchers, but I don't want to have to go through all the various steps each time I want to go back and forth from power saving and using my phone online.
View 5 Replies
View Related
Dec 1, 2008
new to Android, G1 and the forums Wondered if any of you can help?
I have 4 things set up in locale
1) turn on silent when at work
2) turn on Wi-fi when at home
3) turn on silent 6:30PM to 7:30PM (when getting my son to bed)
4) turn on silent 11PM to 8AM (so no emails are waking me!) number 2 works fine, the problem however is with the silent ones, ALL of them never go back to the default (ringer at full volume) when the time is up or when I'm away from the location. any ideas? I don't have GPS on, but the distance from home to work is large so it can't think I'm still anywhere near there plus that won't affect the time related ones.
View 2 Replies
View Related
Mar 6, 2009
I just downloaded Locale and have the free Power Manager. My question is, do they conflict on settings, and do I have to disable one to get the other to work correctly?
View 4 Replies
View Related
Nov 16, 2010
What is the difference between locales ja and ja_JP in Android? Do I have to care about both?
View 1 Replies
View Related
Feb 24, 2010
I try to force the locale in my app to one the user specified. As this may be used to demonstrations, I want to change the language/locale in the app and not anytime for the whole device.
I looked around SO and tried to use every hint I found here. The result: I can restart my test activity with the new language, but if I change the orientation, the locale will always be reseted to the device one.
I uploaded a minimalistic project so you can reproduce my issue. Please ignore the shrinking of the UI, its not important :)
View 2 Replies
View Related
Sep 14, 2010
I want to have a configurable language settings in my app. So, in onCreate of my activity, I call Resources.updateConfiguration with the new locale. However, after onCreate (at some time, I can't find it when), the locale is set back to the default locale.
On the code example below, the strings shown in the main layout (as inflated by setContentView) shows the "in" language version, BUT when I press the menu button, on which onCreateMenu is called, the strings is taken from the "en" (default) locale.
The log shows this:
CODE:...............
Between "oncreate" and "onmenu", the locale magically changes.
Code snippet:
CODE:.................
View 3 Replies
View Related
Jun 9, 2010
Just got the EVO and I really like Locale. Does anyone know if there is a plugin for it to turn on/off the 4G radio in the EVO.
View 2 Replies
View Related
Dec 9, 2009
I have a simple "sleep" situation set up.
Conditions:
Time: 11:00 PM-6:30 AM
Settings:
Notification: Status Bar
Shortcut: Bedside (Alarm Clock/notification suppressant)
Configure Defaults:
Display: Level 2; 30 sec
Volume: Level 3; vibrate off
I had an issue with picking up GPS at home with using cell tower triangulation and leaving GPS off. So, I removed that portion.
I have no issues with Locale going into the situation, but it never comes out. I have to manually close Locale and sometimes forget when I first wake up, so I will miss text messages and emails.
View 2 Replies
View Related
Oct 19, 2009
I love locale, however I don't see a way to change the media volume. I have a work profile and it shuts off wifi, turns my ringer off, etc. I would also like to turn the media volume off so that if I play a game or start an app with music it won't disturb others. Anyone know if this is possible?
View 2 Replies
View Related