Language Overrides have arrived!

The long awaited language overrides have officially been implemented. You simply need to install the latest CB 2.x build. Once done edit any language plugin and you should see the new Overrides tab as shown below.

 

From here you can override existing language strings or even add your own. There's no limit to how many you can have and you can freely sort them as needed as well! Overrides will ALWAYS have priority over other language strings so you have no worries in regards to load order, etc..

In addition to this we store the language overrides in a single file located in the language plugins folder. This allows fast loading and parsing of your language overrides, a file backup, and allows the overrides to easily be moved from install to install. They are not dependent on a database so no extra queries!

So start overriding and let us know what you think!



nant's Avatar
nant replied the topic: #297914 6 years 5 months ago

lordbdp wrote: Hi,

very nice idea and simple to use ^^

I have just a problem with the registration email, the link for validation of registering is only with text form (a non-clickable web link).
But for the admin, the email is with clickable web link.

How correct it plz ?

BR


Please start new support thread. I am not seeing relevance of question with thread.
lordbdp's Avatar
lordbdp replied the topic: #297912 6 years 5 months ago
Hi,

very nice idea and simple to use ^^

I have just a problem with the registration email, the link for validation of registering is only with text form (a non-clickable web link).
But for the admin, the email is with clickable web link.

How correct it plz ?

BR
krileon's Avatar
krileon replied the topic: #288022 7 years 4 months ago

As a point of clarification, one needs to download the latest nightly build in order to see the three tabs (Global, Overrides, Parameters) at the top of a language plugin accessible via Community Builder >> Plugin Management >> Default language (English)…or whatever your appropriate language plugin may be. Having a CB version of 2.0.15 isn’t enough…you must have the latest nightly build. This threw me for a bit. I kept looking at my 2.0.15 version (not seeing Joomla tell me that there was an update) thinking it was all up-to-date, but I still didn’t see the three tabs. So if you have version 2.0.15 but don’t see the three tabs, just download the latest nightly build.

Joomla can't version check with our nightly builds. So you'll have to check version manually for nightly CB builds for the time being. We'll likely be adding to CBs internal version checker to check for nightly builds if a nightly build is already installed.

forge.joomlapolis.com/issues/6302

Language overrides seem to work for the regular CB languages:
I’ve got this working with the US English (en-us) version of the language file for Community Builder. The only trick I found was that one needs to look-up the “key” from the language file itself. The “key”, of course, is the capitalized text that precedes the “=>” in the language file. Once one enters the correct key, then all is good and the text entered via the “Overrides” tab works great.

We'll be adding a way to find language keys same as Joomla allows once we find the best way to implement it. For now you can edit the language files directly or use full language debug mode within CB > Configuration > Integrations.

Having trouble getting overrides to work with CBSubs:
Using the nightly build files from Nov 17, 2016 I’m still having problems getting the overrides to work with CBSubs…maybe I’m just not doing this correctly. It looks to me like CBSubs is always reverting back to using the language file located at <webroot>/components/com_comprofiler/plugin/user/plug_cbpaidsubscriptions/language/default_language/language.php. I uploaded the cbpaidsubscriptions-en-us language plugin via Community Builder >> Plugin Management. Then entered that plugin, and access the “Overrides” tab, just like above, to change some of the text (namely the paypal purchase confirmation text beginning with “Thank you for your payment of”, i.e. key = THANK_YOU_FOR_YOUR_PAYMENT_OF_S_FOR_THE_S_S_e7bd92), but when I entered the override text, it didn’t take. Multiple tries didn’t work. I then tried to directly change the text in the language.php file located at <webroot>/components/com_comprofiler/plugin/language/cbpaidsubscriptions-en-us/, and that didn’t work either…no changes were effective. Finally, after digging around some I then make direct changes to the language.php file located at <webroot>/components/com_comprofiler/plugin/user/plug_cbpaidsubscriptions/language/default_language/, that those changes worked!! So if one uploads a language plugin, it looks like there are two copies of the language file with CBSubs using the default location.

CBSubs language files are legacy. They aren't needed anymore and eventually will just be rolled into normal CB language plugins. You can add overrides for CBSubs directly in your CB language files and they should work fine as overrides are absolute and always used if a key match is made.

Template overrides don’t work with language files?
As a final try I attempted to do a template override locating the language.php file at <webroot>/templates/prostar/html/com_comprofiler/plugin/user/plug_cbpaidsubscriptions/language/default_language/. However, changes I made to this file didn’t seem to take either. So maybe template overrides just don’t work with the language files.

I don't understand what template override has to do with language overrides. Do not modify core language files. Use backend language override in CB language plugins only and you'll have no issues.
jamesmoeller's Avatar
jamesmoeller replied the topic: #288018 7 years 4 months ago
First off, it’s good news that Community Builder is moving in the right direction in terms of language (and template) overrides. Good work.

However, relative to the language overrides, I’m not sure it’s completely working yet. The following are my observations (maybe a bit overly verbose) for the good of the community.

