Author Topic: How I use UILocalized with dynamic text  (Read 5188 times)

NJ_kung

  • Guest
How I use UILocalized with dynamic text
« 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  :)
« Last Edit: August 20, 2012, 10:52:38 PM by NJ_kung »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: How I use UILocalized with dynamic text
« Reply #1 on: August 21, 2012, 12:25:56 AM »
UILabel.text = Localization.instance.Get(yourKey)

NJ_kung

  • Guest
Re: How I use UILocalized with dynamic text
« Reply #2 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();


jeldrez

  • Sr. Member
  • ****
  • Thank You
  • -Given: 8
  • -Receive: 4
  • Posts: 352
    • View Profile
Re: How I use UILocalized with dynamic text
« Reply #3 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