docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class LocalizedStringDatabase

    Handles loading strings and their tables for the selected locale.

    Inheritance
    object
    LocalizedDatabase<StringTable, StringTableEntry>
    LocalizedStringDatabase
    Implements
    IPreloadRequired
    IReset
    Inherited Members
    LocalizedDatabase<StringTable, StringTableEntry>.PreloadOperation
    LocalizedDatabase<StringTable, StringTableEntry>.DefaultTable
    LocalizedDatabase<StringTable, StringTableEntry>.TableProvider
    LocalizedDatabase<StringTable, StringTableEntry>.TablePostprocessor
    LocalizedDatabase<StringTable, StringTableEntry>.UseFallback
    LocalizedDatabase<StringTable, StringTableEntry>.AsynchronousBehaviour
    LocalizedDatabase<StringTable, StringTableEntry>.GetDefaultTableAsync()
    LocalizedDatabase<StringTable, StringTableEntry>.GetTableAsync(TableReference, Locale)
    LocalizedDatabase<StringTable, StringTableEntry>.GetTable(TableReference, Locale)
    LocalizedDatabase<StringTable, StringTableEntry>.PreloadTables(TableReference, Locale)
    LocalizedDatabase<StringTable, StringTableEntry>.PreloadTables(IList<TableReference>, Locale)
    LocalizedDatabase<StringTable, StringTableEntry>.ReleaseAllTables(Locale)
    LocalizedDatabase<StringTable, StringTableEntry>.ReleaseTable(TableReference, Locale)
    LocalizedDatabase<StringTable, StringTableEntry>.GetAllTables(Locale)
    LocalizedDatabase<StringTable, StringTableEntry>.IsTableLoaded(TableReference, Locale)
    LocalizedDatabase<StringTable, StringTableEntry>.GetTableEntryAsync(TableReference, TableEntryReference, Locale, FallbackBehavior)
    LocalizedDatabase<StringTable, StringTableEntry>.GetTableEntry(TableReference, TableEntryReference, Locale, FallbackBehavior)
    LocalizedDatabase<StringTable, StringTableEntry>.OnLocaleChanged(Locale)
    LocalizedDatabase<StringTable, StringTableEntry>.ResetState()
    Namespace: UnityEngine.Localization.Settings
    Assembly: Unity.Localization.dll
    Syntax
    [Serializable]
    public class LocalizedStringDatabase : LocalizedDatabase<StringTable, StringTableEntry>, IPreloadRequired, IReset

    Properties

    Name Description
    MissingTranslationState

    Controls how Unity will handle missing translation values.

    NoTranslationFoundMessage

    The message to display when a string can not be localized. This is a Smart String which has access to the following named placeholders:

    PlaceholderDescription
    {key}The name of the key.
    {keyId}The numeric Id of the key.
    {table}The table object, this can be further queried, for example {table.TableCollectionName}.
    {locale}The locale asset, this can be further queried, for example {locale.name}.
    SmartFormatter

    The SmartFormatter that will be used for all smart string operations.

    Methods

    Name Description
    GenerateLocalizedString(StringTable, StringTableEntry, TableReference, TableEntryReference, Locale, IList<object>)
    GetLocalizedString(TableEntryReference, IList<object>, Locale, FallbackBehavior)

    Attempts to retrieve a string from the requested table. Uses WaitForCompletion to force the loading to complete synchronously. Please note that WaitForCompletion is not supported on WebGL.

    GetLocalizedString(TableEntryReference, Locale, FallbackBehavior, params object[])

    Attempts to retrieve a string from the requested table. Uses WaitForCompletion to force the loading to complete synchronously. Please note that WaitForCompletion is not supported on WebGL.

    GetLocalizedString(TableReference, TableEntryReference, IList<object>, Locale, FallbackBehavior)

    Attempts to retrieve a string from the requested table. The string will first be formatted with UnityEngine.Localization.SmartFormat if IsSmart is enabled otherwise it will use String.Format. Uses WaitForCompletion to force the loading to complete synchronously. Please note that WaitForCompletion is not supported on WebGL.

    GetLocalizedString(TableReference, TableEntryReference, Locale, FallbackBehavior, params object[])

    Attempts to retrieve a string from the requested table. The string will first be formatted with UnityEngine.Localization.SmartFormat if IsSmart is enabled otherwise it will use String.Format. Uses WaitForCompletion to force the loading to complete synchronously. Please note that WaitForCompletion is not supported on WebGL.

    GetLocalizedStringAsync(TableEntryReference, IList<object>, Locale, FallbackBehavior)

    Attempts to retrieve a string from the requested table. This method is asynchronous and may not have an immediate result. Check IsDone to see if the data is available, if it is false then you can use the Completed event to get a callback when it is finished, yield on the operation or call WaitForCompletion to force the operation to complete.

    GetLocalizedStringAsync(TableEntryReference, Locale, FallbackBehavior, params object[])

    Attempts to retrieve a string from the requested table. This method is asynchronous and may not have an immediate result. Check IsDone to see if the data is available, if it is false then you can use the Completed event to get a callback when it is finished, yield on the operation or call WaitForCompletion to force the operation to complete.

    GetLocalizedStringAsync(TableReference, TableEntryReference, IList<object>, Locale, FallbackBehavior, IVariableGroup)

    Attempts to retrieve a string from the requested table. The string will first be formatted with UnityEngine.Localization.SmartFormat if IsSmart is enabled otherwise it will use String.Format. This method is asynchronous and may not have an immediate result. Check IsDone to see if the data is available, if it is false then you can use the Completed event to get a callback when it is finished, yield on the operation or call WaitForCompletion to force the operation to complete.

    GetLocalizedStringAsync(TableReference, TableEntryReference, Locale, FallbackBehavior, params object[])

    Attempts to retrieve a string from the requested table. The string will first be formatted with UnityEngine.Localization.SmartFormat if IsSmart is enabled otherwise it will use String.Format. This method is asynchronous and may not have an immediate result. Check IsDone to see if the data is available, if it is false then you can use the Completed event to get a callback when it is finished, yield on the operation or call WaitForCompletion to force the operation to complete.

    Events

    Name Description
    TranslationNotFound

    Event is sent when a Table does not have a translation for a specified Locale.

    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)