Download the latest nightly build:
As a point of clarification, one needs to download the latest nightly build in order to see the three tabs (Global, Overrides, Parameters) at the top of a language plugin accessible via Community Builder >> Plugin Management >> Default language (English)…or whatever your appropriate language plugin may be. Having a CB version of 2.0.15 isn’t enough…you must have the latest nightly build. This threw me for a bit. I kept looking at my 2.0.15 version (not seeing Joomla tell me that there was an update) thinking it was all up-to-date, but I still didn’t see the three tabs. So if you have version 2.0.15 but don’t see the three tabs, just download the latest nightly build.

Language overrides seem to work for the regular CB languages:
I’ve got this working with the US English (en-us) version of the language file for Community Builder. The only trick I found was that one needs to look-up the “key” from the language file itself. The “key”, of course, is the capitalized text that precedes the “=>” in the language file. Once one enters the correct key, then all is good and the text entered via the “Overrides” tab works great.

Having trouble getting overrides to work with CBSubs:
Using the nightly build files from Nov 17, 2016 I’m still having problems getting the overrides to work with CBSubs…maybe I’m just not doing this correctly. It looks to me like CBSubs is always reverting back to using the language file located at <webroot>/components/com_comprofiler/plugin/user/plug_cbpaidsubscriptions/language/default_language/language.php. I uploaded the cbpaidsubscriptions-en-us language plugin via Community Builder >> Plugin Management. Then entered that plugin, and access the “Overrides” tab, just like above, to change some of the text (namely the paypal purchase confirmation text beginning with “Thank you for your payment of”, i.e. key = THANK_YOU_FOR_YOUR_PAYMENT_OF_S_FOR_THE_S_S_e7bd92), but when I entered the override text, it didn’t take. Multiple tries didn’t work. I then tried to directly change the text in the language.php file located at <webroot>/components/com_comprofiler/plugin/language/cbpaidsubscriptions-en-us/, and that didn’t work either…no changes were effective. Finally, after digging around some I then make direct changes to the language.php file located at <webroot>/components/com_comprofiler/plugin/user/plug_cbpaidsubscriptions/language/default_language/, that those changes worked!! So if one uploads a language plugin, it looks like there are two copies of the language file with CBSubs using the default location.

Template overrides don’t work with language files?
As a final try I attempted to do a template override locating the language.php file at <webroot>/templates/prostar/html/com_comprofiler/plugin/user/plug_cbpaidsubscriptions/language/default_language/. However, changes I made to this file didn’t seem to take either. So maybe template overrides just don’t work with the language files.

Reply as you see fit.
Jim
krileon's Avatar
krileon replied the topic: #287818 7 years 4 months ago

PS did you know that when your forum/site sends out updates from topics the read more button link is broken? The text link above works but button is misisng teh site domain etc

Yup, that's a Kunena issue that has been fixed in latest Kunena. We're still working on updating things as it's a large site with a lot depending on it so upgrades are slow going and extra cautious.
wrongjon's Avatar
wrongjon replied the topic: #287817 7 years 4 months ago
Hi

Sorry I updated via the Joomla updater and that only gave me the latest stable 2.0.15. Once I checked your demo i realised I needed o update manually to the latest nightly build so done that and overrides are working great so thank you :)

PS did you know that when your forum/site sends out updates from topics the read more button link is broken? The text link above works but button is misisng teh site domain etc


thanks
jonathan
nant's Avatar
nant replied the topic: #287795 7 years 4 months ago
You can experiment with this on our demo site.
It seems to work there.
MMDoege's Avatar
MMDoege replied the topic: #287793 7 years 4 months ago
Hi

this is my current version of "Default language (English)" plugin: 2.0.15+build.2016.09.16.21.34.37.b2e3df5e1
There you'll find the override tab.
wrongjon's Avatar
wrongjon replied the topic: #287791 7 years 4 months ago
Hi

Thanks but when i go to the CB plugins and edit the language plugin for default english I only see two tabs on that edit screen

Overrides in not showing as a tab so I cant do anything?
MMDoege's Avatar
MMDoege replied the topic: #287789 7 years 4 months ago
Hello wrongjon,

you just have to go to the language plugin you wanna have an override for english dafault.
Eg. if you require a french translation for a given language key then edit "fr-FR" language plug-in.
When having a 3rd. language just put the same language key in and the localization specific to plug-in.

Michael.
wrongjon's Avatar
wrongjon replied the topic: #287783 7 years 4 months ago
Hi
I've upgraded to very latest CB 2.0.15 and even though I've cleared cache and am super user when i go to CB plugins and edit the Default English Language I do not see the new overrides tab?

What am I doing wrong? am I missing a step to get that activated?

thank you
krileon's Avatar
krileon replied the topic: #286419 7 years 5 months ago
Works for all language plugins. Including CBSubs language plugins. It will generate the override.php file and load it for the respective language if present.

If you are using the language override workaround plugin then move "cblanguageoverride-language.php" to the root of your language plugins folder and rename it to "override.php" then uninstall the language override plugin. Your language overrides should be working fine still and more reliably. You no longer need that plugin.
activha's Avatar
activha replied the topic: #286416 7 years 5 months ago
Very interesting, could you precise if this works for the main CB language file or also for alll plugins files ?
What happens to the cbplugin folder located in fr-fr folder for instance ? and what happens to the cblanguageoverride-language.php file ?
Does it mean that cbplugin folder will now only receive the "regular" translations and that we can add all strings to the language override that you explain in this article ?

Thanks for all the good work :)

Facebook Twitter LinkedIn