提供了多语言支持 [英] Providing Multiple language support

查看:113
本文介绍了提供了多语言支持的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何提供我的Andr​​oid应用程序的多语言支持?我工作的一个应用程序,在我所提供六种不同的语言支持,在法国选择我的应用程序的全部文本将转换为法语。

How can I provide multiple language support in my android app? I am working on a app, in which i have to provide six different language support,on selecting french the whole text of my app will convert in to French.

推荐答案

您基本上不把你在code字符串,而是把它们放到应用程序资源和参考用ID。在运行时,机器人只需把你的ID,并返回匹配的字符串。如果使用变化的语言,使用不同的资源文件(字符串ID仍然跨资源),这样你的code不需要任何改变。

You basically do not put your strings in code, but put them into application resource and reference by ID. On runtime, Android simply takes your ID and returns matching string. If use changes language, different resource file is used (string ID remains across resources) so your code does not need any change.

下面是你要开始与Android开发者网站上的文章:本地化

Here is article on Android developer site you want to start with: Localization

修改

您也应该看看这篇文章:支持不同的语言

You shall also read this article: Supporting Different Languages.

下面是教程关于这个问题的。

Here is tutorial on the subject.

这篇关于提供了多语言支持的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