Search Unity

[RELEASED] Localizer

Discussion in 'Assets and Asset Store' started by Oksana-Iashchuk, Nov 17, 2016.

  1. Oksana-Iashchuk

    Oksana-Iashchuk

    Joined:
    Sep 10, 2012
    Posts:
    126
    Intro Video:






    ABSTRACT​

    Localizer is user friendly localization asset which provide smooth experience.
    The plugin main target is simplification of localization process for Unity UI components. Localization asset will do localization for UnityEngine.UI components: Text, Image, RectTransform, AudioSource.

    SCRIPTING​

    Auto-generated LanguageEnum.cs script provide language enum:
    Code (CSharp):
    1. public static class Language
    2. {
    3.   public enum Enum
    4.   {
    5.      English,
    6.      Spanish,
    7.   }
    8. }
    1. Set current: Localization.Instance.CurrentLanguage = Language.Enum.English;
    2. Get current: Language.Enum language = Localization.Instance.CurrentLanguage;
    3. Get string by key: var str = Localization.GetString ("somekey");

    SETUP​

    1. Open Localization Editor Windows through editor menu: Window > Localization

    . upload_2016-11-17_7-52-21.png
    2. Setup project languages.
    2.1 To add a language fill “New Language” field and press “add” button which will shown in case if
    name match language name conditions.
    2.2 To remove a language click on “Show Delete Button”. It will make “delete” button visible. Click on
    “delete” button of selected language. English language is protected to be deleted.
    3. To select language which will as current for new installation select “Default:” popup.
    4. Current language stored in PlayerPrefs as Integer under key: "CurrentLanguage". In Editor select
    current language via “Current:” popup or through code:
    Localization.Instance.CurrentLanguage = Language.Enum.English;
    5. Setup UI scene. To localize UI components (Text, Image, RectTransform, AudioSource) require add
    “Localizer” component to GameObject. Add “Localizer” component select wanted object and choose
    menu: Tools > Localization > Setup selected (recursice).

    upload_2016-11-17_7-53-27.png

    6. The Localizer component will automatically recognize components to localize and provide optional
    selectors to choose which component's attributes need to be localized (by default ALL).

    upload_2016-11-17_7-54-0.png


    EXPORT / IMPORT
    Localizer allow to export and import strings to Excel file.
    To proceed export or import open Localization Editor Window via menu Window > Localization:

    upload_2016-11-17_7-54-41.png

    Export button will provide File selection dialog for xls file, choose file name and save. Please keep in
    mind that language names has to remain the same all the time, but language columns could be removed
    or extended with some extra languages or description columns. Only columns with column name
    matched Language in Language.Enum will re-import back. First column name “Key” MUST remain.


    email
     
    Last edited: Dec 20, 2022
  2. Oksana-Iashchuk

    Oksana-Iashchuk

    Joined:
    Sep 10, 2012
    Posts:
    126
    Unity 2020.3 update!
    NGUI - is optional
     
    Last edited: Dec 20, 2022