Home   Help Search Login Register  

Author Topic: Howto: Line break and markers in stringtable.xml ?  (Read 2504 times)

0 Members and 1 Guest are viewing this topic.

Offline zwobot

  • Members
  • *
Howto: Line break and markers in stringtable.xml ?
« on: 03 Jan 2010, 14:47:27 »
How do you insert line breaks in the stringtable.xml? I tried to mask a new line with \n, <br> and <br/> tags but none of it works. The <br> tags even break the briefing completely when the strings are used for the briefing.

Also how can I use markers in a stringtable.xml powered multilanguage briefing? Having the marker tags directly in the stringtable.xml breaks the parsing just like the <br> tags above. Do you have to format the strings for the briefing with the format command?
"Executing tactics in real combat is the hardest thing one can ever do...well I've never given birth but..well whatever."

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re: Howto: Line break and markers in stringtable.xml ?
« Reply #1 on: 03 Jan 2010, 18:05:21 »
As far as I can see in a plain text file it just looks like so ...

Code: [Select]
<Project name="Core"><Package name="UI"><Key ID="str_xbox_wizard_edit"><German>Missionseinstellungen
 ändern</German><English>Edit Mission Settings</English><Italian>Modifica impostazioni missione</Italian>
<Spanish>Editar configuración de la misión</Spanish><French>Modifier paramètres mission</French>
<Czech>Upravit nastavení mise</Czech><Russian>Сменить настройки задания</Russian><Polish>Edytuj
 ustawienia misji</Polish><Hungarian>Küldetés beállításainak átkonfigurálása</Hungarian></Key>


However it displays in my browser as so ...

Code: [Select]
-<Project name="Core">
 -<Package name="UI">
  -<Key ID="str_xbox_wizard_edit">
    <German>Missionseinstellungen ändern</German>
    <English>Edit Mission Settings</English>
    <Italian>Modifica impostazioni missione</Italian>
    <Spanish>Editar configuración de la misión</Spanish>
    <French>Modifier paramètres mission</French>
    <Czech>Upravit nastavení mise</Czech>
    <Russian>Сменить настройки задания</Russian>
    <Polish>Edytuj ustawienia misji</Polish>
    <Hungarian>Küldetés beállításainak átkonfigurálása</Hungarian>
   </Key>
I know a little about a lot, and a lot about a little.

Offline Deadfast

  • Members
  • *
Re: Howto: Line break and markers in stringtable.xml ?
« Reply #2 on: 03 Jan 2010, 20:10:34 »
You can't have < or > chars inside the string. You have to write them as &lt; for < and &gt; for >.

For that linebreak you were asking for it'd be:
Code: [Select]
Line1&lt;br/&gt;Line2
« Last Edit: 03 Jan 2010, 20:12:13 by Deadfast »

Offline zwobot

  • Members
  • *
Re: Howto: Line break and markers in stringtable.xml ?
« Reply #3 on: 04 Jan 2010, 09:35:53 »
Thanks Deadfast, that worked for the line breaks. However my markers still aren't linked in the Briefing. E. g.:
Code: [Select]
&lt;marker name='pl_viper'/&gt;PL Viper&lt;/marker/&gt;
for
<marker name='pl_viper'/>PL Viper</marker/>
Shows the text PL Viper in the briefing but not the link. Are there more characters I need to mask in order for that to work, the = and ' maybe?

Also I masked Umlaute (ü, ä, Ü, Ä ...) with &uuml; &auml; etc. but they are displayed as question marks in the briefing. Is this caused by the UTF-8 encoding I use in the xml? Would it help to use another encoding (Unicode for example)?
"Executing tactics in real combat is the hardest thing one can ever do...well I've never given birth but..well whatever."

Offline Deadfast

  • Members
  • *
Re: Howto: Line break and markers in stringtable.xml ?
« Reply #4 on: 04 Jan 2010, 11:59:02 »
Umlauts (and other such language symbols) should work just fine with the correct encoding. You don't need to mask them or anything.

Offline zwobot

  • Members
  • *
Re: Howto: Line break and markers in stringtable.xml ?
« Reply #5 on: 04 Jan 2010, 12:44:12 »
That's strange because they don't work for me. They aren't displayed at all. Guess I'll workaround that by using ue ae etc. instead of ü and ä...
"Executing tactics in real combat is the hardest thing one can ever do...well I've never given birth but..well whatever."