Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的应用程序功能之一是设置语言(阿拉伯语、法语、德语等)。
根据android doc ,我成功地整合并像魅力一样工作。
但是有些文本来自服务器,因此如何将这些文本转换为不同的语言。
如果有人有想法,请分享。
您必须将当前语言代码传递给服务器请求
Locale.getDefault().getDisplayLanguage();
当然,服务器必须能够以相应的语言对其进行响应