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
  • 俄罗斯n
  • 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 theAssets/Zendesk/Runtime/Resources/Fontsfolder. All text components in the SDK useRoboto-Regular SDF.assetas a font asset. Roboto-Regular has fallback assets for some languages like Korean, Japanese, Simplified Chinese, Traditional Chinese, and Thai. All non-latin languages useNoto-Sansfont.

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 theMessaging.Initializemethod.

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 theAssets/Zendesk/Runtime/Resources/Fontsfolder.
    • Delete any font folder that you won't support in your app in theAssets/Zendesk/Runtime/Resources/Fontsfolder.
    • Remove missingFallback Font Assetsfrom Inspector underAssets/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 theAssets/Zendesk/Runtime/Resources/Fontsfolder.
    • Replace all the TextMeshPro components' font assets with your own font assets in the prefabs in theAssets/Zendesk/ Runtime/Resources/Prefabsfolder.