Multilingual Support for Checkbox Values

1 month 1 week ago #337763 by 4creator
Hello,

Is it possible to make the Labels for the Values in a field created as a Check Box (Multiple) multilingual?
I have tried using [cb:userdata field="FIELD_NAME" /], [cb:userfield field="FIELD_NAME" /], [FIELD_NAME], and simply FIELD_NAME, but in all cases, the input values are displayed as plain text without referring to the language files.

Thanks

Please Log in to join the conversation.

1 month 1 week ago - 1 month 1 week ago #337769 by krileon
Replied by krileon on topic Multilingual Support for Checkbox Values
Yes, you need to use [cb:userfield field="FIELD_NAME" /] so the field will be processed and output normally. [FIELD_NAME] and [cb:userdata field="FIELD_NAME" /] output raw database values so they won't translate. Be sure your language keys exist in every language plugin you have installed (including Default).


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 to join the conversation.

1 month 6 days ago - 1 month 6 days ago #337777 by 4creator
Replied by 4creator on topic Multilingual Support for Checkbox Values
I have already been using 
[cb:userfield field="FIELD_NAME" /]
 elsewhere, and I have confirmed that it is working in my environment. However, the Label in the Value section of the Check Box (Multiple) are not functioning as expected. FIELD_NAME has been confirmed to exist in the language file. Please check it.

Here is my environment:
  • Joomla 5.0.3
  • Community Builder 2.9.1+build.2023.12.19.18.36.55.b65c99514
  • MySQL 8.0.36
  • PHP 8.2.17
  • utf8mb4_unicode_ci
Attachments:

Please Log in to join the conversation.

1 month 6 days ago #337783 by krileon
Replied by krileon on topic Multilingual Support for Checkbox Values
Substitutions are not supported in option fields label parameter. You need to use a language key there not a substitution for it to be multilingual. Example as follows.

Option
Value: 1
Label: VALUE_1

Language Override
Key: VALUE_1
String: Value 1


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 to join the conversation.

1 month 5 days ago #337785 by 4creator
Replied by 4creator on topic Multilingual Support for Checkbox Values
Strange fact. As I mentioned at the beginning, I initially tried FIELD_NAME. It did not work as expected.
Today I tried again and FIELD_NAME works. (My issue did not exist!)

I have wasted your time needlessly. My apologies.
Thank you for your support.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.164 seconds

Facebook Twitter LinkedIn