Author Topic: Localization - switching scenes  (Read 3287 times)

wouter

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 39
    • View Profile
Localization - switching scenes
« on: May 05, 2014, 02:04:13 PM »
I have an .cvs file placed in NGUI/Resources , it all works, however;

-I need to add an "Localization" script to the scene, or my language selection doesn't work? While in the example scene there is none, plus you told me last time it was not needed?

-When I switch from main menu->loading->scene, the localization works. When I switch back from scene->main menu, it doesn't work, "localization key not found". However when I switch language from the drop down menu it works again....?

How can this happen?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Localization - switching scenes
« Reply #1 on: May 05, 2014, 11:44:11 PM »
CSV and CVS are two different things. I assume you mean CSV -- Comma Separated Value file.

No, Localization shouldn't be in the scene. It's a static script. You can't have it be a part of the scene anymore.

Localization stuff is kept in static variables inside the Localization script. Nothing erases those values, but they can be erased if you set the dictionary or load another localization file. I can only suggest adding some Debug.Log statements to that file to see if/when any methods there get called that would cause the dictionary to be wiped.

I use the same localization system in Starlink, and I can navigate from menu to game, and back to menu, and all localization is always kept -- from the current language to the loaded data. If you do find a way for me to reproduce the problem though, let me know and I can have a deeper look.