LeviLamina
Loading...
Searching...
No Matches
I18nImpl Class Reference
Inheritance diagram for I18nImpl:

Classes

struct  CurrentLanguageInfo

Public Types

enum class  NotifyMode : uchar { Always = 0 , LocaleChanged = 1 }
using LockedCurrentLanguageInfo

Public Member Functions

virtual void clearLanguages ()
virtual ::std::vector<::std::string > findAvailableLanguages (::ResourcePackManager &resourcePackManager)
virtual ::std::unordered_map<::std::string, ::std::string > findAvailableLanguageNames (::ResourcePackManager &resourcePackManager)
virtual ::Bedrock::Threading::Async< void > loadLanguages (::ResourcePackManager &resourcePackManager, ::Bedrock::NotNullNonOwnerPtr<::ResourceLoadManager > resourceLoadManager, ::std::string const &initLang)
virtual void loadAllLanguages (::ResourcePackManager &resourcePackManager)
virtual ::std::vector<::std::string > getLanguageCodesFromPack (::PackAccessStrategy const &accessStrategy)
virtual void loadLanguageKeywordsFromPack (::PackManifest const &manifest, ::PackAccessStrategy const &accessStrategy)
virtual void loadLanguageKeywordsFromPack (::PackManifest const &manifest, ::PackAccessStrategy const &accessStrategy, ::std::vector<::std::string > const &languageCodes, ::std::optional<::std::vector<::std::string > > const &additionalLocKeys)
virtual void appendLanguageStringsFromPack (::PackManifest const &manifest, ::std::multimap<::std::string, ::std::pair<::std::string, ::std::string > > const &localizationMapping)
virtual ::std::unordered_map<::std::string, ::std::string > getLanguageKeywordsFromPack (::PackManifest const &manifest, ::std::string const &keyword)
virtual void loadLangaugesByLocale (::std::unordered_multimap<::std::string, ::std::pair<::std::string, ::std::string > > const &storeLocalization)
virtual void appendAdditionalTranslations (::std::unordered_map<::std::string, ::std::string > const &translations, ::std::string const &keyPrefix)
virtual void appendLanguageStrings (::PackAccessStrategy *accessStrategy)
virtual void addI18nObserver (::I18nObserver &observer)
virtual void chooseLanguage (::std::string const &code)
virtual::std::string get (::std::string const &id, ::std::vector<::std::string > const &params, ::std::shared_ptr<::Localization const > const locale)
virtual::std::string get (::std::string const &langString, ::std::shared_ptr<::Localization const > const locale)
virtual::std::string getPackKeywordValue (::PackManifest const &manifest, ::std::string const &key)
virtual::std::string getPackKeywordValueForTelemetry (::PackManifest const &manifest, ::std::string const &key)
virtual bool hasPackKeyEntry (::PackManifest const &manifest, ::std::string const &key)
virtual ::std::vector<::std::string > const & getSupportedLanguageCodes ()
virtual::std::string const & getLanguageName (::std::string const &code)
virtual ::std::shared_ptr<::Localization const > const getLocaleFor (::std::string const &code)
virtual::std::string const & getLocaleCodeFor (::std::string const &code)
virtual ::gsl::not_null<::std::shared_ptr<::Localization const > > getCurrentLanguage ()
virtual bool languageSupportsHypenSplitting ()
virtual::std::string getLocalizedAssetFileWithFallback (::std::string const &fileNamePrefix, ::std::string const &fileNameSuffix)
virtual bool isPackKeyword (::std::string const &key)
MCAPI void _chooseLanguage (::std::shared_ptr<::ImmutableLocalization > chosen, ::I18nImpl::NotifyMode notify)
MCAPI void _findAvailableLanguageNames (::Json::Value const &root, ::std::unordered_map<::std::string, ::std::string > &destination)
MCAPI void _findAvailableLanguages (::Json::Value const &root, ::std::vector<::std::string > &destination)
MCAPI ::std::shared_ptr<::ImmutableLocalization_findLocaleFor (::std::string const &code)
MCAPI::std::string _generatePackKeyPrefix (::PackManifest const &manifest)
MCAPI::std::string & _getLocaleCodeFor (::std::string const &code)
MCAPI void _notifyLanguagesLoaded ()
MCAPI void _setLanguageSupportsHypenSplitting (::Localization const &localization)
MCAPI void * $ctor ()
MCAPI void $dtor ()
MCAPI void $clearLanguages ()
MCAPI ::std::vector<::std::string > $findAvailableLanguages (::ResourcePackManager &resourcePackManager)
MCAPI ::std::unordered_map<::std::string, ::std::string > $findAvailableLanguageNames (::ResourcePackManager &resourcePackManager)
MCAPI ::Bedrock::Threading::Async< void > $loadLanguages (::ResourcePackManager &resourcePackManager, ::Bedrock::NotNullNonOwnerPtr<::ResourceLoadManager > resourceLoadManager, ::std::string const &initLang)
MCAPI void $loadAllLanguages (::ResourcePackManager &resourcePackManager)
MCAPI ::std::vector<::std::string > $getLanguageCodesFromPack (::PackAccessStrategy const &accessStrategy)
MCAPI void $loadLanguageKeywordsFromPack (::PackManifest const &manifest, ::PackAccessStrategy const &accessStrategy)
MCAPI void $loadLanguageKeywordsFromPack (::PackManifest const &manifest, ::PackAccessStrategy const &accessStrategy, ::std::vector<::std::string > const &languageCodes, ::std::optional<::std::vector<::std::string > > const &additionalLocKeys)
MCAPI void $appendLanguageStringsFromPack (::PackManifest const &manifest, ::std::multimap<::std::string, ::std::pair<::std::string, ::std::string > > const &localizationMapping)
MCAPI ::std::unordered_map<::std::string, ::std::string > $getLanguageKeywordsFromPack (::PackManifest const &manifest, ::std::string const &keyword)
MCAPI void $loadLangaugesByLocale (::std::unordered_multimap<::std::string, ::std::pair<::std::string, ::std::string > > const &storeLocalization)
MCAPI void $appendAdditionalTranslations (::std::unordered_map<::std::string, ::std::string > const &translations, ::std::string const &keyPrefix)
MCAPI void $appendLanguageStrings (::PackAccessStrategy *accessStrategy)
MCAPI void $addI18nObserver (::I18nObserver &observer)
MCAPI void $chooseLanguage (::std::string const &code)
MCAPI::std::string $get (::std::string const &id, ::std::vector<::std::string > const &params, ::std::shared_ptr<::Localization const > const locale)
MCAPI::std::string $get (::std::string const &langString, ::std::shared_ptr<::Localization const > const locale)
MCAPI::std::string $getPackKeywordValue (::PackManifest const &manifest, ::std::string const &key)
MCAPI::std::string $getPackKeywordValueForTelemetry (::PackManifest const &manifest, ::std::string const &key)
MCAPI bool $hasPackKeyEntry (::PackManifest const &manifest, ::std::string const &key)
MCFOLD ::std::vector<::std::string > const & $getSupportedLanguageCodes ()
MCAPI::std::string const & $getLanguageName (::std::string const &code)
MCAPI ::std::shared_ptr<::Localization const > const $getLocaleFor (::std::string const &code)
MCAPI::std::string const & $getLocaleCodeFor (::std::string const &code)
MCAPI ::gsl::not_null<::std::shared_ptr<::Localization const > > $getCurrentLanguage ()
MCFOLD bool $languageSupportsHypenSplitting ()
MCAPI::std::string $getLocalizedAssetFileWithFallback (::std::string const &fileNamePrefix, ::std::string const &fileNameSuffix)
MCAPI bool $isPackKeyword (::std::string const &key)

