Skip to Content Skip to Menu

[#3619] CB Query Field Translation

  • nicophp
  • nicophp
  • OFFLINE
  • Posts: 68
  • Thanks: 8
  • Karma: 7
12 years 3 months ago #206841 by nicophp
Replied by nicophp on topic Re: CB Query Field Translation
Thanks, have installed it but without success in translation. I went up to test the simplest query form my gender field which is from Drop Down (Single Select) type, properly translated, whose values are strings:
_UE_MALE
_UE_FEMALE

and the stupid test query is:
SELECT `cb_gender`
FROM `jos_comprofiler`
WHERE `user_id` = '[user_id]'

OK return the right sex but displays _UE_MALE, which is present (to achieve the test)in both language.php and cbteamplugins_language.php

Am I missing something?

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 #206889 by krileon
Replied by krileon on topic Re: CB Query Field Translation
Try translating the string in cbteamsplugins with the below.

'_UE_MALE' => 'Male'

The old defines usage is just that, old, I don't implement support for it anymore; nor test its usage. The result is passed through substitutions where I've set it to translate these strings, but maybe there's a space or something preventing the translation.


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.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48536
  • Thanks: 8290
  • Karma: 1445
12 years 3 months ago #206890 by krileon
Replied by krileon on topic Re: CB Query Field Translation
Just confirmed translation worked fine (new and old). Where are you using the field at specifically? How is the field configured? Single row? Maybe CB language plugins aren't loaded yet. Try editing cbqueryfield.php and adding cbimport( 'language.cbteamplugins' ); to the top of getQuery function and confirm if working.


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 #206952 by nicophp
Replied by nicophp on topic Re: CB Query Field Translation
Thanks, as said, had the translations OK (in both styles in case of), language.cbteamplugins was already loaded, but had the Multiple columns activated. So configuring back to Single column... Works fine, don't need to add cbimport( 'language.cbteamplugins' ); to the top of getQuery function.

Have tested the following query and as far as you live Rows and Columns to Single, translation works (for sure, in that case it's only displaying the 1st field)
SELECT `cb_gender`,`cb_country`
FROM `jos_comprofiler`
WHERE `user_id` = '[user_id]'

Seems that multiples rows or columns give problems even adding cbimport( 'language.cbteamplugins' ); to the top of getQuery function. .

Now with these 2 translations systems in parallel, I have to duplicate some strings for each language (eg. 250 country names) x number of languages of the site...you imagine the work.

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 #206995 by krileon
Replied by krileon on topic Re: CB Query Field Translation
Please provide your exact configuration that's not working. When using multiple columns it uses a header/row/footer type display, which you supply substitutions for columns to (e.g. [column_cb_gender]) and it translates the entire header/row/footer so translations may not work as the expected result will be different.


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 #207033 by nicophp
Replied by nicophp on topic Re: CB Query Field Translation
Field Title: _UE_COUNTRYNAME, in translation field DEFINE('_UE_COUNTRYNAME','Test País-Sexo');

SELECT `cb_country`, `cb_gender`
FROM `jos_comprofiler`
WHERE `user_id` = '[user_id]'

Mode Internal
Output Single Row
Columns Multiple Columns
Display Delimiter
Delimiter Space

Result:
Test País-Sexo: Switzerland _UE_MALE

But both `cb_country` and `cb_gender` will be well translated if kept alone with Single Row and Single Column

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

Moderators: beatnantkrileon
Powered by Kunena Forum