vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   How do I create a proper language xml? (https://vborg.vbsupport.ru/showthread.php?t=158381)

yoyoyoyo 09-21-2007 02:45 PM

How do I create a proper language xml?
 
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:
Quote:

<?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

Quote:

Originally Posted by Andreas (Post 1344371)
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.


All times are GMT. The time now is 09:16 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01050 seconds
  • Memory Usage 1,724KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete