Skip to content

Latest commit

 

History

History
89 lines (64 loc) · 2.73 KB

README.md

File metadata and controls

89 lines (64 loc) · 2.73 KB

Simple Text Localized

Built In

Version Languages Engine License

Installation

Please check documentation below

https://docs.unity3d.com/2019.3/Documentation/Manual/upm-ui-giturl.html

What is it?

Simple Text Localized is a tool package that help developer to make localization in their game. This tools have custom window editor to help editing dictionary key localization. Text Localized use csv file to write localization data and have 2 mode (online mode and offline mode) based on csv file location.

For details information and example, download sample project in folder Samples.

Feature

  • local and cloud csv file location.
  • add, edit and remove value by key in localised file (offline mode only).
  • add and remove language in localised file (offline mode only).
  • create new localised file.
  • only show active language in csv file (hide language dont use) in localiser window and localization manager.
  • easy to use in another project.
  • have 100 languages support.

Getting Started

Window Localiser

To open localiser click Window > Localiser.

image

Localiser window editor have two mode :

  • load : to load current localization file

    image

  • create : to create new localization file

    image

Localiser Manager

image

Localization Manager class / script, control all activity in this tools. including change mode, change current csv file, change active language in csv file and cloud location for csv file.

note : please make sure, csv url is csv file has published by url and set permission to everyone.

Example Code use this tools

Don't forget to use LocalisedString Class to access this tools.

using UnityEngine;
using UnityEngine.UI;
using personaltools.textlocalizedtool;

public class TextLocaliser : MonoBehaviour
{
    Text textField;

    public LocalisedString localisedString;

    void Start()
    {
        textField = GetComponent<Text>();
        ShowText();
        LocalizationManager.Instance.onChangeLanguage += ShowText;
    }

    public void ShowText()
    {
        textField.text = localisedString.Value;
    }

    private void OnDestroy()
    {
        LocalizationManager.Instance.onChangeLanguage -= ShowText;
    }
}

Languages Support

Please check link below, to know languages support and their key code

https://cloud.google.com/translate/docs/languages

Contributor

Anas Rasyid

License

MIT