### Intro

Currently working on localization, just to share my implementation.

There are some advanced ways doing so as well, e.g. CSV support was added in 3.5.0. But this time I am still working with txt version.

### Basic

We will need Unity3D installed and equipped with NGUI 2.7.0+
We will meet these two classes:
Localization is the manager class where we set up localization information, langauges, localized string resource.

UILocalize

### Setup

We need to prepare our localized strings, format goes like this: KEY = string

If you want to include leading space in your localized string, you can hack like this:

#### Attach Localization class

Attach the Localization manager to your game, it works as a singleton.

Create a GameObject, attach Localization script to that object.

Setup the locale resource file. In this case, I have 3 locales to work on.

It creates a "_Localization" object in your game and stay alive through out the whole game after initilization.

So, we don't need to define it everywhere in the game. (but you still can define it in your separated scene for testing purpose. Note that if a Localization instance is alive, a new one WILLNOT be initialized)

#### Attach UILocalize

I have a UILabel which displays "Start Game"

I want to translate "Start Game" into a different language.
Let's attach a script and set up the KEY

#### Assign Language

There are several ways to detect/ pick languages.
NGUI also provides a helper, NGUI LaguageSection. It helps you to create a drop down list for languages.

For iOS game, I detect language using this little script:
Current device language in iOS @ StackOverflow

After you figured out which locale to use, set current in Localization instance.

#### Run

This also works on UISprite and UIButton.

(好像是因為本身Rock底的關係所以比較容易入手)

（Intro）

（Bridge）