The Joomla! Forum ™






Post new topic Reply to topic  [ 9 posts ] 
Author Message
PostPosted: Wed Aug 23, 2006 8:15 am 
User avatar
Joomla! Fledgling
Joomla! Fledgling

Joined: Mon Aug 07, 2006 2:41 pm
Posts: 4
Location: Athens - Greece
Hallo,
I am trying to create an component extension for Joomla 1.5 and I havequestions regarding language packs.

Are there any insructions on how to combine a language pack with the extension?
I use the JText::_( 'NAME' ); but I don't know where to put my language file

I tried the following but it didn't work.
I create a file en-GB.com_mycomp.ini and placed it in \language\en-GB (both in admin and frond area)
NAME=the name is
but unfortunately joomla did not read my ini file
So instead of displaying "the name is" it displays "NAME"

I don't know if the above method is correct or I do something wrong, ???
I am sorry for bothering but the section with How-to's is still empty ( http://dev.joomla.org/component/option, ... languages/ )

I would appreciate if you could help me
Thank you very much

I am sorry I found what I did wrong.. It had nothing to do with the above.
The above are correct

As also is mentioned here
http://forum.joomla.org/index.php/topic ... #msg432913

Keep on the good work..  :)


Last edited by sifix on Wed Aug 23, 2006 3:33 pm, edited 1 time in total.

Top
 Profile  
 
PostPosted: Sat Aug 26, 2006 8:41 pm 
User avatar
Joomla! Guru
Joomla! Guru

Joined: Sat Aug 20, 2005 9:19 am
Posts: 961
Location: Israel
Hi,

In your installation xml you need a tag group for site language packs and for admin packs.
each language file should be enclosed in a tag and should have the sub folder of the specific language included i.e 'fr-FR/fr-FR.com_mycomponent.ini'

The concept is that any language pack inside the component installation package will be added to existing language folders for each language. If there is no core language installed the file will be discarded. It is also possible to create separate language packs for later installation to existing (installed) components. These install like regular language packs but without the metadata xml and with out the 'core' flag in the installation xml file.

I will be created the language spec doumentation in the near future. In the mean time I hope that this helps.

David

_________________
David Gal
joomla.org.il


Top
 Profile  
 
PostPosted: Fri Sep 01, 2006 3:37 pm 
User avatar
Joomla! Hero
Joomla! Hero

Joined: Thu Aug 25, 2005 5:48 pm
Posts: 2860
Location: Geneva mostly
This
davidgal wrote:
...It is also possible to create separate language packs for later installation to existing (installed) components. These install like regular language packs but without the metadata xml and with out the 'core' flag in the installation xml file....

David
is WAY cool!! Great news! Beta beta beta ... :)

_________________
Sometimes one pays most for the things one gets for nothing.
The important thing is not to stop questioning. Curiosity has its own reason for existing. AE
http://joomla15.[URL banned].com for J! 1.5 screenshots
http://www.eyezberg.com


Top
 Profile  
 
PostPosted: Tue Aug 04, 2009 4:10 pm 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Wed Aug 20, 2008 4:09 pm
Posts: 243
That means that you can install the language ini file imediatelly from joomla backend ?

Should other files being contained with the language ini file (ex. a zip with ini and xml)?


Top
 Profile  
 
PostPosted: Fri Aug 07, 2009 7:59 am 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Sat Aug 20, 2005 10:58 am
Posts: 167
Location: Estonia
sakiss wrote:
That means that you can install the language ini file imediatelly from joomla backend ?

Should other files being contained with the language ini file (ex. a zip with ini and xml)?

Yep, language files of the component/module/plugin can be installed with the Joomlas installer.

You can do it automatically with different automatic components like Language Manager. But You can do it by hand also.

In a zip file there need to be files like that:

et-EE-zoo-10.zip
  • admin (folder)
    • et-EE.com_zoo.ini
  • site (folder)
    • et-EE.com_zoo.ini
  • install.xml

Content of the install.xml file should be looking something like that:
Code:
<?xml version="1.0" encoding="utf-8"?>
<install version="1.5" client="both" type="language" method="upgrade">
   <name>Zoo Estonian (Eesti)</name>
   <tag>et-EE</tag>
   <version>2.0.2</version>
   <creationDate>2009-04-02</creationDate>
   <author>Eraser</author>
   <authorEmail>eraser@eraser.ee</authorEmail>
   <authorUrl>www.eraser.ee</authorUrl>
   <copyright>(C) 2005 - 2009 Eraser. All rights reserved.</copyright>
   <license>http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license>
   <description>Estonian translation for Zoo 1.0.3 Site and Admin (Joomla! 1.5.x)</description>
   <administration>
      <files folder="admin">
         <filename>et-EE.com_zoo.ini</filename>
      </files>
   </administration>
   <site>
      <files folder="site">
         <filename>et-EE.com_zoo.ini</filename>
      </files>
   </site>
   <params />
