Search Results for

    Show / Hide Table of Contents

    Class LocalizedStringTable

    Contains localized strings table for a given culture.

    Inheritance
    Object
    ScriptingObject
    ManagedScriptingObject
    Asset
    JsonAssetBase
    LocalizedStringTable
    Inherited Members
    Asset::_deleteFileOnUnload
    ScriptingObject::_gcHandle
    ScriptingObject::_id
    JsonAssetBase::_isResaving
    Asset::_isVirtual
    JsonAssetBase::_isVirtualDocument
    Asset::_loadingTask
    Asset::_loadState
    JsonAssetBase::_path
    Asset::_refCount
    ScriptingObject::_type
    Asset::AddReference()
    Asset::Asset(const SpawnParams& params, const AssetInfo* info)
    ScriptingObject::CanCast(const ScriptingTypeHandle& from, const ScriptingTypeHandle& to)
    ScriptingObject::CanCast(const MClass* from, const MClass* to)
    Asset::CancelStreaming()
    ScriptingObject::Cast(ScriptingObject* obj)
    Asset::ChangeID(const Guid& newId)
    Asset::const
    Asset::createLoadingTask()
    Asset::CreateManaged()
    ScriptingObject::CreateManagedInternal()
    JsonAssetBase::Data
    JsonAssetBase::DataEngineBuild
    JsonAssetBase::DataTypeName
    Asset::DECLARE_ENUM_7(LoadResult, Ok, Failed, MissingDataChunk, CannotLoadData, CannotLoadStorage, CannotLoadInitData, InvalidData)
    ScriptingObject::Deleted
    Asset::DeleteManaged()
    Object::DeleteObject(float timeToLive = 0.0f, bool useGameTime=false)
    Object::DeleteObjectNow()
    Asset::DEPRECATED("Use GetReferences with assets and files parameter instead")
    Asset::DestroyManaged()
    JsonAssetBase::Document
    LocalizedStringTable
    Object::Flags
    ScriptingObject::FromInterface(void* interfaceObj, const ScriptingTypeHandle& interfaceType)
    ScriptingObject::FromInterface(T* interfaceObj)
    ScriptingObject::GetClass()
    JsonAssetBase::GetData()
    ScriptingObject::GetID()
    ScriptingObject::GetManagedInstance()
    JsonAssetBase::GetMemoryUsage()
    ScriptingObject::GetOrCreateManagedInstance()
    JsonAssetBase::GetPath()
    JsonAssetBase::GetReferences(const StringAnsiView& json, Array<Guid, HeapAllocation>& assets)
    JsonAssetBase::GetReferences(Array<Guid, HeapAllocation>& assets, Array<String, HeapAllocation>& files)
    Asset::GetReferences()
    Asset::GetReferencesCount()
    ScriptingObject::GetType()
    ScriptingObject::GetTypeHandle()
    Asset::GetTypeName()
    ScriptingObject::HasManagedInstance()
    JsonAssetBase::Init(const StringView& dataTypeName, const StringAnsiView& dataJson)
    Asset::InitAsVirtual()
    ScriptingObject::Is(const ScriptingTypeHandle& type)
    ScriptingObject::Is(const MClass* type)
    ScriptingObject::Is()
    Asset::IsInternalType()
    Asset::IsLoaded()
    ScriptingObject::IsRegistered()
    Asset::IsVirtual()
    JsonAssetBase::JsonAssetBase(const SpawnParams& params, const AssetInfo* info)
    Asset::LastLoadFailed()
    LocalizedStringTable
    Asset::Locker
    ManagedScriptingObject::ManagedScriptingObject(const SpawnParams& params)
    ScriptingObject::NewObject(const ScriptingTypeHandle& typeHandle)
    ScriptingObject::NewObject()
    Asset::OnCheckSave(const StringView& path=StringView::Empty)
    Asset::OnDeleteObject()
    Asset::onLoad(LoadAssetTask* task)
    Asset::OnLoaded
    Asset::onLoaded()
    Asset::onLoaded_MainThread()
    Asset::OnManagedInstanceDeleted()
    Asset::OnReloading
    JsonAssetBase::onRename(const StringView& newPath)
    Asset::OnScriptingDispose()
    Asset::onUnload_MainThread()
    Asset::OnUnloaded
    ScriptingObject::RegisterObject()
    Asset::releaseStorage()
    Asset::Reload()
    Asset::RemoveReference()
    JsonAssetBase::Save(JsonWriter& writer)
    JsonAssetBase::Save(const StringView& path=StringView::Empty)
    JsonAssetBase::saveInternal(JsonWriter& writer)
    ScriptingObject::ScriptingObject(const SpawnParams& params)
    JsonAssetBase::SetData(const StringView& value)
    ManagedScriptingObject::SetManagedInstance(MObject* instance)
    Asset::ShouldDeleteFileOnUnload()
    LocalizedStringTable
    Asset::startLoading()
    ScriptingObject::ToInterface(ScriptingObject* obj, const ScriptingTypeHandle& interfaceType)
    ScriptingObject::ToInterface(ScriptingObject* obj)
    ScriptingObject::ToManaged(const ScriptingObject* obj)
    ScriptingObject::ToNative(MObject* obj)
    Asset::ToString()
    ScriptingObject::UnregisterObject()
    Asset::WaitForLoaded(double timeoutInMilliseconds=30000.0)
    Object::~Object()
    ScriptingObject::~ScriptingObject()
    Assembly: FlaxEngine.dll
    File: Engine/Localization/LocalizedStringTable.h
    Syntax
    public class LocalizedStringTable : public JsonAssetBase

    Fields

    Entries

    The string table. Maps the message id into the localized text. For plural messages the list contains separate items for value numbers.

    Declaration
    public Dictionary<String, Array<String>> Entries
    Field Value
    Dictionary<String, Array<String>>

    FallbackTable

    The fallback language table to use for missing keys. Eg. table for 'en-GB' can point to 'en' as a fallback to prevent problem of missing localized strings.

    Declaration
    public SoftObjectReference<LocalizedStringTable> FallbackTable
    Field Value
    SoftObjectReference<LocalizedStringTable>

    Locale

    The locale of the localized string table (eg. pl-PL).

    Declaration
    public String Locale
    Field Value
    String

    Methods

    AddPluralString(const StringView& id, const StringView& value, int32 n)

    Adds the localized plural string to the table.

    Declaration
    public void AddPluralString(const StringView& id, const StringView& value, int32 n)
    Parameters
    StringView id

    The message id. Used for lookups.

    StringView value

    The localized text.

    int32 n

    The plural value (0, 1, 2..).

    AddString(const StringView& id, const StringView& value)

    Adds the localized string to the table.

    Declaration
    public void AddString(const StringView& id, const StringView& value)
    Parameters
    StringView id

    The message id. Used for lookups.

    StringView value

    The localized text.

    GetPluralString(const String& id, int32 n)

    Gets the localized plural string by using string id lookup. Uses fallback table if text is not included in this table.

    Declaration
    public String GetPluralString(const String& id, int32 n) const
    Parameters
    String id

    The message identifier.

    int32 n

    The value count for plural message selection.

    Returns
    String

    The localized text.

    GetString(const String& id)

    Gets the localized string by using string id lookup. Uses fallback table if text is not included in this table.

    Declaration
    public String GetString(const String& id) const
    Parameters
    String id

    The message identifier.

    Returns
    String

    The localized text.

    loadAsset()

    Loads asset

    Declaration
    protected virtual LoadResult loadAsset() override
    Returns
    LoadResult

    Loading result

    Overrides
    JsonAssetBase::loadAsset()

    OnGetData(rapidjson_flax::StringBuffer& buffer)

    Declaration
    protected virtual void OnGetData(rapidjson_flax::StringBuffer& buffer) const override
    Parameters
    rapidjson_flax::StringBuffer buffer

    Overrides
    JsonAssetBase::OnGetData(rapidjson_flax::StringBuffer& buffer)

    unload(bool isReloading)

    Unloads asset data

    Declaration
    protected virtual void unload(bool isReloading) override
    Parameters
    bool isReloading

    True if asset is reloading data, otherwise false.

    Overrides
    JsonAssetBase::unload(bool isReloading)

    See Also

    JsonAssetBase
    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © 2012-2024 Wojciech Figat