Android How to change code to set the default language to Chinese?
#1
I changed the three place about default language and the Chinese add-on has been enabled.

system/settings/settings.xml

@@ -3295,7 +3295,7 @@
<group id="1" label="14218">
<setting id="locale.language" type="addon" label="248" help="36114">
<level>0</level>
- <default>resource.language.en_gb</default>
+ <default>resource.language.zh_cn</default>
<constraints>
<addontype>kodi.resource.language</addontype>
</constraints>




system/addon-manifest.xml

@@ -36,6 +36,7 @@
<addon>repository.xbmc.org</addon>
<addon>resource.images.weathericons.default</addon>
<addon>resource.language.en_gb</addon>
+ <addon>resource.language.zh_cn</addon>
<addon>resource.uisounds.kodi</addon>
<addon>screensaver.xbmc.builtin.black</addon>
<addon>screensaver.xbmc.builtin.dim</addon>



xbmc/guilib/LocalizeStrings.h

@@ -49,7 +49,7 @@ struct LocStr
};

// The default fallback language is fixed to be English
-const std:Confusedtring LANGUAGE_DEFAULT = "resource.language.en_gb";
+const std:Confusedtring LANGUAGE_DEFAULT = "resource.language.zh_cn";
const std:Confusedtring LANGUAGE_OLD_DEFAULT = "English";

Note: Fonts already been change to Arial
After I changed these files, default language is Chinese, but it's not Chinese...
Image
Reply
#2
Interesting...

Could you share a log in case there is something relevant in there, please.
Reply
#3
Which kind of log? I's a freshman.
Adb logcat ? or log in kodi's private place..... and I don't know where

http://pan.baidu.com/s/1qXU1dLE

It's adb logcat above~Nod
Reply
#4
Image
Reply
#5
(2017-08-31, 09:55)Chris_Su Wrote: I changed the three place about default language (English) and the Chinese add-on has been enabled.

system/settings/settings.xml

@@ -3295,7 +3295,7 @@
<group id="1" label="14218">
<setting id="locale.language" type="addon" label="248" help="36114">
<level>0</level>
- <default>resource.language.en_gb</default>
+ <default>resource.language.zh_cn</default>
<constraints>
<addontype>kodi.resource.language</addontype>
</constraints>




system/addon-manifest.xml

@@ -36,6 +36,7 @@
<addon>repository.xbmc.org</addon>
<addon>resource.images.weathericons.default</addon>
<addon>resource.language.en_gb</addon>
+ <addon>resource.language.zh_cn</addon>
<addon>resource.uisounds.kodi</addon>
<addon>screensaver.xbmc.builtin.black</addon>
<addon>screensaver.xbmc.builtin.dim</addon>



xbmc/guilib/LocalizeStrings.h

@@ -49,7 +49,7 @@ struct LocStr
};

// The default fallback language is fixed to be English
-const std:Confusedtring LANGUAGE_DEFAULT = "resource.language.en_gb";
+const std:Confusedtring LANGUAGE_DEFAULT = "resource.language.zh_cn";
const std:Confusedtring LANGUAGE_OLD_DEFAULT = "English";

Note: Fonts already been change to Arial
After I changed these files, default language is Chinese, but it's not Chinese...
Image
Thanks for sharing this. I will give it a try.
Reply

Logout Mark Read Team Forum Stats Members Help
How to change code to set the default language to Chinese?0