Log in

View Full Version : How do I create a proper language xml?


yoyoyoyo
09-21-2007, 02:45 PM
I want to create a language.xml file to easily import some phrases in to the Admin Control Panel to use in a cpnav.xml. I have looked at other language.xml files and tried, but the phrases aren't showing up properly in the cpnav when I view it - the phrases are showing up as the varnames like this:

*[foobar]*
*[acp_foo]*
*[acp_bar]*

instead of:

foobar
foo
bar

In the above example "foobar" is the cpnav setting group, and "foo" and "bar" are the settings.

This is what my cpnav xml file looks like:

<?xml version="1.0" encoding="ISO-8859-1" ?>
<navgroups product="vbulletin">
<navgroup phrase="cp_foobar" permissions="canadminsettings" hr="true" displayorder="10">

<navoption displayorder="20">
<phrase>cp_foo</phrase>
<link>foo.php?do=options&amp;dogroup=%5Ball%5D</link>
</navoption>

<navoption displayorder="30">
<phrase>cp_bar</phrase>
<link>foo.php?s=&amp;do=modify</link>
</navoption>
</navgroup>
</navgroups>The cpnav file works fine, it is showing up exactly where I want it to, and the links do exactly what I want them to, but the language is wrong, as indicated above.

I created the phrases manually as global cp phrases, but they are not showing up. I would prefer to be able to do it automatically with an xml file.

Can someone show me what a language.xml import file, using the above phrases as examples, would look like?

Marco van Herwaarden
09-21-2007, 05:42 PM
You should create the phrases as AdminCP Global.

yoyoyoyo
09-21-2007, 07:50 PM
would that be:

<phrasetype name="AdminCP Global" fieldname="cpglobal">

or

<phrasetype name="AdminCP Global" fieldname="admincpglobal">

??

Dismounted
09-22-2007, 05:14 AM
<phrasetype name="Control Panel Global" fieldname="cpglobal">

Andreas
09-22-2007, 05:20 AM
cpglobal does work, but cphome should be used instead - as the phraees are really only required on ACP Home :)

yoyoyoyo
09-23-2007, 06:16 PM
cpglobal does work, but cphome should be used instead - as the phraees are really only required on ACP Home :)thanks...

so that would be:

<phrasetype name="AdminCP Home" fieldname="cphome">

???

Dismounted
09-24-2007, 05:34 AM
Check in the language manager.