Skip to content

Game.UI.LocaleIds

Assembly: Assembly-CSharp
Namespace: Game.UI

Type: public static class

Base: System.Object

Summary:
A simple static container of string constant formats used to build localization keys for various UI elements (assets, policies, statistics, maps). Each constant contains a format string with a single placeholder ({0}) that should be replaced with the specific identifier (for example an asset id, policy id, statistic id, or map id). These keys are intended to be used with the game's localization system to look up translated strings.


Fields

  • public const string kAssetNameFormat = "Assets.NAME[{0}]"
    Format for asset name localization keys. Use string.Format(LocaleIds.kAssetNameFormat, id) to produce the localization key for an asset's display name.

  • public const string kPolicyTitleFormat = "Policy.TITLE[{0}]"
    Format for policy title localization keys. Replace {0} with the policy identifier to get the key used by the UI to display the policy's title.

  • public const string kStatisticTitleFormat = "StatisticsPanel.STAT_TITLE[{0}]"
    Format for statistic title localization keys shown in the statistics panel. Replace {0} with the statistic identifier (or index) to get the lookup key.

  • public const string kMapNameFormat = "Maps.MAP_TITLE[{0}]"
    Format for map title localization keys. Replace {0} with the map id (or name) to get the map title localization key.

  • public const string kMapDescriptionFormat = "Maps.MAP_DESCRIPTION[{0}]"
    Format for map description localization keys. Replace {0} with the map id (or name) to get the description key.

Properties

  • None.
    This is a static constants container and exposes no properties.

Constructors

  • None.
    As a static class, LocaleIds has no instance constructors. The constants are compile-time constants and available without initialization.

Methods

  • None.
    This class only provides constant format strings; it contains no methods.

Usage Example

// Build a localization key for an asset and retrieve the localized text via the game's localization API.
string key = string.Format(Game.UI.LocaleIds.kAssetNameFormat, "my_car_asset");
string localizedName = Locale.Get(key); // Replace Locale.Get(...) with the actual localization API used by the game/mod.

// Example for map title:
string mapKey = string.Format(Game.UI.LocaleIds.kMapNameFormat, "map_01");
string mapTitle = Locale.Get(mapKey);

Notes: - Replace Locale.Get(...) with the real localization lookup method provided by the game's API or your mod framework. - Ensure your mod or asset provides matching entries in the localization files (or uses existing game keys) that follow these formats, so lookups return the intended translated strings.