¡@

Home 

2014/10/15 ¤U¤È 10:03:45

iphone Programming Glossary: applelanguages

Translating iOS app to unsupported/non-standard languages

http://stackoverflow.com/questions/10259695/translating-ios-app-to-unsupported-non-standard-languages

for future maintainers and therefore error prone. Requires a weird build setup. Option 2 Abuse NSUserDefaults AppleLanguages The AppleLanguages object in NSUserDefaults contains a list of languages for the app to use. By setting it like this I can.. maintainers and therefore error prone. Requires a weird build setup. Option 2 Abuse NSUserDefaults AppleLanguages The AppleLanguages object in NSUserDefaults contains a list of languages for the app to use. By setting it like this I can get the app to load.. from an lt.lproj directory NSUserDefaults standardUserDefaults setObject NSArray arrayWithObjects @ lt nil forKey @ AppleLanguages For historical reasons I am already doing a slightly more involved version of this to remove a deprecated translation in..

Change app language in iOS without restarting the app

http://stackoverflow.com/questions/12192151/change-app-language-in-ios-without-restarting-the-app

the next restart NSUserDefaults standardUserDefaults setObject NSMutableArray arrayWithObjects language nil forKey @ AppleLanguages Anyone have idea how those dynamic language change can be done without restarting the app iphone objective c ios xcode..

always returns “en_US” not user's current language

http://stackoverflow.com/questions/1522210/always-returns-en-us-not-users-current-language

rather it is here NSUserDefaults defs NSUserDefaults standardUserDefaults NSArray languages defs objectForKey @ AppleLanguages NSString preferredLang languages objectAtIndex 0 NSLog @ preferredLang @ preferredLang Peter's answer seems to be a better..

How to change iPhone app language during runtime?

http://stackoverflow.com/questions/1576904/how-to-change-iphone-app-language-during-runtime

NSArray arrayWithObjects InfoWhatever sender .language nil NSUserDefaults standardUserDefaults setObject lang forKey @ AppleLanguages NSUserDefaults defaults NSUserDefaults standardUserDefaults NSArray languages defaults objectForKey @ AppleLanguages NSString.. @ AppleLanguages NSUserDefaults defaults NSUserDefaults standardUserDefaults NSArray languages defaults objectForKey @ AppleLanguages NSString currentLanguage languages objectAtIndex 0 NSLog @ Current language @ currentLanguage The language will change but..

How to force NSLocalizedString to use a specific language

http://stackoverflow.com/questions/1669645/how-to-force-nslocalizedstring-to-use-a-specific-language

localization internationalization share improve this question NSLocalizedString and variants thereof access the AppleLanguages key in NSUserDefaults to determine what the user's settings for preferred languages are. This returns an array of language.. look something like NSUserDefaults standardUserDefaults setObject NSArray arrayWithObjects @ de @ en @ fr nil forKey @ AppleLanguages NSUserDefaults standardUserDefaults synchronize to make the change immediate This would make German the preferred language..

How to quit an iPhone app nicely?

http://stackoverflow.com/questions/1707685/how-to-quit-an-iphone-app-nicely

NSArray arrayWithObjects Whatever sender .newLanguage nil NSUserDefaults standardUserDefaults setObject lang forKey @ AppleLanguages NSUserDefaults defaults NSUserDefaults standardUserDefaults NSArray languages defaults objectForKey @ AppleLanguages NSString.. @ AppleLanguages NSUserDefaults defaults NSUserDefaults standardUserDefaults NSArray languages defaults objectForKey @ AppleLanguages NSString currentLanguage languages objectAtIndex 0 NSLog @ Current language @ currentLanguage If the user restarts using..

iPhone App Localization - English problems?

http://stackoverflow.com/questions/3308519/iphone-app-localization-english-problems

isEqualToString @ GB NSUserDefaults standardUserDefaults setObject NSArray arrayWithObjects @ en_GB @ en nil forKey @ AppleLanguages int retVal UIApplicationMain argc argv nil nil pool release return retVal This pops the users language eg en into the language.. remove that NSUserDefaults setting you just set with the code NSUserDefaults standardUserDefaults removeObjectForKey @ AppleLanguages It's safe to remove at this point because all the bundle initialisation has been completed. Your app should now be using..

Changing language on the fly, in running iOS, iphone app

http://stackoverflow.com/questions/5109245/changing-language-on-the-fly-in-running-ios-iphone-app

Any hints Thanks G EDIT infos from APPLE In general you should not change the iOS system language via use of the AppleLanguages pref key from within your application. This goes against the basic iOS user model for switching languages in the Settings..

language change only after restart on iphone

http://stackoverflow.com/questions/5912018/language-change-only-after-restart-on-iphone

NSArray languages NSArray arrayWithObject @ en_GB NSUserDefaults standardUserDefaults setObject languages forKey @ AppleLanguages NSUserDefaults standardUserDefaults synchronize int retVal UIApplicationMain argc argv nil nil pool release return retVal.. Update the answer How to change the languages within the app NSLocalizedString and variants thereof access the AppleLanguages key in NSUserDefaults to determine what the user's settings for preferred languages are. This returns an array of language.. look something like NSUserDefaults standardUserDefaults setObject NSArray arrayWithObjects @ de @ en @ fr nil forKey @ AppleLanguages Note To be on safe side make sure that you use the appropriate pre defined languages name. Below is the code snippet but..

Change iOS app's language on the fly

http://stackoverflow.com/questions/6150576/change-ios-apps-language-on-the-fly