The "preface" is explained in the blog post:This article will introduce the Linux character set and system language settings through a personal tone, including lang,locale,lc_all,posix commands and the relevant knowledge of the parameters, at the current time point "June 21, 2017 " under the grasp of the technical level is limited, There may be a lot of knowledge understanding is not enough in-depth or comp
Change Ubuntu system language environment to English en_US.UTF-8 View Current System Language Environment locale edit configuration file, change zh_US.UTF-8 to en_US.UTF-8, en change to ensudonano/etc/default/localeLANG = "en_US.UTF-8" LANGUAGE = "en_US: en" to continue viewing the changed system
How does one change LANGUAGEen_US in locale? Sudodpkg-reconfigurelocales only changes other -- Linux Release Technology-Debian information. The following is a detailed description. $ Sudo dpkg-reconfigure locales
After selecting zh_CN.UTF-8
$ Locale
LANG = zh_CN.UTF-8
LANGUAGE = en_US
LC_CTYPE = "zh_CN.UTF-8"
LC_NUMERIC = "zh_CN.UTF-8"
LC_TIME = "zh_CN.U
GCC: Default compiler for languages (input gcc under Ubuntu, can see if GCC is installed depending on the terminal output)g++: Default compiler for C + + (Ubuntu input g++, can see if g++ is installed according to the terminal output)Under Ubuntu we install both GCC and g++ environments by default:sudo apt-get instal gccsudo apt-get install g++--------------------------------------------------------------------------------------------------------------- ------------GCC compiles a file with a. c
The examples in this article describe a way to force an Android application to use a locale. Share to everyone for your reference. Specifically as follows:
When developing an internationalized Android application, it is sometimes necessary to specify a Locale
1. Java Code:
String languagetoload = "de";
[Android] three methods of application language switching
Android has done a good job in international and multi-language switching. An application only needs to name the values-[language] folder of the corresponding language fam
[Android] three methods of application language switching
Android has done a good job in international and multi-language switching. An application only needs to name the values-[language] folder of the corresponding language fam
running.
When the device configuration changes, callback is triggered. You may be wondering, what are the device configurations?Android: configChanges = ["mcc", "mnc", "locale ","Touchscreen", "keyboard", "keyboardHidden ","Navigation", "screenLayout", "fontScale", "uiMode ","Orientation", "screenSize", "smallestScreenSize"]Note that if Activity is used in combination with the onConfigurationChanged method
faster than icu4j.
2. Android Language PackThe Language Pack used by Android is icu4c. The location is external/icu4c. Android supports the following languages: locale CanadaLocale constant for en_ca.Locale canada_frenchLocale co
, because the release of icu4j on the Java platform needs to be bound with JDK, icu4c supports Unicode standard changes much faster than icu4j.
2. Android Language PackThe Language Pack used by Android is icu4c. The location is external/icu4c. Android supports the following
Features:App users set the app language according to their language preferences. The language setting is for this app only and retains the previous startup settings the next time the app is launched.Update language:Public Static voidChangeapplanguage(ResourcesResources, StringLanatr) { ConfigurationConfig=Resources.GetConfiguration(); DisplaymetricsDm=Resources.G
Language Pack used by Android is icu4c. The location is external/icu4c. Android supports the following languages: locale CanadaLocale constant for en_ca.Locale canada_frenchLocale constant for fr_ca.Locale ChinaLocale constant for zh_cn.Locale ChineseLocale constant for Zh.Locale EnglishLocale constant for en.Locale F
Android revolving screen's behind-the-scenes internationalization language failure solution, android InternationalizationThis article has been synchronized to my blog: liyuyu.cn
I recently used international languages (English + Chinese) in the project, but I found a problem during use. When the screen is rotated, the APP lan
. getconfiguration (); loc = mlocales [position]; config. locale = loc. locale ;//Indicate this isn' t some passing default-the user wants this remembered config. usersetlocale = true; AM. updateconfiguration (config); // trigger the dirty bit for the settings provider. backupmanager. datachanged ("com. android. providers. settings ");} catch(RemoteException e) {
(); configuration Config = aM. getconfiguration (); loc = mlocales [position]; config. locale = loc. locale ;//Indicate this isn' t some passing default-the user wants this remembered config. usersetlocale = true; AM. updateconfiguration (config); // trigger the dirty bit for the settings provider. backupmanager. datachanged ("com. android. providers. settings "
Android multi-language settings, Android multi-language
The multilingual switchover function was used in recent projects. Note that in the xml file and code, all the places where the text string is used ensure that the string text used is from the string in the values folder. in xml.
Therefore, two to three files are r
Android source code in the default has three kinds of input methods: English, Chinese, Japanese. The corresponding project code path is:In general, the default is the choice of latinime input method, but the Android system is selected by default system language as input method, for example, we want to use Chinese input methods,You need to switch the system
is called icu4c, to support international applications under the C/C ++ platforms. Icu4j is slightly different from icu4c, but because icu4c is open-source and closely follows the Unicode standard, Unicode standards supported by icu4c are always the latest. At the same time, because the release of icu4j on the Java platform needs to be bound with JDK, icu4c supports Unicode standard changes much faster than icu4j.
2. Android
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.