Static Public Member Functions

static MCAPI void ** $vftable ()
static MCAPI ::std::add_lvalue_reference_t< char const[]> NeutralLangCode ()

Public Attributes

::ll::TypedStorage< 8, 16, ::std::shared_ptr<::Localization const > > mEmptyLanguage
::ll::TypedStorage< 8, 40, ::Bedrock::Threading::SharedLockbox<::I18nImpl::CurrentLanguageInfo, ::std::shared_mutex > > mCurrentLanguageInfo
::ll::TypedStorage< 8, 24, ::std::vector<::std::shared_ptr<::ImmutableLocalization > > > mLanguages
::ll::TypedStorage< 8, 24, ::std::vector<::std::string > > mLanguageCodes
::ll::TypedStorage< 8, 64, ::std::unordered_map<::std::string, ::std::string > > mLanguageNames
::ll::TypedStorage< 8, 32, ::Bedrock::Threading::SharedLockbox<::std::vector<::std::shared_ptr<::ImmutableLocalization > >, ::std::shared_mutex > > mPackKeywordLanguages
::ll::TypedStorage< 8, 24, ::std::vector<::std::string > const > mPackReservedKeys
::ll::TypedStorage< 1, 1, bool > mLanguageSupportsHypenSplitting
::ll::TypedStorage< 8, 8, ::ResourcePackManager * > mResourcePackManager
::ll::TypedStorage< 8, 8, ::std::shared_mutex > mAdditionalTranslationsBackupMutex
::ll::TypedStorage< 8, 24, ::std::vector<::ImmutableLocalization > > mAdditionalTranslationsBackup
::ll::TypedStorage< 8, 8, ::std::shared_mutex > mLocalizationMutex
::ll::TypedStorage< 8, 104, ::Core::Subject<::I18nObserver, ::Bedrock::Threading::Mutex > > mSubject

