Version: Unity 7.0 Alpha (7000.0)
Language : English
Localization
How localization works

Get started with localization

Set up localization in a project and translate your first string.

Follow these steps once to create the settings, add languages, author a translation, and preview the result in the Unity Editor.

Create the Localization settings

To create the settings asset:

  1. Open Edit > Project Settings and select Localization.
  2. Select Create localization settings and select where to save the asset.

The settings asset holds your locales, startup behavior, and content sources. Unity loads it automatically in the Editor and in builds. For details, refer to Localization settings reference.

Add locales

A locale describes a language and region, such as English or French (Canada). To add the languages you want to support:

  1. In Project Settings > Localization, select Add locale.
  2. In the Add locales window, search for each language you want to support and add it.
  3. Set the Project locale to the language you author in. The project locale is the default when no other selection applies.

For information about fallback locales, startup locale selection, and disabling locales, refer to Locales.

Create a table collection

A table collection stores one value per locale for each key. To create a table collection:

  1. Select Assets > Create > Localization > Resource Table Collection, and select where to save the collection and its per-locale tables.
  2. Open Window > Localization > Resource Tables and select the collection.
  3. Add a key, for example greeting, with the entry type String, and enter a value for each locale column.

For entry types, Smart Strings, and variants, refer to Localization tables.

Use the localized string

Then, reference the entry. How you reference it depends on where you need the localized value:

Preview another language

The Editor’s main toolbar has a preview locale dropdown. To show or hide it, right-click (macOS: Ctrl+click) the toolbar. Changing the dropdown changes the selected locale, and localized values update to match.

Additional resources

Localization
How localization works
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961