OFPEC Forum

Editors Depot - Mission Editing and Scripting => Arma2 - Editing/Scripting General => Topic started by: zwobot on 03 Jan 2010, 14:47:27

Title: Howto: Line break and markers in stringtable.xml ?
Post by: zwobot 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?
Title: Re: Howto: Line break and markers in stringtable.xml ?
Post by: Planck 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>
Title: Re: Howto: Line break and markers in stringtable.xml ?
Post by: Deadfast 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
Title: Re: Howto: Line break and markers in stringtable.xml ?
Post by: zwobot 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)?
Title: Re: Howto: Line break and markers in stringtable.xml ?
Post by: Deadfast 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.
Title: Re: Howto: Line break and markers in stringtable.xml ?
Post by: zwobot 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 ä...