xml
using UnityEngine;
using UnityEngine.UI;
using System.Xml;
using System.IO;
public class xmlSquare : MonoBehaviour
{
public TextAsset xmlraw;
private string data;
void Start()
{
data = xmlraw.text;
changeLanguage(PlayerPrefs.GetString("lang"));
}
public Text buttonSideA;
public Text buttonCurcumference;
public Text buttonContent;
public Text buttonDiagonal;
public void changeLanguage(string language)
{
XmlDocument doc = new XmlDocument();
doc.Load(new StringReader(data));
XmlNode jazyk = doc.SelectNodes("/Square/" + language)[0];
buttonSideA.text = jazyk.SelectSingleNode("sideA").InnerText;
buttonCurcumference.text = jazyk.SelectSingleNode("curcumference").InnerText;
buttonContent.text = jazyk.SelectSingleNode("content").InnerText;
buttonDiagonal.text = jazyk.SelectSingleNode("diagonal").InnerText;
}
}