This is what traslatestring doe:
So Indeed I suggest using XI_ConvertString. The function TranslateString will go trough all files it seems while XI_ConvertString is only using the common.ini
You can also use LanguageConvertString(tmpLangFileID, strData1); where you select which file to use to transtlate it.
Code:
string TranslateString(string strData1, string strData2)
{
string tmpData = " ";
if (strData1 == "" || strData2 == "") tmpData = "";
string joinString = strData1 + tmpData + strData2;//default for English
string resultString = "";
string str1 = strData1;
string str2 = strData2;
string rStr1 = "";
string rStr2 = "";
bool swap = false;
resultString = SpellString("", "", &str1, &str2, joinString);
if (resultString != "") return resultString;
rStr1 = str1;
rStr2 = str2;
str1 = strData1;
str2 = strData2;
resultString = SpellString("", "interface_strings.txt", &str1, &str2, joinString);
if (resultString != "") return resultString;
if (rStr1 == "") rStr1 = str1;
if (rStr2 == "") rStr2 = str2;
str1 = strData1;
str2 = strData2;
resultString = SpellString("", "characters_names.txt", &str1, &str2, joinString);
if (resultString != "") return resultString;
if (rStr1 == "") rStr1 = str1;
if (rStr2 == "") rStr2 = str2;
str1 = strData1;
str2 = strData2;
resultString = SpellString(GetStorylinePath(FindCurrentStoryline()), "characters_names.txt", &str1, &str2, joinString);
if (resultString != "") return resultString;
if (rStr1 == "") rStr1 = str1;
if (rStr2 == "") rStr2 = str2;
str1 = strData1;
str2 = strData2;
resultString = SpellString("", "ItemsDescribe.txt", &str1, &str2, joinString);
if (resultString != "") return resultString;
if (rStr1 == "") rStr1 = str1;
if (rStr2 == "") rStr2 = str2;
str1 = strData1;
str2 = strData2;
resultString = SpellString(GetStorylinePath(FindCurrentStoryline()), "ItemsDescribe.txt", &str1, &str2, joinString);
if (resultString != "") return resultString;
if (rStr1 == "") rStr1 = str1;
if (rStr2 == "") rStr2 = str2;
str1 = strData1;
str2 = strData2;
resultString = SpellString("", "GoodsDescribe.txt", &str1, &str2, joinString);
if (resultString != "") return resultString;
if (rStr1 == "") rStr1 = str1;
if (rStr2 == "") rStr2 = str2;
string sPref = "";
if (DEBUGINFO) sPref = "@";
if (rStr1 == "" && strData1 != "") rStr1 = sPref + strData1;
if (rStr2 == "" && strData2 != "") rStr2 = sPref + strData2;
switch(LanguageGetLanguage())
{
case "Russian":
resultString = rStr2 + tmpData + rStr1;
break;
case "Polish":
resultString = rStr2 + tmpData + rStr1;
break;
resultString = rStr1 + tmpData + rStr2;//default for English
}
return resultString;
}
So Indeed I suggest using XI_ConvertString. The function TranslateString will go trough all files it seems while XI_ConvertString is only using the common.ini
You can also use LanguageConvertString(tmpLangFileID, strData1); where you select which file to use to transtlate it.