Implementation method of multilingual support for Android Application

Software and hardware environment

preface

After the completion of app development and testing, it is faced with application launch. In addition to domestic launch channels, I think it is essential for Android camp to launch Google play. In this way, Chinese and English support has become a necessary function point. This article is to realize this function.

Set resource files in different languages

If necessary, drawable, layout and values in the res folder need to be processed in different languages. Here, only values is taken as an example

The contents in the values en and values zh RCN folders are the same. Values en is the English translation corresponding to values zh RCN. For example, the contents of the strings.xml file are as follows

The next step is how to use the corresponding resources. It's very simple. Take toast as an example

Current locale of the system

Only Chinese and English are processed here. If there are other languages, they need to be modified slightly

Set language in app

Resource folder suffix

A common language folder naming list is given to facilitate query

The above is the whole content of this article. I hope it will be helpful to your study, and I hope you can support programming tips.

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>