Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: wouter on April 30, 2014, 08:29:38 AM
-
Hi Aren,
Love the new updates!
But the localization seems to work differently. I use a cvs file and although it is recognized in unity(auto fill) and it works when I start the scene and use a drop down to do a language selection.
However I get 2 errors (plus 100 warnings localization is not found), this only happens on start:
ArgumentException: An element with the same key already exists in the dictionary.
System.Collections.Generic.Dictionary`2[System.String,System.String[]].Add (System.String key, System.String[] value) (at /Users/builduser/buildslave/monoAndRuntimeClassLibs/build/mcs/class/corlib/System.Collections.Generic/Dictionary.cs:404)
Localization.AddCSV (.BetterList`1 values) (at Assets/Plugins/Internal/Localization.cs:355)
Localization.LoadCSV (UnityEngine.TextAsset asset) (at Assets/Plugins/Internal/Localization.cs:310)
Localization.set_language (System.String value) (at Assets/Plugins/Internal/Localization.cs:220)
Localization.Awake () (at Assets/Plugins/Internal/Localization.cs:121)
I have a Localization script attached to a gameObject in my scene, I have a UILocalize attached to labels, and a language selection on a drop down box.
The .cvs file is location in the Resources (but I could not add to the Localization script, like I previously did with .txt files?)
What am i doing wrong?? (btw the Localization script is in the Plugins folder..)
-
Localization script no longer needs to be on any game object. In fact, it's now static, and is no longer a MonoBehaviour.
By CVS I assume you mean CSV. CVS is a versioning system.
Check which key it complains about. Perhaps you have it listed in your localization file twice?
-
Localization script no longer needs to be on any game object. In fact, it's now static, and is no longer a MonoBehaviour.
By CVS I assume you mean CSV. CVS is a versioning system.
Check which key it complains about. Perhaps you have it listed in your localization file twice?
allright, there were indeed double keys, after removing everything works fine.
However, when I save from excel (an .cvs file) I get a null errror from ngui. When I import it into google drive and then export back, this does not happen?
Why is this?
-
Compare the contents of the file -- it's all just plain text, and you will likely see what's different about them.