Correct way to implement language files in plugin

58 views
Skip to first unread message

Maik Wuerth

unread,
Oct 4, 2018, 8:36:23 AM10/4/18
to Joomla! General Development
Hi everyone,

so I've been trying to add multi language support for my simple system plugin.
But I can't seem to get it working.
this has been driving me crazy...

Here's part of my xml: 
<extension version="3.0" type="plugin" group="system" method="upgrade">
<name>plg_system_rkwwwredirect</name>
<description>PLG_RKWWWREDIRECT_PLG_DESC</description>
<files>
<filename>rkWWWredirect.xml</filename>
<filename plugin="rkWWWredirect">rkWWWredirect.php</filename>
<folder>language</folder>
</files>
And my language file: (.ini and .sys.ini are the same)
PLG_SYSTEM_RKWWWREDIRECT="rkWWWredirect"
PLG_RKWWWREDIRECT_PLG_DESC="Simple, permanent redirect (301) from all non WWW URLs to WWW URL. Plug and Play."
PLG_RKWWWREDIRECT_FORCE_WWW="Force WWW."
PLG_RKWWWREDIRECT_FORCE_WWW_DESC="Redirect non-WWW requests to WWW-Domain."
PLG_RKWWWREDIRECT_REDIRECT_FRONT="Redirect."
PLG_RKWWWREDIRECT_REDIRECT_FRONT_DESC="Choose what Sites to redirect."
PLG_RKWWWREDIRECT_REDIRECT_FRONT_BOTH="Both"
PLG_RKWWWREDIRECT_REDIRECT_FRONT_FRONT="On Front-end"
PLG_RKWWWREDIRECT_REDIRECT_FRONT_BACK="On Back-end" 
 

The language files a in a subdirectory "language/en-GB". I can also confirm that they are being copied to the server. They are encoded in UTF8.
Also manually creating language overrides thit not have any effect.

Can anyone tell me what I've been doing wrong? Can you maybe tell me how you achieved this?


looking forward to hearing from you guys!

Mario Lacunza

unread,
Oct 4, 2018, 3:59:22 PM10/4/18
to joomla-de...@googlegroups.com
Did you check uppercases?

--
You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to joomla-dev-gene...@googlegroups.com.
To post to this group, send email to joomla-de...@googlegroups.com.
Visit this group at https://groups.google.com/group/joomla-dev-general.
For more options, visit https://groups.google.com/d/optout.

Allon Moritz

unread,
Oct 4, 2018, 4:09:32 PM10/4/18
to joomla-de...@googlegroups.com
Enable debug languages and check if they are ok. Also add the same to your plugin as here https://github.com/joomla/joomla-cms/blob/staging/plugins/system/fields/fields.php#L32
Reply all
Reply to author
Forward
0 new messages