Translate description CBSubs Plan with formatting

12 years 5 months ago #183692 by dotcom22
hello

My site in multilingual and I want translate Plan description and also format the description by putting some standard element like image, text align and more..

If I'm refering to this post:

www.joomlapolis.com/forum/151-potential-bug-112/149629-solved-qdescription-of-planq-not-translated-in-cbsubs#165376

It seem is not possible because for work the string/translation inside textarea field must be totally empty of HTML tag.

That mean if for example I want simply insert the description centered using this code:

<p style="text-align: center;">My plan description string</p>


I can not and I must use only

My plan description string


Do you confirm ??

If yes this is a bit annoying because that mean we can't format the description in attractive manner..

Have you a trick/suggestion ??

thank

I use Joomla 3.3.6 - CB 2.0.4 - CBSubs 4 - Several Incubator plugins

Please Log in to join the conversation.

12 years 5 months ago #183741 by krileon
You'll need to use language definitions instead of language strings. These are translated within language.php and default_language.php. Example as follows.
define( '_UE_PLAN1', '<p style="text-align: center;">My plan description string</p>' );

Then for your plans description you'd use _UE_PLAN1.


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.

12 years 5 months ago #183841 by dotcom22
Haaa ok but I don't understand in witch file I must include Define String. I tried inside both CB and CBSubs "french.php" file but I get no change when the code is inside CB language and I get an error when is inside CBSubs language..

I use Joomla 3.3.6 - CB 2.0.4 - CBSubs 4 - Several Incubator plugins

Please Log in to join the conversation.

12 years 5 months ago #183894 by krileon

Haaa ok but I don't understand in witch file I must include Define String. I tried inside both CB and CBSubs "french.php" file but I get no change when the code is inside CB language and I get an error when is inside CBSubs language..

Example location as follows.

components/com_comprofiler/plugin/language/default_language/default_language.php

The best test is to open the file and see if it's using DEFINE for strings and if it is then you're at the right place.


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.

12 years 5 months ago #183912 by dotcom22
so I'm in the correct location...that mean in the Global language for CB because CBSubs use string and not define code in his language file.

So for example in case of french language my path is:

/public_html/components/com_comprofiler/plugin/language/french/french.php

I added at bottom of this file (I already placed many other custom define string in it) this code:
DEFINE('_UE_GOLDPLAN', '<p style="text-align: center;">My plan description22 string</p>');

and in my plan description the related string _UE_GOLDPLAN without any other html. I use JCE and I checkd many time if some other element are present who can maybe conflict.. I tried to put a simple text in define instead to mix with html but no change...

I cleared cache and other however the description show always _UE_GOLDPLAN ... :blink:

Any suggestion?

I use Joomla 3.3.6 - CB 2.0.4 - CBSubs 4 - Several Incubator plugins

Please Log in to join the conversation.

12 years 5 months ago #183933 by krileon
Was able to confirm this is a bug and have created bug ticket #3049 for further investigation. I was able to find a successful workaround however. You'll need to add your string to the cbteamsplugin language files or to your CBSubs language files as follows.
'_UE_GOLDPLAN' => '<p style="text-align: center;">My plan description22 string</p>',

Ensure you add this between a "CBTxt::addStrings( array(" definition and its closing tag.


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.

Moderators: beatnantkrileon
Time to create page: 0.226 seconds

Facebook Twitter LinkedIn