Page 1 of 1

Don't duplicate language files! (code available)

Posted: 29 Jun 2013, 20:12
by horus68
Is it possible to not duplicate language files (admin/site)

True this can be done by installer
But its not required and will be easier to all not to manage double files, specially when doing local updates or online translations.

There is an example on how to implement this:

Code: Select all

You should not need to copy the same file in the frontend. All you need is the joomla API :)
In your componentname.php file in the frontend you could do (example from hotspots):
With those 3 lines you can use the same admin language file in the frontend and you don't need to copy files around. 1 location = less things to maintain and less thinks can brake.
compojoom.com/forum/ctransifex/17455-identical-files-for-site-and-admin#19126

Please implement this on All Phoca extensions!

Keep Calm and Translate Joomla - sites.google.com/site/transjoomla

Re: Don't duplicate language files! (code available)

Posted: 04 Jul 2013, 09:31
by Jan
Hi, thank you for the info, unfortunatelly, there are more limits as it seems :-( If you manage over 1000 translation files and you get e.g. over 30% of the files not complete (e.g. lang-lang.com_component.ini is included and lang-lang.com_component.sys.ini not) and over 95% of the translations have no installation XML (so user install them per FTP) I really cannot imagine what happen if there will be four files insteand of two.

But anyway, thank you for the info, I will take a look at it to and will try to implement it for some of the next version (of course first I need to write the extensions for e.g. Joomla! 3 so they will exist at all)

Thank you, Jan