Place of language .ini files in Joomla 1.6

12 views
Skip to the first unread message

JackTec

unread,
23 Dec 2009, 12:32:0423/12/2009
to Joomla! Framework Development
I've installed J! 1.6 and I'm noticing that the language files are
partly loaded from directories within the component. See Trace:
Code:
# H:\xampp\htdocs\Joomla_1.6.0-Alpha2-1025\administrator\modules
\mod_toolbar\language\en-GB\en-GB.mod_toolbar.ini
# H:\xampp\htdocs\Joomla_1.6.0-Alpha2-1025\administrator\language\en-GB
\en-GB.mod_menu.ini 1
# H:\xampp\htdocs\Joomla_1.6.0-Alpha2-1025\administrator\modules
\mod_menu\language\en-GB\en-GB.mod_menu.ini
# H:\xampp\htdocs\Joomla_1.6.0-Alpha2-1025\administrator\language\en-GB
\en-GB.com_banners.menu.ini 1
# H:\xampp\htdocs\Joomla_1.6.0-Alpha2-1025\administrator\components
\com_banners\language\en-GB\en-GB.menu.ini
# H:\xampp\htdocs\Joomla_1.6.0-Alpha2-1025\administrator\components
\com_contact\language\en-GB\en-GB.menu.ini
# H:\xampp\htdocs\Joomla_1.6.0-Alpha2-1025\administrator\components
\com_messages\language\en-GB\en-GB.menu.ini
# H:\xampp\htdocs\Joomla_1.6.0-Alpha2-1025\administrator\components
\com_newsfeeds\language\en-GB\en-GB.menu.ini

Is the /language/ directory within a component/module the 'new' design
place for NLS support ?


BTW: I like the idea to have the language directory within the
component/module directory. This is a more consistant design. The
(root)/language directory should reserved for Joomla base or even
eliminated when all base components are modified to the new concept.

Christophe Demko

unread,
23 Dec 2009, 13:15:2823/12/2009
to Joomla! Framework Development
Developers will have the choice of both methods:
* having language files in extension directory
* having language files in joomla directory

Andrew Eddie

unread,
23 Dec 2009, 18:15:2223/12/2009
to joomla-dev...@googlegroups.com
Shouldn't all the core extensions being in the main language folder?
If not, doesn't it make it hard for people doing full language packs?

Regards,
Andrew Eddie
http://www.theartofjoomla.com - the art of becoming a Joomla developer


2009/12/24 Christophe Demko <chd...@gmail.com>:

> --
>
> You received this message because you are subscribed to the Google Groups "Joomla! Framework Development" group.
> To post to this group, send an email to joomla-dev...@googlegroups.com.
> To unsubscribe from this group, send email to joomla-dev-frame...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/joomla-dev-framework?hl=en-GB.
>
>
>

Sam Moffatt

unread,
23 Dec 2009, 19:43:0923/12/2009
to joomla-dev-framework
The idea is to ensure a clear boundary of responsibility that 1.5
doesn't really have. Files that are located in the two core language
directories are "owned" by the Joomla! system and the respective
language packs that might be installed. So because of this, third
party developers language files live with their own code. The idea is
that you as a developer can look after the files you logically own and
this in some ways is similar to the way Apple's Application Folders
work (all of the applications non-shared resources are stored within
it, shared libraries can be either packaged with the app or installed
system wide). This means the responsibility for third party developers
translations is theirs and the responsibility for files maintained by
languages packs is theres. This also means that if someone uninstalls
a language pack and later reinstalls it, third party translations are
maintained and not deleted. Also means that if a translation is
supported by an extension developer but not in core at the time of
installation but is then later installed, this translation is
immediately available (unlike in 1.5 where you would have either had
to extract the install package and manually copy the file or reinstall
the extension to get the translations - neither in my mind being user
friendly).

One of the reasons we went for the approach of a unified language
folder is to make the life of translators easier by having one folder
they can examine and see how it works. For core extensions this isn't
a problem because a core language pack should include all of these
files. For reasons stated above this is sub-optimal for third party
extensions because it means their files either don't get copied or get
deleted. So for this reason, core extensions (e.g. those that ship
with the main distribution) should have their files located in a
common directory. Additionally should a translator want they can in
their language pack include translations of other extensions here as
well (not necessarily just for the extensions that ship with Joomla!).
In some respects this is a very powerful concept: a translation can be
vendor supplied (shipped with the extension) or supplied via a
language pack from a third party translator.

