Skip to content

API reference

Last updated

These are the members of EditorLocalization.Service (IEditorLocalizationService). The namespace is com.amari_noa.unity_editor_localization_core.editor.

Member Description
CurrentLanguageCode The current language code.
RegisteredSourceIds The list of registered SourceId values.
RegisterSource(source) / UnregisterSource(sourceId) Registers or unregisters a source. Returns true on success.
GetAvailableLanguages(sourceId) The language codes found in the translation folder.
SetLanguage(sourceId, languageCode) Switches the display language and returns an EditorLocalizationSetLanguageResult.
Get(sourceId, key, fallback) Gets a translated string.
Reload(sourceId) / ReloadAll() Clears the cache and reloads the translation files.
ValidateLanguageDiff(sourceId, targetLanguageCode) Returns the key differences between the base and target languages as an EditorLocalizationValidationResult.
LanguageChanged An event that fires with the new language code when the language changes.

See these pages for how to use them.