saigon1983
Chieftain
Good day to all! I have a problem converting TXT_KEY strings in lua files. Let's say I have this line of code:
sReconHeader = Locale.Lookup("TXT_KEY_CO_STAT_TEXT_12") .. sTargetCityName .. Locale.Lookup("TXT_KEY_CO_STAT_TEXT_13") .. sSpyName
The following tags are defined in the XML file:
<Row Tag="TXT_KEY_CO_STAT_TEXT_12">
<Text>Отчёт об операции в городе </Text>
</Row>
<Row Tag="TXT_KEY_CO_STAT_TEXT_13">
<Text>. Ответственный агент: </Text>
</Row>
Я хочу получить подобное сообщение на выходе:
"Отчёт об операции в городе SomeCity. Ответственный агент: SomeAgent"
And in fact, all the spaces at the end of these tags are automatically deleted, and I get:
"Отчёт об операции в городеSomeCity. Ответственный агент:SomeAgent"
Is there a way to avoid this? Maybe you need to add some special character at the end of the tag? I use Russian, if anything (Language_ru_RU).
And yes, this writing method also removes spaces:
sReconHeader = "{TXT_KEY_CO_STAT_TEXT_12}" .. sTargetCityName .. "{TXT_KEY_CO_STAT_TEXT_13}" .. sSpyName
sReconHeader = Locale.Lookup("TXT_KEY_CO_STAT_TEXT_12") .. sTargetCityName .. Locale.Lookup("TXT_KEY_CO_STAT_TEXT_13") .. sSpyName
The following tags are defined in the XML file:
<Row Tag="TXT_KEY_CO_STAT_TEXT_12">
<Text>Отчёт об операции в городе </Text>
</Row>
<Row Tag="TXT_KEY_CO_STAT_TEXT_13">
<Text>. Ответственный агент: </Text>
</Row>
Я хочу получить подобное сообщение на выходе:
"Отчёт об операции в городе SomeCity. Ответственный агент: SomeAgent"
And in fact, all the spaces at the end of these tags are automatically deleted, and I get:
"Отчёт об операции в городеSomeCity. Ответственный агент:SomeAgent"
Is there a way to avoid this? Maybe you need to add some special character at the end of the tag? I use Russian, if anything (Language_ru_RU).
And yes, this writing method also removes spaces:
sReconHeader = "{TXT_KEY_CO_STAT_TEXT_12}" .. sTargetCityName .. "{TXT_KEY_CO_STAT_TEXT_13}" .. sSpyName