Class LocalizedStringDatabase
Handles loading strings and their tables for the selected locale.
Inherited Members
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:
|
||||||||||
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. |