Where is the best place for language files?

For Joomla! 3.x Coding related discussions, you could also use: http://groups.google.com/group/joomla-dev-general

Moderators: ooffick, General Support Moderators

Forum rules
Locked
User avatar
astridx
Joomla! Intern
Joomla! Intern
Posts: 91
Joined: Wed Mar 25, 2015 8:56 am
Location: Germany
Contact:

Where is the best place for language files?

Post by astridx » Sat Jun 18, 2016 10:45 pm

Hi,
I wonder what way is the best to use language files of an extension.
The common way is to load the files to the language folders like this:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<extension
	version="3.0"
	type="plugin"
	group="content"
	method="upgrade">
	<name>plg_content_coordstomap</name>
	<creationDate>Mai 2016</creationDate>
	<license> http://www.gnu.org/licenses/gpl-3.0.html</license>
	<version>1.2.0</version>
	<description>PLG_CONTENT_COORDSTOMAP_XML_DESCRIPTION</description>
	<files>
		<filename plugin="coordstomap">coordstomap.php</filename>
	</files>
[b]	<languages>
		<language tag="en-GB">language/en-GB/en-GB.plg_content_coordstomap.ini</language>
		<language tag="en-GB">language/en-GB/en-GB.plg_content_coordstomap.sys.ini</language>
		<language tag="de-DE">language/de-DE/de-DE.plg_content_coordstomap.ini</language>
		<language tag="de-DE">language/de-DE/de-DE.plg_content_coordstomap.sys.ini</language>
	</languages>[/b]
	</extension>
But it works too, if you copy them to the folder of the extension the way like this:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
-<extension method="upgrade" group="content" type="plugin" version="3.0">
<name>plg_content_coordstomap</name>
<creationDate>Mai 2016</creationDate>
<license> http://www.gnu.org/licenses/gpl-3.0.html</license>
<version>1.2.0</version>
<description>PLG_CONTENT_COORDSTOMAP_XML_DESCRIPTION</description>
<files>
<filename plugin="coordstomap">coordstomap.php</filename>
[b]<folder>language</folder>[/b]
</files>
</extension>
I prefer the second way. This works quite good for me. But I wonder if I miss something and I would better copy the files in the intended language folder.

Regards
Astrid
---
https://blog.astrid-guenther.de/
---
Don't push the river ... it flows by itself ...

User avatar
astridx
Joomla! Intern
Joomla! Intern
Posts: 91
Joined: Wed Mar 25, 2015 8:56 am
Location: Germany
Contact:

Re: Where is the best place for language files?

Post by astridx » Sun Jun 19, 2016 5:36 pm

I asked this question here too and I got feedbacks. If someone is interessted in this: https://groups.google.com/forum/#!topic ... z-hEcpkFfs
---
https://blog.astrid-guenther.de/
---
Don't push the river ... it flows by itself ...


Locked

Return to “Joomla! 3.x Coding”