How to make a language XML file

Weiyan

Well-known member
How to make an XML file with all the phases for easier translation.

Code:
<?xml version="1.0" encoding="utf-8"?>
<language title="繁體中文" date_format="j/n/y" time_format="g:i A" decimal_point="." thousands_separator=",">
  <phrase title="about" addon_id="XenForo" global_cache="0" version_id="1000034" version_string="1.0.0 Beta 4"><![CDATA[關於]]></phrase>
</language>
 
I don't know of a built in option to generate a language XML file for the purpose of translation.

This file contains all of the phrases:

install/data/phrases.xml

But you can't use this file directly for translations because it's not in the format of a language file. Perhaps you can edit the file to change it into a workable format.
 
The phrases in language file is:
HTML:
?xml version="1.0" encoding="utf-8"?>
<language title="繁體中文" date_format="j/n/y" time_format="g:i A" decimal_point="." thousands_separator=",">
  <phrase title="about" addon_id="XenForo" global_cache="0" version_id="1000034" version_string="1.0.0 Beta 4"><![CDATA[關於]]></phrase>
  <phrase title="about_you" addon_id="XenForo" global_cache="0" version_id="1000034" version_string="1.0.0 Beta 4"><![CDATA[自我介紹]]></phrase>
  <phrase title="accepted_file_types" addon_id="XenForo" global_cache="0" version_id="1000034" version_string="1.0.0 Beta 4"><![CDATA[可接受的檔案類型]]></phrase>
</language>

Phrases in phrases.xml is:
HTML:
<?xml version="1.0" encoding="utf-8"?>
<phrases>
  <phrase title="about" global_cache="0" version_id="1000015" version_string="1.0.0 Alpha 5"><![CDATA[About]]></phrase>
  <phrase title="about_you" global_cache="0" version_id="1000015" version_string="1.0.0 Alpha 5"><![CDATA[About You]]></phrase>
  <phrase title="accepted_file_types" global_cache="0" version_id="1000011" version_string="1.0.0 Alpha 1"><![CDATA[Accepted file types]]></phrase>
<hrases>

The parameters are not the same. Simple copy and paste cannot solve the problem.
 
Hi Weiyan,
I already look for this answer ... without success.
The best way [I think ... ] is use your phrases.xml , translate and copy/paste to your language xml.

The language xml have
Code:
<?xml version="1.0" encoding="utf-8"?>
<language title="blabla" date_format="j F Y" time_format="g:i A" decimal_point="." thousands_separator=",">

And phrases have, only
Code:
<?xml version="1.0" encoding="utf-8"?>

But I don't know if this is the right way. In language xml we find [example]
Code:
<phrase title="1_more_message" addon_id="XenForo" global_cache="0" version_id="1000032" version_string="1.0.0 Beta 2"><![CDATA[1 msg a mais]]></phrase>

I don't know if we need include this [addon_id="XenForo"] in all lines :confused:

All the best
 
Yes, not the same. You know if we need include the addon_id later?
thank you
in time: 'stupid way'?
I guess there is addons' phrases, so addon id needed.
I use the admin cp's appearance>language>phrases.
Running working xf on xampp, its fast enough.
Another guy has started chinese translation, he direct translate xml file, for many months. I think the smart method is dead.
 
Top Bottom