Localizing the SDK
Localizing the SDK
The Zendesk SDK for Unity supports the following locales:
- Brazilian Portuguese
- Bulgarian
- Czech
- Danish
- Dutch
- English (US)
- Finnish
- French
- German
- Greek
- Hungarian
- Indonesian
- Italian
- Norwegian
- Polish
- Romanian
- Russian
- Spanish
- Swedish
- Turkish
- Vietnamese
- Japanese
- Korean
- Traditional Chinese (Taiwanese)
- Simplified Chinese
Zendesk SDK for Unity uses Text Mesh Pro to render texts. You can find all the font resource files and font atlases in the Assets/Zendesk/Runtime/Resources/Fonts folder. All text components in the SDK use Roboto-Regular SDF.asset as a font asset. Roboto-Regular has fallback assets for some languages like Korean, Japanese, Simplified Chinese, Traditional Chinese, and Thai. All non-latin languages use Noto-Sans font.
Initialize the SDK in your chosen locale
To initialize the SDK in a specific locale, you can provide a language (ZendeskLanguage type) as a parameter of the Messaging.Initialize
method.
ZendeskMessaging.Initialize(channelKey, OnInitSuccess, OnInitFailure, ZendeskLanguage.English);
Note: The SDK sets the locale only at launch time. If the locale changes while the SDK is running, it won't update the SDK locale until you relaunch the app.
Remove unwanted fonts from SDK
You can remove some or all of the non-latin fonts from the SDK or use your own fonts across the SDK. Here are the flows for each option:
-
You may not need all the font assets that our SDK provides. If you want to remove the non-Latin font assets:
- Remove the unwanted font resource files and font atlases from the Assets/Zendesk/Runtime/Resources/Fonts folder.
- Delete any font folder that you won't support in your app in the Assets/Zendesk/Runtime/Resources/Fonts folder.
- Remove missing Fallback Font Assets from Inspector under Assets/Zendesk/Runtime/Resources/Fonts/Roboto-Regular SDF.asset
-
You may already have your own font files and do not want to use the SDK font assets. If you want to remove all of the SDK fonts and use your own:
- Remove the Assets/Zendesk/Runtime/Resources/Fonts folder.
- Replace all the TextMeshPro components' font assets with your own font assets in the prefabs in the Assets/Zendesk/ Runtime/Resources/Prefabs folder.