Skip to Content Skip to Menu

[#7679] Weired translation concerning the use of CB language plugins

5 years 3 months ago - 5 years 3 months ago #313519 by erichburkhard
HI - I found some really weird issue concerning cb language plugins and the translation mechanism. I will show you an example with the CB German language plugin, but I think this issue affects ALL CB language plugins. So let me show you step by step what I mean:


1. In the following override.php file (the file is located here: /components/com_comprofiler/plugin/language/de-de) I added the following translation string:

'_UE_IDP_COUNTRY_LIBERIA' => 'Liberia',

By the way: This sting is also visible when you open directly the CB 'de-DE' language plugin and navigate to the 'Overrides' tab. So far so good.


2. Now I have seleted a profile of a community member and changed his country field to 'Liberia'....the (expected and correct) result is visible in the follwoing screenshot (profile edit mode)






3. Now I switched to the profile view mode. Of course my expectation was that I see also the string 'Liberia' as a country......but this was not the case.....The string visible was 'Liberien' instead of 'Liberia' ... see also next screenshot





4. I thought that this result can not be true....so I changed the translation string in the above override.php file to the following...

'_UE_IDP_COUNTRY_LIBERIA' => 'LiberiaXXX',

..and made the test again. Now it WORKED!!! I could read 'LiberiaXXX' in the profile edit mode and in the profile view mode as well. I was totally confused now.....


5. Now I started to browse through all the language files of my joomla installation to check whether I could find the string: 'Liberien' somewhere.....my search was successfull.....I could find the following language string:

'LIBERIA_642cab' => 'Liberien',

in the following file: /components/com_comprofiler/plugin/language/cbpaidsubscriptions-de-de/language.php


6. To verify that this is the string responsible for this translation I changed the following two language string:

a) 'LIBERIA_642cab' => 'LiberienTTT'

b)..... and the language string (mentioned unter 1) back to:

'_UE_IDP_COUNTRY_LIBERIA' => 'Liberia',

...an tested again. As expected the string: 'LiberienTTT' was only visible in the profile view mode ('Liberia' in the profile edit mode)


7. I deinstalled and reinstalled the german CB language plugin (and reloaded my german override.php file) --> no effect

8. According to my assuption a 2 phase translation happens here:

1. As a first step this string will used to result in 'Liberia': '_UE_IDP_COUNTRY_LIBERIA' => 'Liberia',
2. As a second step the string 'Liberia' matches with 'LIBERIA_642cab' => 'Liberien', ... and will result in 'Liberien'

The other possibility is that something is corrupt with my joomla installation

Best regards
Attachments:
Last edit: 5 years 3 months ago by krileon. Reason: Added [#7679] tag to subject

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48541
  • Thanks: 8290
  • Karma: 1445
5 years 3 months ago #313528 by krileon
Double translation bug. What type of field are you using specifically? Is it just a standard select field or is it a code/query select?


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

5 years 3 months ago #313540 by erichburkhard
Hi it is a Dropdown (Single Select) field.

regards

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48541
  • Thanks: 8290
  • Karma: 1445
5 years 3 months ago #313541 by krileon
Do you have ajax editing enabled for the field as well? or using the Layout parameters for the field? Standard select field shouldn't have any double translate issues.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

5 years 3 months ago #313568 by erichburkhard
Hi I don't understand. How can I check if ajax is enabled or not? If I am going to edit the field it looks like this:

Attachments:

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48541
  • Thanks: 8290
  • Karma: 1445
5 years 3 months ago #313569 by krileon

How can I check if ajax is enabled or not?

Under Integrations > CB Core Fields Ajax you can check if ajax editing is enabled or not. If CB Core Fields Ajax is not installed then it's for sure not enabled. If enabled you'd be able to edit the field from profile view instead of just profile edit.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum