配置国际化区域设置
¥Configuring Internationalization locales
国际化功能 允许管理不同语言的内容,称为 "locales"。在 Strapi 应用中安装国际化插件后(参见 通过市场安装插件),管理员可以从 设置 > 全局设置 > 国际化管理语言环境。
¥The Internationalization feature allows to manage content in different languages, called "locales". Once the Internationalization plugin is installed in a Strapi application (see Installing plugins via the Marketplace), administrators can manage locales from Settings > Global settings > Internationalization.
国际化设置子部分显示一个表格,列出了 Strapi 应用可用的所有区域设置。默认情况下,仅配置英语区域设置并将其设置为默认区域设置。
¥The Internationalization settings sub-section displays a table listing all locales available for the Strapi application. By default, only the English locale is configured and set as the default locale.
对于每个区域设置,该表显示该区域设置的默认 ISO 代码、其可选显示名称,并指示该区域设置是否设置为默认区域设置。从该表中,管理员还可以:
¥For each locale, the table displays the default ISO code of the locale, its optional display name and indicates if the locale is set as the default one. From the table, administrators can also:
-
点击编辑按钮 编辑语言环境
¥Click on the edit button to edit a locale
-
点击删除按钮删除区域
¥Click on the delete button to delete a locale
添加新区域设置
¥Adding a new locale
管理员可以根据需要添加和管理任意数量的区域设置。然而,只能将一种区域设置设置为整个 Strapi 应用的默认区域设置。
¥Administrators can add and manage as many locales as they want. There can however only be one locale set as the default one for the whole Strapi application.
无法创建自定义区域设置。区域设置只能基于 Strapi 设置的 500 多个预先创建的语言环境列表 创建。
¥It is not possible to create custom locales. Locales can only be created based on the 500+ pre-created list of locales set by Strapi.
添加新区域设置:
¥To add a new locale:
-
单击添加新区域设置按钮。
¥Click on the Add new locale button.
-
在区域设置添加窗口中,从区域设置下拉列表中选择新的区域设置。后者按字母顺序列出了所有可以添加到你的 Strapi 应用中的区域设置,并显示为其 ISO 代码。
¥In the locale addition window, choose your new locale among the Locales drop-down list. The latter lists alphabetically all locales, displayed as their ISO code, that can be added to your Strapi application.
-
(可选)在区域设置显示名称文本框中,为新区域设置写入新的显示名称。
¥(optional) In the Locale display name textbox, write a new display name for your new locale.
-
(可选)在“高级设置”选项卡中,勾选“设为默认区域设置”设置,使你的新区域设置成为 Strapi 应用的默认区域设置。
¥(optional) In the Advanced settings tab, tick the Set as default locale setting to make your new locale the default one for your Strapi application.
-
单击“保存”按钮确认添加新区域设置。
¥Click on the Save button to confirm the addition of your new locale.