Member Typedef Documentation

◆ LockedCurrentLanguageInfo

using I18nImpl::LockedCurrentLanguageInfo

Member Function Documentation

◆ clearLanguages()

virtual void I18nImpl::clearLanguages ( )
virtual

Implements I18n.

◆ findAvailableLanguages()

virtual ::std::vector<::std::string > I18nImpl::findAvailableLanguages ( ::ResourcePackManager & resourcePackManager)
virtual

Implements I18n.

◆ findAvailableLanguageNames()

virtual ::std::unordered_map<::std::string, ::std::string > I18nImpl::findAvailableLanguageNames ( ::ResourcePackManager & resourcePackManager)
virtual

Implements I18n.

◆ loadLanguages()

virtual ::Bedrock::Threading::Async< void > I18nImpl::loadLanguages ( ::ResourcePackManager & resourcePackManager,
::Bedrock::NotNullNonOwnerPtr<::ResourceLoadManager > resourceLoadManager,
::std::string const & initLang )
virtual

Implements I18n.

◆ loadAllLanguages()

virtual void I18nImpl::loadAllLanguages ( ::ResourcePackManager & resourcePackManager)
virtual

Implements I18n.

◆ getLanguageCodesFromPack()

virtual ::std::vector<::std::string > I18nImpl::getLanguageCodesFromPack ( ::PackAccessStrategy const & accessStrategy)
virtual

Implements I18n.

◆ loadLanguageKeywordsFromPack() [1/2]

virtual void I18nImpl::loadLanguageKeywordsFromPack ( ::PackManifest const & manifest,
::PackAccessStrategy const & accessStrategy )
virtual

Implements I18n.

◆ loadLanguageKeywordsFromPack() [2/2]

virtual void I18nImpl::loadLanguageKeywordsFromPack ( ::PackManifest const & manifest,
::PackAccessStrategy const & accessStrategy,
::std::vector<::std::string > const & languageCodes,
::std::optional<::std::vector<::std::string > > const & additionalLocKeys )
virtual

Implements I18n.

◆ appendLanguageStringsFromPack()

virtual void I18nImpl::appendLanguageStringsFromPack ( ::PackManifest const & manifest,
::std::multimap<::std::string, ::std::pair<::std::string, ::std::string > > const & localizationMapping )
virtual

