语言值
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
此页列出了您可以在搜索引擎的界面 (UI) 中使用的语言代码,例如搜索按钮。搜索引擎所使用的语言也会提升该语言的搜索结果;但不会过滤掉其他语言的结果。例如,如果您选择了中文作为您的搜索引擎语言,那么在搜索结果中,中文网页的优先级将高于英文网页。
您可以在控制台或上下文文件中定义语言。在控制台的基本设置标签中,从搜索引擎语言下拉列表中选择语言。在上下文文件中,您可以定义 CustomSearchEngine
元素的 language
属性的值,如以下示例所示:
<CustomSearchEngine volunteers="false"
language="en"
visible="false"
encoding="UTF-8">
</CustomSearchEngine>
下表枚举了 language
属性的可用值。
注意:如果您不指定语言,可编程搜索引擎将使用 en
(英语)作为默认值。
语言 |
语言代码值 |
用户的语言区域 |
空值(即 language=" " ) |
阿拉伯语 |
ar |
保加利亚语 |
bg |
加泰罗尼亚语 |
ca |
克罗地亚语 |
hr |
中文(简体) |
zh-Hans |
中文(繁体) |
zh-Hant |
捷克语 |
cs |
丹麦语 |
da |
荷兰语 |
nl |
英语(默认) |
en |
菲律宾语 |
fil |
芬兰语 |
fi |
法语 |
fr |
德语 |
de |
希腊语 |
el |
希伯来语 |
he |
印地语 |
hi |
匈牙利语 |
hu |
印尼语 |
id |
意大利语 |
it |
日语 |
ja |
韩语 |
ko |
拉脱维亚语 |
lv |
立陶宛语 |
lt |
挪威语 |
no |
波兰语 |
pl |
葡萄牙语 |
pt |
罗马尼亚语 |
ro |
俄语 |
ru |
塞尔维亚语 |
sr |
斯洛伐克语 |
sk |
斯洛文尼亚语 |
sl |
西班牙语 |
es |
瑞典语 |
sv |
泰语 |
th |
土耳其语 |
tr |
乌克兰语 |
uk |
越南语 |
vi |
返回页首
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-25。
[null,null,["最后更新时间 (UTC):2025-07-25。"],[[["\u003cp\u003eThis page provides language codes for your search engine's user interface and for boosting search results in that language, but it does not filter out other languages.\u003c/p\u003e\n"],["\u003cp\u003eYou can set the language code in the control panel or by editing the \u003ccode\u003elanguage\u003c/code\u003e attribute of the \u003ccode\u003eCustomSearchEngine\u003c/code\u003e element in your context file.\u003c/p\u003e\n"],["\u003cp\u003eA comprehensive table lists all supported language codes and their corresponding languages, with \u003ccode\u003een\u003c/code\u003e (English) as the default if no language is specified.\u003c/p\u003e\n"]]],[],null,["# Language Values\n\nThis page lists the language code you can use in the user interface (UI) of your search engine, such as the search button. The language of you search engine also boosts results in that language; however it does not filter out results in other languages. For example, if you selected Chinese as your search engine language, Chinese webpages will be given higher priority over English webpages in the search results.\n\nYou can define the language either in the control panel or the [context file](/custom-search/docs/context#attributes). In the the **Basics** tab of the control panel, you select the language from the **Search engine language** drop-down list. In the context file, you define the value of `language` attribute of the `CustomSearchEngine` element, as in the following example: \n\n```text\n\u003cCustomSearchEngine volunteers=\"false\"\n language=\"en\"\n visible=\"false\"\n encoding=\"UTF-8\"\u003e\n\u003c/CustomSearchEngine\u003e \n```\n\nThe following table enumerates the available values for the `language` attribute.\n\n**Note:** If you do not specify a language, Programmable Search Engine will use `en` (English) as the default value.\n\n| Language | Language Code Value |\n|-----------------------|---------------------------------------|\n| locale of your user | empty value (that is, `language=\" \"`) |\n| Arabic | `ar` |\n| Bulgarian | `bg` |\n| Catalan | `ca` |\n| Croatian | `hr ` |\n| Chinese (Simplified) | `zh-Hans` |\n| Chinese (Traditional) | `zh-Hant` |\n| Czech | `cs` |\n| Danish | `da` |\n| Dutch | `nl` |\n| English (default) | `en` |\n| Filipino | `fil` |\n| Finnish | `fi` |\n| French | `fr` |\n| German | `de` |\n| Greek | `el` |\n| Hebrew | `he` |\n| Hindi | `hi` |\n| Hungarian | `hu` |\n| Indonesian | `id` |\n| Italian | `it` |\n| Japanese | `ja` |\n| Korean | `ko` |\n| Latvian | `lv` |\n| Lithuanian | `lt` |\n| Norwegian | `no` |\n| Polish | `pl` |\n| Portuguese | `pt` |\n| Romanian | `ro` |\n| Russian | `ru` |\n| Serbian | `sr` |\n| Slovak | `sk` |\n| Slovenian | `sl` |\n| Spanish | `es` |\n| Swedish | `sv` |\n| Thai | `th` |\n| Turkish | `tr` |\n| Ukrainian | `uk` |\n| Vietnamese | `vi` |\n[ ]\n\n[Back to top](#top)"]]