The Joomla! Forum ™






Post new topic Reply to topic  [ 10 posts ] 
Author Message
PostPosted: Tue Dec 01, 2009 11:48 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri Oct 31, 2008 8:08 pm
Posts: 31
Hi,

I am using Jumi to create a booking form which is submitted by email. I have various fields like:

name, surname, address, etc...

My question is how can I use the multilingual facilities in Joomla? I know that this line of code:

Code:
<?php echo JText::_( 'Enter your name' );?>:


uses JText in order to be translated from the lanauges/ini's folder.

I need to do a similar thing, for instance:

Code:
<td><?php echo Jtext::_('Name*');?>:</td>


Where can I add the string Name* in order to be translated? I tried creating a file in the languages folder entitled it-it.com_jumi.ini and entered Name*=Nome inside of this file but it didn't work...

Any suggestions on how can I use this within Jumi?

Many thanks in advance for any responses.

Chris


Top
 Profile  
 
PostPosted: Wed Dec 02, 2009 9:08 am 
User avatar
Joomla! Hero
Joomla! Hero

Joined: Wed Jun 07, 2006 9:10 am
Posts: 2454
Location: Brasov - Romania
After creating the language file in the language folder you need to load it on the page you're using Jumi.
You can use something like this :

Code:
JLanguage::load('your_language_file');


The language file has to be named like this : it-it.your_language_file.ini.

_________________
My latest project - http://www.extraglaze.co.uk/


Top
 Profile  
 
PostPosted: Wed Dec 02, 2009 10:57 am 
User avatar
Joomla! Master
Joomla! Master

Joined: Fri Aug 12, 2005 3:47 pm
Posts: 17369
Location: **Translation Matters**
Looks like JUMI is installing already language files, but nor for Italian.
You may have to copy and translate each Jumi language file (Plugin, module, component) and change prefix to it-IT.
Adding in a JUMI file a JText will then be translated if the string is present in the it_IT language file concerned.

I am not sure it's a good idea to use a * in the JText.

_________________
Jean-Marie Simonet / infograf · http://www.info-graf.fr
Multilanguage in 2.5: http://help.joomla.org/files/EN-GB_multilang_tutorial.pdf
---------------------------------
Joomla Translation Coordination Team • Joomla! Production Working Group


Top
 Profile  
 
PostPosted: Wed Dec 02, 2009 11:08 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri Oct 31, 2008 8:08 pm
Posts: 31
Hi Algis,

Thanks for your reply.

I created the file under /languages/it-IT and named it it-IT.com_jumi.ini

I then loaded the Jumi application located under /booknow/booknow.php and entered the following at the beginning of the page:

Code:
<?php
   defined('_JEXEC') OR defined('_VALID_MOS') OR die( "Direct Access Is Not Allowed" );
   JLanguage::load('it-IT.com_jumi.ini');
?>


However, when I try loading the page, the following error message is displayed:

Code:
Fatal error: Call to undefined method JSite::_load() in /www/joomla/libraries/joomla/language/language.php on line 301


Any suggestions on why this is happening?

Many thanks
Chris


Top
 Profile  
 
PostPosted: Wed Dec 02, 2009 11:11 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri Oct 31, 2008 8:08 pm
Posts: 31
infograf768 wrote:
Looks like JUMI is installing already language files, but nor for Italian.
You may have to copy and translate each Jumi language file (Plugin, module, component) and change prefix to it-IT.
Adding in a JUMI file a JText will then be translated if the string is present in the it_IT language file concerned.

I am not sure it's a good idea to use a * in the JText.


There isn't anything in the /languages folder related to Jumi. How do you know that it is installing language files automatically. I tried using it on various languages since I have 8 languages on the website, but no luck...


Top
 Profile  
 
PostPosted: Wed Dec 02, 2009 11:12 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri Oct 31, 2008 8:08 pm
Posts: 31
infograf768 wrote:
Looks like JUMI is installing already language files, but nor for Italian.
You may have to copy and translate each Jumi language file (Plugin, module, component) and change prefix to it-IT.
Adding in a JUMI file a JText will then be translated if the string is present in the it_IT language file concerned.

I am not sure it's a good idea to use a * in the JText.


How do you know that JUMI is installing language files? I looked in the /languages folder and there isn't anything related to JUMI in neither languages. I tried in several languages since I have 8 languages on my website but with no luck.

Please help...


Top
 Profile  
 
PostPosted: Wed Dec 02, 2009 11:36 am 
User avatar
Joomla! Hero
Joomla! Hero

Joined: Wed Jun 07, 2006 9:10 am
Posts: 2454
Location: Brasov - Romania
Try it this way:

Code:
$language =& JFactory::getLanguage();
$language->load('com_jumi');


Do not add the language code and the ini extension.
You will have to create the language file for each language.

_________________
My latest project - http://www.extraglaze.co.uk/


Top
 Profile  
 
PostPosted: Wed Dec 02, 2009 11:43 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri Oct 31, 2008 8:08 pm
Posts: 31
Thank you that did it!


Chris


Top
 Profile  
 
PostPosted: Wed Dec 02, 2009 11:55 am 
User avatar
Joomla! Hero
Joomla! Hero

Joined: Wed Jun 07, 2006 9:10 am
Posts: 2454
Location: Brasov - Romania
Happy to hear that. :)

_________________
My latest project - http://www.extraglaze.co.uk/


Top
 Profile  
 
PostPosted: Wed Dec 02, 2009 12:21 pm 
User avatar
Joomla! Master
Joomla! Master

Joined: Fri Aug 12, 2005 3:47 pm
Posts: 17369
Location: **Translation Matters**
chrisdeguara wrote:
infograf768 wrote:
Looks like JUMI is installing already language files, but nor for Italian.
You may have to copy and translate each Jumi language file (Plugin, module, component) and change prefix to it-IT.
Adding in a JUMI file a JText will then be translated if the string is present in the it_IT language file concerned.

I am not sure it's a good idea to use a * in the JText.


How do you know that JUMI is installing language files? I looked in the /languages folder and there isn't anything related to JUMI in neither languages. I tried in several languages since I have 8 languages on my website but with no luck.

Please help...

I downloaded Jumi and the language files are there
Example for the plugin
<languages folder="language">
<language tag="en-GB">en-GB.plg_content_jumi.ini</language>
<language tag="ru-RU">ru-RU.plg_content_jumi.ini</language>
<language tag="cs-CZ">cs-CZ.plg_content_jumi.ini</language>
<language tag="hy-AM">hy-AM.plg_content_jumi.ini</language>
<language tag="es-ES">es-ES.plg_content_jumi.ini</language>
</languages>

_________________
Jean-Marie Simonet / infograf · http://www.info-graf.fr
Multilanguage in 2.5: http://help.joomla.org/files/EN-GB_multilang_tutorial.pdf
---------------------------------
Joomla Translation Coordination Team • Joomla! Production Working Group


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



Who is online

Users browsing this forum: No registered users and 5 guests


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

Jump to:  
Powered by phpBB® Forum Software © phpBB Group