Implements I18n.

◆ getLanguageKeywordsFromPack()

virtual ::std::unordered_map<::std::string, ::std::string > I18nImpl::getLanguageKeywordsFromPack ( ::PackManifest const & manifest,
::std::string const & keyword )
virtual

Implements I18n.

◆ loadLangaugesByLocale()

virtual void I18nImpl::loadLangaugesByLocale ( ::std::unordered_multimap<::std::string, ::std::pair<::std::string, ::std::string > > const & storeLocalization)
virtual

Implements I18n.

◆ appendAdditionalTranslations()

virtual void I18nImpl::appendAdditionalTranslations ( ::std::unordered_map<::std::string, ::std::string > const & translations,
::std::string const & keyPrefix )
virtual

Implements I18n.

◆ appendLanguageStrings()

virtual void I18nImpl::appendLanguageStrings ( ::PackAccessStrategy * accessStrategy)
virtual

Implements I18n.

◆ addI18nObserver()

virtual void I18nImpl::addI18nObserver ( ::I18nObserver & observer)
virtual

Implements I18n.

◆ chooseLanguage()

virtual void I18nImpl::chooseLanguage ( ::std::string const & code)
virtual

Implements I18n.

◆ get() [1/2]

virtual::std::string I18nImpl::get ( ::std::string const & id,
::std::vector<::std::string > const & params,
::std::shared_ptr<::Localization const > const locale )
virtual

Implements I18n.

◆ get() [2/2]

virtual::std::string I18nImpl::get ( ::std::string const & langString,
::std::shared_ptr<::Localization const > const locale )
virtual

Implements I18n.

◆ getPackKeywordValue()

virtual::std::string I18nImpl::getPackKeywordValue ( ::PackManifest const & manifest,
::std::string const & key )
virtual

Implements I18n.

◆ getPackKeywordValueForTelemetry()

virtual::std::string I18nImpl::getPackKeywordValueForTelemetry ( ::PackManifest const & manifest,
::std::string const & key )
virtual

Implements I18n.

◆ hasPackKeyEntry()

virtual bool I18nImpl::hasPackKeyEntry ( ::PackManifest const & manifest,
::std::string const & key )
virtual

Implements I18n.

◆ getSupportedLanguageCodes()

virtual ::std::vector<::std::string > const & I18nImpl::getSupportedLanguageCodes ( )
virtual

Implements I18n.

◆ getLanguageName()

virtual::std::string const & I18nImpl::getLanguageName ( ::std::string const & code)
virtual

Implements I18n.

◆ getLocaleFor()

virtual ::std::shared_ptr<::Localization const > const I18nImpl::getLocaleFor ( ::std::string const & code)
virtual

Implements I18n.

◆ getLocaleCodeFor()

virtual::std::string const & I18nImpl::getLocaleCodeFor ( ::std::string const & code)
virtual

Implements I18n.

◆ getCurrentLanguage()

virtual ::gsl::not_null<::std::shared_ptr<::Localization const > > I18nImpl::getCurrentLanguage ( )
virtual

Implements I18n.

◆ languageSupportsHypenSplitting()

virtual bool I18nImpl::languageSupportsHypenSplitting ( )
virtual

Implements I18n.

◆ getLocalizedAssetFileWithFallback()

virtual::std::string I18nImpl::getLocalizedAssetFileWithFallback ( ::std::string const & fileNamePrefix,
::std::string const & fileNameSuffix )
virtual

Implements I18n.

◆ isPackKeyword()

virtual bool I18nImpl::isPackKeyword ( ::std::string const & key)
virtual

Implements I18n.

◆ $vftable()

MCAPI void ** I18nImpl::$vftable ( )
static
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ NeutralLangCode()

MCAPI ::std::add_lvalue_reference_t< char const []> I18n::NeutralLangCode ( )
staticinherited
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

The documentation for this class was generated from the following file: