Actions

J2.5

Difference between revisions of "Making non-core language packs"

From Joomla! Documentation

(Created page with "To make a non-core language pack in 2.5 is quite different from making a Core pack. http://docs.joomla.org/Making_a_Language_Pack_for_Joomla_1.6 The type of package is a "file"...")
 
Line 40: Line 40:
 
The .zip in this case is composed of the xml above and 2 folders: site and admin, each of them containing a fr-FR folder with the ini files.
 
The .zip in this case is composed of the xml above and 2 folders: site and admin, each of them containing a fr-FR folder with the ini files.
  
myextension_fr-FR_install.xml
+
myextension_fr-FR_install.xml //name can be anything.
  
 
site/fr-FR/ + all ini files
 
site/fr-FR/ + all ini files
Line 46: Line 46:
 
admin/fr-FR/ + all ini files
 
admin/fr-FR/ + all ini files
  
The result is the installation of the ini file in an existing fr-FR folder or creating one if does not exist.
+
The result is the installation of the ini files in an existing fr-FR folder or creating one if does not exist.
  
 
It has no impact on existing files. Uninstalling the "File" pack (Extensions Manager=>Manage=>Filter by "file") will only uninstall the ini files listed.
 
It has no impact on existing files. Uninstalling the "File" pack (Extensions Manager=>Manage=>Filter by "file") will only uninstall the ini files listed.
 +
 +
'''NOTE: In 2.5, except if one uses a specific script, the language xx-XX folders will always be created if they do not already exist.'''
 +
[[Category:Joomla! 1.6]]
 +
[[Category:Tutorials]]
 +
[[Category:Language Development]]

Revision as of 10:53, 9 May 2012

To make a non-core language pack in 2.5 is quite different from making a Core pack.

http://docs.joomla.org/Making_a_Language_Pack_for_Joomla_1.6

The type of package is a "file" type.

Here is a typical xml including installing ini files into the administrator and site default language folders for one language and one extension only. One can include many languages and many extensions.


<?xml version="1.0" encoding="utf-8"?>
<extension type="file" version="2.5" method="upgrade">
        <name>Myextension_fr-FR</name>  //
        <author>French Translation Team</author>
        <creationDate>24 Janvier 2012</creationDate>
        <copyright>(C) 2005-2012 Whoever</copyright>
        <license>http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license>
        <authorEmail>info@whoever</authorEmail>
        <authorUrl>http://www.myextension.org</authorUrl>
        <version>1.0.0</version>
        <description>MYEXTENSION_LANG_INSTALL_DESCRIPTION</description>
 
        <!-- Fileset definition -->
        <fileset>
                <files folder="admin/fr-FR" target="administrator/language/fr-FR">  // back-end
                        <filename>fr-FR.com_myextension.ini</filename>
                        <filename>fr-FR.com_myextension.sys.ini</filename>
                        <filename>fr-FR.plg_system_myextension.ini</filename>
                        <filename>fr-FR.plg_system_myextension.sys.ini</filename>
                </files>
                <files folder="site/fr-FR" target="language/fr-FR">  //front-end
                        <filename>fr-FR.com_myextension.ini</filename>
                        <filename>fr-FR.com_myextension.sys.ini</filename>
                        <filename>fr-FR.mod_myextension.ini</filename>
                        <filename>fr-FR.mod_myextension.sys.ini</filename>
                </files>
        </fileset>
</extension>

The .zip in this case is composed of the xml above and 2 folders: site and admin, each of them containing a fr-FR folder with the ini files.

myextension_fr-FR_install.xml //name can be anything.

site/fr-FR/ + all ini files

admin/fr-FR/ + all ini files

The result is the installation of the ini files in an existing fr-FR folder or creating one if does not exist.

It has no impact on existing files. Uninstalling the "File" pack (Extensions Manager=>Manage=>Filter by "file") will only uninstall the ini files listed.

NOTE: In 2.5, except if one uses a specific script, the language xx-XX folders will always be created if they do not already exist.