Skip to Content Skip to Menu

[#3619] CB Query Field Translation

  • krileon
  • krileon
  • ONLINE
  • Posts: 48536
  • Thanks: 8290
  • Karma: 1445
12 years 3 months ago #207122 by krileon
Replied by krileon on topic Re: CB Query Field Translation
That's because it's trying to translate the end result and the end result is "Switzerland _UE_MALE", which has no language string.


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.

  • nicophp
  • nicophp
  • OFFLINE
  • Posts: 68
  • Thanks: 8
  • Karma: 7
12 years 3 months ago #207240 by nicophp
Replied by nicophp on topic Re: CB Query Field Translation

That's because it's trying to translate the end result and the end result is "Switzerland _UE_MALE", which has no language string.


So there is no way to use translations in multiple columns or rows?

I have even tried to translate Switzerland _UE_MALE in both language and cbteamplugins_language but not working

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48536
  • Thanks: 8290
  • Karma: 1445
12 years 3 months ago #207245 by krileon
Replied by krileon on topic Re: CB Query Field Translation
No, the only way to do that is split the string and translate word for word and I'm not going to do that. It translates the entire end result. This includes if it has spaces, linebreaks, etc, every character entered counts towards the string.

It doesn't work the same as using substitutions and does not pass through getField or anything of the sort. It's literally just pulling the value from the database.

The best approach is to get the country using CB Query Field if the country is stored to a separate database table. Then format everything in a delimiter field as you could use full field substitution, which will translate it. Example as follows.

[cb_country] [cb:userfield field="cb_gender" /]

Reviewing your query as it's [user_id] specific you could use the below.

Output: Single Row
Columns: Multiple Columns
Display: Custom
Custom: [column_cb_country] [cb:userfield field="cb_gender" /]

However, as both fields are stored in the _comprofiler database there is no purpose in using queries. Just use a delimiter with the below.

[cb:userfield field="cb_country" /] [cb:userfield field="cb_gender" /]


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.

  • nicophp
  • nicophp
  • OFFLINE
  • Posts: 68
  • Thanks: 8
  • Karma: 7
12 years 3 months ago #207410 by nicophp
Replied by nicophp on topic Re: CB Query Field Translation
Thanks, I will work around with your suggestions and more karma for you ;)

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

Moderators: beatnantkrileon
Powered by Kunena Forum