gpt4 book ai didi

Android,语言文件不起作用

转载 作者:塔克拉玛干 更新时间:2023-11-03 00:12:51 24 4
gpt4 key购买 nike

我现在正在创建一个 Android 应用程序,并尝试为我的母语添加语言文件。但在某种程度上这对我不起作用,尝试在两部不同的手机中加载应用程序,结果相同。之前创建语言文件效果不错,但这次没有。 (手机设置为瑞典语,语言文件适用于我创建的其他应用程序。)

在我的项目中我有

res
values
strings.xml
style.xml
values-se
strings.xml
[more not values folder]

目标语言是瑞典语 (se),但我无法找到它不适用于我的应用程序的方法。

values/strings.xml 文件

<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">My Quick Notes</string>
<string name="delete_item">Delete this note?</string>
<string name="add_item">Add new note</string>
<string name="switch_note_mode">Switches notes mode</string>
<string name="text_about">About</string>
<string name="text_help">Help</string>
<string name="text_ok">Ok</string>
<string name="text_switch_mode">Switch Mode</string>
<string name="text_about_message" formatted="false">Created by Figaro\nA simple notepad app.\nCopyright © 2012\nfigaro@evigfilosofi.se</string>
<string name="text_help_message">A simple notepad app for make quick notes.\n
\nClick on the first note with the green plus chars for add a new note.\n
\nMy Quick Notes support mulit list mode as normal mode, bullet list and checkbox list.
\nThe checkbox mode can be use for create a check list and check off list. Click on the checkbox for toggle the checkbox.
</string>
</resources>

和values-se/strings.xml

<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">My Quick Notes</string>
<string name="delete_item">Radera anteckning</string>
<string name="add_item">Ny anteckning</string>
<string name="switch_note_mode">Växa anteckningsläge</string>
<string name="text_about">Om</string>
<string name="text_help">Hjälp</string>
<string name="text_ok">Ok</string>
<string name="text_switch_mode">Växla Läge</string>
<string name="text_about_message" formatted="false">Skapad av Figaro\nEn enkel antecknings app\nCopyright © 2012\nfigaro@evigfilosofi.se</string>
<string name="text_help_message" formatted="false">En enkel notepad för att snabbt göra anteckningar\n
\nKlicka på den första noten med grönt plustecken för att skapa en ny anteckning.\n
\nMy Quick Notes stöder flera list lägen så som normalt läge, punktlista och checkboxlista\n
\nCheckbox läge kan användas för att skapa checklistor som kan prickas av. Klicka på checkrutan för att ändra den.
</string>
</resources>

两个文件都是utf-8类型(notepad++说的),我也尝试用瑞典语文件和这项工作替换英文副本,而我所看到的,系统只选择了默认语言文件和自定义文件?

有人知道这对我不起作用吗?

最佳答案

您使用的是瑞典顶级域名缩写,这不是您在这种情况下应该使用的名称。

Android localization来自瑞典的瑞典语代码是 values-sv-rSE

sv语言瑞典语

的实际代码

关于Android,语言文件不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12501801/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com