对于ios来说则是非常简单的,创建一个本地化的路径  创建i18n这个路径 如下所示:

如何让android应用程序用中文显示(应用程序名称本地化)

i18n/en/app.xml, i18n/es/app.xml, i18n/ja/app.xml 里面的文件如下所示:

en/app.xml里的内容如下:

<resources>
<string name="appname">Cat</string>
</resources>
es/app.xml里的内容如下:
<resources>
<string name="appname">Gato</string>
</resources>
ja/app.xml里的内容如下:
<resources>
<string name="appname"></string>
</resources>
 
 
但是如果在android下的话  则稍微要复杂点:
 
 
如何让android应用程序用中文显示(应用程序名称本地化)
 
 

在values-en文件夹内的strings.xml文件内容如下:

<?xml version="1.0" encoding="UTF-8"?>
<resources>
<string name="appname">HotSales</string>
</resources>

在values-zh文件夹内的strings.xml文件内容如下:

<?xml version="1.0" encoding="UTF-8"?>
<resources>
<string name="appname">火速帮销售</string>
</resources>

然后修改已经存在的AndroidManifest.xml

我们需要添加自定义的 manifest file,看到上图所示的platform/android/AndroidManifest.xml

其实就是把AndroidManifest.xml文件里的内容复制进新建立的platform/android/AndroidManifest.xml内

change the android:label attributes of the<application> and <activity> elements from the defined value of your app name to the value@string/app_name

如何让android应用程序用中文显示(应用程序名称本地化)

相关文章:

  • 2022-01-27
  • 2021-07-13
  • 2021-04-28
  • 2022-01-12
  • 2021-11-11
  • 2022-12-23
  • 2021-12-03
  • 2021-12-26
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-11-13
  • 2021-12-23
  • 2022-12-23
  • 2021-10-17
相关资源
相似解决方案