您的位置:首页 > 移动开发 > Android开发

Android Studio提示缺少翻译语言

2016-09-23 13:07 363 查看
   Explanation for issues of type "MissingTranslation":

   If an application has more than one locale, then all the strings declared

   in one language should also be translated in all other languages.

   If the string should not be translated, you can add the attribute

   translatable="false" on the <string> element, or you can define all your

   non-translatable strings in a resource file called donottranslate.xml. Or,

   you can ignore the issue with a tools:ignore="MissingTranslation"

   attribute.

   By default this detector allows regions of a language to just provide a

   subset of the strings and fall back to the standard language strings. You

   can require all regions to provide a full translation by setting the

   environment variable ANDROID_LINT_COMPLETE_REGIONS.

   You can tell lint (and other tools) which language is the default language

   in your res/values/ folder by specifying tools:locale="languageCode" for

   the root <resources> element in your resource file. (The tools prefix
   refers to the namespace declaration http://schemas.android.com/tools.)
在默认的strings.xml的开始设置

<resources xmlns:tools="http://schemas.android.com/tools"
 xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"
 tools:ignore="MissingTranslation">
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  android