Set Language Specific Rules for String Comparison为字符串比较设置特定于语言的规则

Use the Collation query bar option to specify language-specific rules for string comparison, such as rules for lettercase and accent marks.使用排序规则查询栏选项指定用于字符串比较的特定于语言的规则,例如字母大小写和重音符号的规则。

  1. In the Query Bar, click Options.在查询栏中,单击“选项”。
  2. Enter the locale field in the collation document to specify the ICU Locale code for the desired language in the Collation field.在排序规则文档中输入locale字段,以在排序规则字段中指定所需语言的ICU区域设置代码

    Example

    To use the pinyin variant of the Chinese collation, use the following collation document:要使用中文排序规则的pinyin变体,请使用以下排序规则文档:

    { "locale" : "zh@collation=pinyin" }

    As you type, the Find button is disabled and the Collation label turns red until a valid query is entered.键入时,“查找”按钮将被禁用,“排序规则”标签将变为红色,直到输入有效的查询。

  3. Click Find to run the query and view the updated results.单击“查找”以运行查询并查看更新的结果。

To clear the query bar and the results of the query, click Reset.要清除查询栏和查询结果,请单击“重置”。