How to use multilingual strings with Jumi?

General questions regarding the use of languages in Joomla! 1.5.
chrisdeguara
Joomla! Apprentice
Joomla! Apprentice
Posts: 31
Joined: Fri Oct 31, 2008 8:08 pm

How to use multilingual strings with Jumi?

Postby chrisdeguara » Tue Dec 01, 2009 11:48 am

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: Select all

<?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: Select all

<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

User avatar
Alex Dobrin
Joomla! Hero
Joomla! Hero
Posts: 2467
Joined: Wed Jun 07, 2006 9:10 am
Location: Brasov - Romania
Contact:

Re: How to use multilingual strings with Jumi?

Postby Alex Dobrin » Wed Dec 02, 2009 9:08 am

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: Select all

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/

User avatar
infograf768
Joomla! Master
Joomla! Master
Posts: 17951
Joined: Fri Aug 12, 2005 3:47 pm
Location: **Translation Matters**

Re: How to use multilingual strings with Jumi?

Postby infograf768 » Wed Dec 02, 2009 10:57 am

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
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group

chrisdeguara
Joomla! Apprentice
Joomla! Apprentice
Posts: 31
Joined: Fri Oct 31, 2008 8:08 pm

Re: How to use multilingual strings with Jumi?

Postby chrisdeguara » Wed Dec 02, 2009 11:08 am

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: Select all

<?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: Select all

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

chrisdeguara
Joomla! Apprentice
Joomla! Apprentice
Posts: 31
Joined: Fri Oct 31, 2008 8:08 pm

Re: How to use multilingual strings with Jumi?

Postby chrisdeguara » Wed Dec 02, 2009 11:11 am

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

chrisdeguara
Joomla! Apprentice
Joomla! Apprentice
Posts: 31
Joined: Fri Oct 31, 2008 8:08 pm

Re: How to use multilingual strings with Jumi?

Postby chrisdeguara » Wed Dec 02, 2009 11:12 am

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

User avatar
Alex Dobrin
Joomla! Hero
Joomla! Hero
Posts: 2467
Joined: Wed Jun 07, 2006 9:10 am
Location: Brasov - Romania
Contact:

Re: How to use multilingual strings with Jumi?

Postby Alex Dobrin » Wed Dec 02, 2009 11:36 am

Try it this way:

Code: Select all

$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/

chrisdeguara
Joomla! Apprentice
Joomla! Apprentice
Posts: 31
Joined: Fri Oct 31, 2008 8:08 pm

Re: How to use multilingual strings with Jumi?

Postby chrisdeguara » Wed Dec 02, 2009 11:43 am

Thank you that did it!


Chris

User avatar
Alex Dobrin
Joomla! Hero
Joomla! Hero
Posts: 2467
Joined: Wed Jun 07, 2006 9:10 am
Location: Brasov - Romania
Contact:

Re: How to use multilingual strings with Jumi?

Postby Alex Dobrin » Wed Dec 02, 2009 11:55 am

Happy to hear that. :)
My latest project - http://www.extraglaze.co.uk/

User avatar
infograf768
Joomla! Master
Joomla! Master
Posts: 17951
Joined: Fri Aug 12, 2005 3:47 pm
Location: **Translation Matters**

Re: How to use multilingual strings with Jumi?

Postby infograf768 » Wed Dec 02, 2009 12:21 pm

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
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group


Return to “Language - Joomla! 1.5”

Who is online

Users browsing this forum: No registered users and 7 guests