Search Results for

    Show / Hide Table of Contents

    Class CsvLocalizationProvider

    Built-in localization provider that loads translations from CSV files. CSV files follow the format: key,text (RFC 4180 quoting supported). Place translation files in a Resources folder using the naming convention {AssetName}.{locale} (e.g. MyDialogue.fr, MyDialogue.ja).

    Inheritance
    object
    CsvLocalizationProvider
    Implements
    ILocalizationProvider
    Namespace: Ibralogue.Localization
    Assembly: .dll
    Syntax
    public class CsvLocalizationProvider : MonoBehaviour, ILocalizationProvider

    Methods

    | Edit this page View Source

    LoadTable(string)

    Loads (or reloads) a translation table for a dialogue asset from Resources. Looks for a TextAsset at the path "{assetName}.{locale}" inside a Resources folder.

    Declaration
    public void LoadTable(string assetName)
    Parameters
    Type Name Description
    string assetName
    | Edit this page View Source

    Resolve(string)

    Looks up a translated string by localization key. Returns null if no translation exists for the key, in which case the engine falls back to the original text from the dialogue file.

    Declaration
    public string Resolve(string key)
    Parameters
    Type Name Description
    string key
    Returns
    Type Description
    string
    | Edit this page View Source

    SetLocale(string)

    Changes the active locale. Call LoadTable(string) afterward to load translations for a specific dialogue asset.

    Declaration
    public void SetLocale(string newLocale)
    Parameters
    Type Name Description
    string newLocale

    Implements

    ILocalizationProvider
    • Edit this page
    • View Source
    In this article
    Back to top Ibralogue Docs