</install>


Edit it according to Your special need and that's it. ;)

You can find the file i show as an example here from this url. Download it and learn from this example.

_________________
Estonian Translation Team - http://www.eraser.ee


Top
 Profile  
 
PostPosted: Thu Sep 17, 2009 3:02 pm 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Wed Aug 20, 2008 4:09 pm
Posts: 243
Man i really thank you


Top
 Profile  
 
PostPosted: Tue Nov 30, 2010 11:00 pm 
User avatar
Joomla! Apprentice
Joomla! Apprentice

Joined: Mon May 14, 2007 9:47 am
Posts: 7
Thanks as well, I now can provide extra language packages for my component without having to zip (and xml) them into the entire install.xml.

I had to try quite a bit to get that running for a module and thought, my solution might help others to avoid searching and trying:

Since the module does not have any files for <administration> I thought, it's good enough just to delete this section, but DONT!

When there is no language file for administration, you need to keep an empty node for it in the install.xml! Like:
Code:
<?xml version="1.0" encoding="utf-8"?>
<install version="1.5" client="both" type="language" method="upgrade">
   <name>mod_opensim_friends english</name>
   <tag>en-GB</tag>
   <version>0.1.7</version>
   <creationDate>2010-11-30</creationDate>
   <author>FoTo50</author>
   <authorEmail>blabla email</authorEmail>
   <authorUrl>blabla website</authorUrl>
   <copyright>(C) 2010 FoTo50. All rights reserved.</copyright>
   <license>http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license>
   <description>English translation for mod_opensim_friends Site and Admin (Joomla! 1.5.x)</description>
   <administration />
   <site>
      <files folder="site">
         <filename>en-GB.mod_opensim_friends.ini</filename>
      </files>
   </site>
   <params />
</install>
The <administration /> is the important line for it. Otherwise you get errors like:
Code:
PHP Fatal error:  Call to a member function getElementByPath() on a non-object in /some.joomla.path/libraries/joomla/installer/adapters/language.php on line 70

I hope this helps one or the other

Greetz
FoTo50


Top
 Profile  
 
PostPosted: Sun Feb 13, 2011 11:40 pm 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Sat Aug 20, 2005 10:58 am
Posts: 167
Location: Estonia
And of course - same goes for the frontend (site) files also ... ;)

_________________
Estonian Translation Team - http://www.eraser.ee


Top
 Profile  
 
PostPosted: Fri Jan 20, 2012 1:04 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Tue Dec 13, 2011 3:32 pm
Posts: 5
Location: Canada
foto50 wrote:
Thanks as well, I now can provide extra language packages for my component without having to zip (and xml) them into the entire install.xml.

I had to try quite a bit to get that running for a module and thought, my solution might help others to avoid searching and trying:

Since the module does not have any files for <administration> I thought, it's good enough just to delete this section, but DONT!
Image
When there is no language file for administration, you need to keep an empty node for it in the install.xml! Like:
Code:
<?xml version="1.0" encoding="utf-8"?>
<install version="1.5" client="both" type="language" method="upgrade">
   <name>mod_opensim_friends english</name>
   <tag>en-GB</tag>
   <version>0.1.7</version>
   <creationDate>2010-11-30</creationDate>
   <author>FoTo50</author>
   <authorEmail>blabla email</authorEmail>
   <authorUrl>blabla website</authorUrl>
   <copyright>(C) 2010 FoTo50. All rights reserved.</copyright>
   <license>http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license>
   <description>English translation for mod_opensim_friends Site and Admin (Joomla! 1.5.x)</description>
   <administration />
   <site>
      <files folder="site">
         <filename>en-GB.mod_opensim_friends.ini</filename>
      </files>
   </site>
   <params />
</install>
The <administration /> is the important line for it. Otherwise you get errors like:
Code:
PHP Fatal error:  Call to a member function getElementByPath() on a non-object in /some.joomla.path/libraries/joomla/installer/adapters/language.php on line 70

I hope this helps one or the other

Greetz
FoTo50


really well explained. great work and thank you so much!
served me well and somewhat saved my weekend.. ;)


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



Who is online

Users browsing this forum: No registered users and 18 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