Bulding Extension's Language Pack for J1.5

A place to discuss Joomla! translation matters.

Moderator: wendhausen

Locked
User avatar
sifix
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Mon Aug 07, 2006 2:41 pm
Location: Athens - Greece

Bulding Extension's Language Pack for J1.5

Post by sifix » Wed Aug 23, 2006 8:15 am

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.

User avatar
davidgal
Joomla! Guru
Joomla! Guru
Posts: 963
Joined: Sat Aug 20, 2005 9:19 am
Location: Israel
Contact:

Re: Bulding Extension's Language Pack for J1.5

Post by davidgal » Sat Aug 26, 2006 8:41 pm

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

User avatar
eyezberg
Joomla! Hero
Joomla! Hero
Posts: 2859
Joined: Thu Aug 25, 2005 5:48 pm
Location: Geneva mostly
Contact:

Re: Bulding Extension's Language Pack for J1.5

Post by eyezberg » Fri Sep 01, 2006 3:37 pm

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

User avatar
sakiss
Joomla! Explorer
Joomla! Explorer
Posts: 349
Joined: Wed Aug 20, 2008 4:09 pm

Re: Bulding Extension's Language Pack for J1.5

Post by sakiss » Tue Aug 04, 2009 4:10 pm

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)?

User avatar
Eraser
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 176
Joined: Sat Aug 20, 2005 10:58 am
Location: Estonia
Contact:

Re: Bulding Extension's Language Pack for J1.5

Post by Eraser » Fri Aug 07, 2009 7:59 am

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

<?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>[email protected]</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

User avatar
sakiss
Joomla! Explorer
Joomla! Explorer
Posts: 349
Joined: Wed Aug 20, 2008 4:09 pm

Re: Bulding Extension's Language Pack for J1.5

Post by sakiss » Thu Sep 17, 2009 3:02 pm

Man i really thank you

User avatar
foto50
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Mon May 14, 2007 9:47 am

Re: Bulding Extension's Language Pack for J1.5

Post by foto50 » Tue Nov 30, 2010 11:00 pm

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

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

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

User avatar
Eraser
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 176
Joined: Sat Aug 20, 2005 10:58 am
Location: Estonia
Contact:

Re: Bulding Extension's Language Pack for J1.5

Post by Eraser » Sun Feb 13, 2011 11:40 pm

And of course - same goes for the frontend (site) files also ... ;)
Estonian Translation Team - http://www.eraser.ee

sh4n0n
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Tue Dec 13, 2011 3:32 pm
Location: Canada
Contact:

Re: Bulding Extension's Language Pack for J1.5

Post by sh4n0n » Fri Jan 20, 2012 1:04 pm

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

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

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


Locked

Return to “Translations”