Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: NJ_kung on August 20, 2012, 09:49:47 PM

Title: How I use UILocalized with dynamic text
Post by: NJ_kung on August 20, 2012, 09:49:47 PM
I use it on button / static text it work great. ;D

Now I try on Error popup on login page. (Too short password/too short username / blah blah blah)

I create one popup(sliced sprite + label) and change label.text

How I use UILocalized on it ? ;)

Or may me I must create custom class from UILocalized  :)
Title: Re: How I use UILocalized with dynamic text
Post by: ArenMook on August 21, 2012, 12:25:56 AM
UILabel.text = Localization.instance.Get(yourKey)
Title: Re: How I use UILocalized with dynamic text
Post by: NJ_kung on August 21, 2012, 12:41:04 AM
Yeah for ans  :D

but before you ans and I have try on

UILocalize mLocal;
mLocal = GetComponent<UILocalize>();
mLocal.key = key;
mLocal.Localize();

Title: Re: How I use UILocalized with dynamic text
Post by: jeldrez on March 14, 2013, 12:44:57 PM
UILabel.text = Localization.instance.Get(yourKey)
Doesn't recognize the key, it gives me an error: The name 'LabelKey' Does not exist in the current context.

Thanks