Translation of NGUI Popup List

10 years 2 days ago #124 by exiin
I've made a small script that link the popup list of NGUI and I2 Localization, But I have an Issue get the data back.
I was wondering if you have a function that do the inverse of ScriptLocalization. Get (); ?

Or maybe there is already a script that handles translation of popup list ?
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using I2.Loc;

public class NGUIPopupListI2Localize : MonoBehaviour {
	UIPopupList mList;
	// Use this for initialization
	void Start ()
	// ADD Init in the 'onchange' of the Language dropDown
	public void Init() {
		mList = GetComponent<UIPopupList> ();

		string currentValue = mList.value;
		List<string> currentItems =  mList.items.GetRange(0, mList.items.Count);
		mList.items.Clear (); 

		currentItems.ForEach (
			delegate(string Key) { 			 

		mList.value =  ScriptLocalization.Get(currentValue);


Please Log in or Create an account to join the conversation.

Time to create page: 0.112 seconds
Template by JoomlaShine