It is currently Fri Dec 15, 2017 5:41 pm

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Sun Feb 05, 2012 10:54 pm 
Offline

Joined: Sun Feb 05, 2012 10:43 pm
Posts: 2
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


Top
 Profile  
 
 Post subject: Description file format ?
PostPosted: Sun Feb 05, 2012 10:54 pm 
Top  
PostPosted: Wed Feb 08, 2012 12:18 pm 
Offline
Developer
Developer
User avatar

Joined: Sat Aug 14, 2010 9:31 pm
Posts: 1241
Location: Novi Sad, Serbia
Here is the XML format needed for description files:

Code:
<?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:
<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:
<?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.

_________________
Help Admiror Gallery become even better,
give us a review on JED


Top
 Profile  
 
PostPosted: Wed Feb 08, 2012 8:04 pm 
Offline

Joined: Sun Feb 05, 2012 10:43 pm
Posts: 2
Perfect! Thank you :D


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

 


All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron

This is the official Admiror Joomla! Community Forum. You are welcome to join the Admiror Joomla! Community. All Admiror Joomla! Extensions Users, Joomla! Developers, PHP or mySQL Developers are welcome to support & contribute to Admiror Joomla! Projects.

Joomla! is a free and open source content management system (CMS) for publishing content on the World Wide Web and intranets. With a vibrant volunteer community, user-friendly features and plenty of power, Joomla is perfect for your website!

Joomla! is written in PHP, uses object-oriented programming (OOP) techniques and software patterns, stores data in a MySQL database, and includes features such as page caching, RSS feeds, printable versions of pages, news flashes, blogs, polls, search, and support for language internationalization.

Joomla! is the property of Open Source Matters, Inc. All rights reserved. Read more about Joomla! at http://www.joomla.org/.


Protected by Anti-Spam ACP Powered by phpBB® Forum Software © phpBB Group