Page 1 of 1

Description file format ?

Posted: Sun Feb 05, 2012 10:54 pm
by tpolakov
Hi,

I am trying to create multilanguage descriptions to the images. The last description for the file format that I could find was
http://www.admiror-design-studio.com/en ... er-manuals

However, this seems to be outdated. I looked at the php code a little bit and it seems that the file now needs to have the XML extension. However I am not a PHP expert and I could not figure out what has changed with the format itself.

This is the content of my description file:
---
{sk-SK}Popis 22{/sk-SK}
{en-GB}Description 22{/en-GB}
---

I get the following error when rendering the page:
XML Parsing Error at 1:1. Error 4: Not well-formed (invalid token)

What is wrong ?
I am using Joomla 1.7.4 and the 4.1.0 Admiror plugin.

Thanks in advance
Tomas

Re: Description file format ?

Posted: Wed Feb 08, 2012 12:18 pm
by Vasiljevski
Here is the XML format needed for description files:

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<image>
<visible>true</visible>
<priority></priority>
<captions>
	<caption lang="default">Default desc</caption>
	<caption lang="en-gb">English</caption>
</captions>
</image>
As you can see there is some extra parameters that need to be provided. This is automatically created from Image Manager, but I still have problems with parameters for Joomla 1.6,1.7 and 2.5 so this is still only available for Joomla 1.5 for now.

In <captions> you should add new element for every language you want to provide. Here we have only default value and English, but in you case this would be like:

Code: Select all

<caption lang="sk-SK">Popis 22</caption>
<caption lang="en-GB">Description 22</caption>
So the final file would be named [image name].xml and needs to be located in the same directory as the original image, for example [joomla root]/images/stories/fruit/

And content of the file, in your case, would be:

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<image>
<visible>true</visible>
<priority></priority>
<captions>
         <caption lang="default">Default desc</caption>
         <caption lang="sk-SK">Popis 22</caption>
         <caption lang="en-GB">Description 22</caption>
</captions>
</image>
If you need more languages, just add a new <caption> value.

Re: Description file format ?

Posted: Wed Feb 08, 2012 8:04 pm
by tpolakov
Perfect! Thank you :D