Discussion on removing the centralised language folder is perhaps
something for 1.7 but should be done in consultation with the primary
stakeholders of that location, the translators. Improved tooling would
make a switch for core extensions to retain their language files
easier for translators but for the time being, core extensions should
have a shared language file and third parties should be working
towards including a language folder within their normal directory
structure (also makes development and subversioning easier as well for
those files - especially on platforms like Windows that doesn't
support symlinks neatly). The issue with removing the centralised
language folder is that we're having a translator install a
translation for something that potentially doesn't exist as well (back
to muddy responsibilities) - the hybrid solution for me is what I feel
the best option even though it is a bit more complicated.

Additionally this also solves one of the problems plugins have had:
where should the language file go? With the plugin itself (now they've
got their own folders as well).

Sam Moffatt
http://pasamio.id.au

infograf768

unread,
24 Dec 2009, 03:25:2824/12/2009
to Joomla! Framework Development
It was indeed decided to keep all core language files in the central
language folders and their name listed in their respective xml in
order to ease the making of Core language packs for Translators.
We discussed this matter when we started working on com_localise.
I suggest therefore that the files listed above be moved to where they
belong and to make sure when someone is committing any language ini
that it is listed in the xml.
Com_localise will ease the making of any type of pack, extension
specific (one or multiple) or core.

As explained by Sam, the use of extensions specific language folders
should be reserved to 3pds.
It is to be noted that any translation for a 3pd extension not
included by the 3pd dev can only be installed in the main languages
folders.
If, for any reason, 2 files of the same name for an extension are
present, one in the central language folder, the other in the
extension folder, the main language folder one has precedence.

On 24 Dec, 00:15, Andrew Eddie <mambob...@gmail.com> wrote:
> Shouldn't all the core extensions being in the main language folder?
> If not, doesn't it make it hard for people doing full language packs?
>
> Regards,

> Andrew Eddiehttp://www.theartofjoomla.com- the art of becoming a Joomla developer
>
> 2009/12/24 Christophe Demko <chde...@gmail.com>:

ErikThe3rd

unread,
25 Dec 2009, 00:04:1425/12/2009
to Joomla! Framework Development
I understand the need of the core translation teams to have
translatable language files in one place. On the other side the core
components are a fix set of components and are often used as learning
material on how-to-do it.
With the help of com_localise it should be possible to move the
language files into the component folder. at least for the refactored
core components.

Erik

On Dec 24, 9:25 am, infograf768 <infograf...@gmail.com> wrote:
> It was indeed decided to keep all core language files in the central
> language folders and their name listed in their respective xml in
> order to ease the making of Core language packs for Translators.
> We discussed this matter when we started working on com_localise.
> I suggest therefore that the files listed above be moved to where they
> belong and to make sure when someone is committing any language ini
> that it is listed in the xml.
> Com_localise will ease the making of any type of pack, extension
> specific (one or multiple) or core.
>
> As explained by Sam, the use of extensions specific language folders
> should be reserved to 3pds.
> It is to be noted that any translation for a 3pd extension not
> included by the 3pd dev can only be installed in the main languages
> folders.
> If, for any reason, 2 files of the same name for an extension are
> present, one in the central language folder, the other in the
> extension folder, the main language folder one has precedence.
>
> On 24 Dec, 00:15, Andrew Eddie <mambob...@gmail.com> wrote:
>
> > Shouldn't all the core extensions being in the main language folder?
> > If not, doesn't it make it hard for people doing full language packs?
>
> > Regards,

> > Andrew Eddiehttp://www.theartofjoomla.com-the art of becoming a Joomla developer

infograf768

unread,
25 Dec 2009, 03:25:4625/12/2009
to Joomla! Framework Development
Not so useful IMHO as the core components do not include a real
install.xml + moving the stuff with com_localise is not its purpose +
the component will not be included in core anyway.
It's quite easy to modify the example content plugin to include its
language folder with a sample "example/language/en-GB/en-
GB.plg_content_example.ini" file and the correct example.xml and
example.php files in the "example" folder
Anyhow, all plugins should now be presented in their folder, as are
modules or components.
When getting to beta, we will create a doc to explain all about 1.6
and language matters.

> > > Andrew Eddiehttp://www.theartofjoomla.com-theart of becoming a Joomla developer

Reply all
Reply to author
Forward
0 new messages