Getting Started
Last updated
Last updated
Smart Localization requires the 'AI Development Kit' asset to function. Please ensure this asset is installed before using Smart Localization. If you do not have 'AI Development Kit' installed yet, you can download it from the Unity Asset Store here.
Smart Localization settings are managed through the Unity Preferences window. Follow these steps to configure your localization settings:
1. Open Preferences:
In Unity, navigate to Edit > Preferences... (on macOS, Unity > Preferences...).
In the Preferences window, select Glitch9 > Smart Localization.
2. General Settings:
Default Locale: Set the default language for your project.
Localization Source: Choose the source for your localization data (e.g., Addressables).
Addressable Group: Specify the addressable group that contains the localization tables.
5. Contributors:
Manage the list of contributors to your localization data.
6. Locales:
Available Locales: Configure the default set of locales available for use in the localization system.
Supported Locales: Specify the locales included in the current version of the project.
1. Set the Current Locale:
First, set the locale that your application will use for localization. This can be done using the LocalizationManager.CurrentLocale
property.
2. Localize Strings:
Use the provided extension methods to localize strings based on the current locale. The Localize extension method can be used to fetch the localized version of a string.
3. Localize DateTime:
The Localize extension method for DateTime
allows you to format dates and times according to the current locale.
4. Localize Enums:
To localize enums, you need to use the LocalizedEnumAttribute
to specify the table name for the enum values. Then, you can use the Localize extension method for enums.