对特定于语言的strings.xml文件启用Android Studio拼写检查 [英] Enable Android Studio spell checking on language specific strings.xml files

查看:197
本文介绍了对特定于语言的strings.xml文件启用Android Studio拼写检查的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Android Studio中,似乎针对特定于语言的strings.xml文件禁用了拼写检查(我知道为什么默认情况下会禁用它).

In Android Studio, spellchecking seems to be disabled for language specific strings.xml files (and I understand why it would be disabled by default).

但是是否可以为其中两个文件启用它以检查值? (例如"fr/strings.xml"),或至少按需运行它.

But is it possible to enable it, to check values, for a couple of those files? ("fr/strings.xml" for example), or at least run it on demand.

推荐答案

为避免或强制执行拼写检查,可以在字符串xml中的<resources>标记中添加tools:locale.

To avoid or to enforce spellchecking you could add tools:locale to the <resources> tag in your string xml.

<resources xmlns:tools="http://schemas.android.com/tools" tools:locale="en">

这告诉Lint您资源的语言环境.

This tells Lint your resources' locale.

来源: http://alexsimo.com/mastering-tools-namespace-android/

这篇关于对特定于语言的strings.xml文件启用Android Studio拼写检查的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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