【发布时间】:2026-02-25 17:05:02
【问题描述】:
我正在开发一个安卓应用程序。在该应用程序中获取用户 android 设备的键盘语言。如果用户键盘是法语,那么整个应用程序字体应该变成法语。
我曾尝试过以下演示示例。
在值->字符串中
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Localizationdemo</string>
<string name="hello_world">Hello world!</string>
<string name="menu_settings">Settings</string>
</resources>
在值-fr->字符串中
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="title">Mon Application</string>
<string name="hello_world">Bonjour le monde !</string>
</resources>
但我只会得到英文“Hello world”,而我的键盘是法语。
【问题讨论】:
标签: android localization