[#7397] CBSubs - How to build up your own 'terms & condition' text which is translatable

5 years 4 months ago - 5 years 4 months ago #309402 by erichburkhard
HI - I am using the newest CB-Subs plugin. I wanted to create my own 'terms & condition' text below the shopping cart. I tried to do it here with the following string:



in order to translate it I added this string (as an ID) to the corresponding CBSubs language plugin .....but it has not been translated....

as a second try I added the string in the follwowing format to the CBSubs langauge plugin.....



....but this also didn't help ....no translation

so the question is: what did I wrong?

by the way: Is there a possibility to format the alignment of the checkbox and text better?

Attachments:

Please Log in to join the conversation.

5 years 4 months ago #309405 by krileon

so the question is: what did I wrong?

Language keys are a 1:1 of the language string unless the key has been generated. The best approach is to use a special key. Something like "CBSUBS_TERMS_AND_CONDITIONS" then ensure it has no surrounding HTML (e.g. yours currently has a surrounding paragraph element). Then simply translate CBSUBS_TERMS_AND_CONDITIONS to whatever you need.

by the way: Is there a possibility to format the alignment of the checkbox and text better?

It's not lining up due to the paragraph element in "Terms and condition text" parameter.


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.

5 years 4 months ago #309425 by erichburkhard
Hi - I wanted to follow your advise 1:1 to achieve this translation - but I was not successfull at all. At first I used the
ID = CBSUBS_TERMS_AND_CONDITIONS as you told me. But the problem was that the Joomla 'on board' editor (TinyMCE) always generated by default these paragraph elements around the ID (e.g. after saving it looked like this <p>CBSUBS_TERMS_AND_CONDITIONS</p>) ….then I removed the editor under Global Configuration ….but even with the plain ID = CBSUBS_TERMS_AND_CONDITIONS … there was no translation at all....so could you help me? (I think the corresponding CBSubs language plugin is the correct location for the translation - isn't it ?)

a) Which editor do you use?
b) Did you check it? Does the translation of this ID really work in your environment?

regards

Please Log in to join the conversation.

5 years 4 months ago #309430 by krileon
Use the view source button in your WYSIWYG editor and add your language string there to stop TinyMCE from adding paragraph elements (this is an extremely annoying default feature), which you can disable by editing "Editor - TinyMCE" in Extensions > Plugins by setting "New Lines" to "BR Elements".

Yes, 1:1 translation will work fine as again your issue is the paragraph element. You can't inline translate so trying to translate "CBSUBS_TERMS_AND_CONDITIONS" when your string is "<p>CBSUBS_TERMS_AND_CONDITIONS</p>" will not match.


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.

5 years 4 months ago #309438 by erichburkhard
I still don't see any light at the end of the tunnel :unsure:

I edited the mentioned settings of the 'Editor - TinyMCE' plugin as you said …..and also tried to use this 'View source'-tool....but this tool also doesn't work…...because as soon as I click the 'Save' button of main page, the paragraph elements are visible again in this 'View source' tool….and even if I try to translate both versions of this string:

'CBSUBS_TERMS_AND_CONDITIONS' => 'translation 1',

...or...

'<p>CBSUBS_TERMS_AND_CONDITIONS</p>' => 'translation 2',

it will not work !?!

...but there is also something weird.....

I tried to translate the 'Conclusion text' --> look at the screenshot



using the paragraph elements...

<p>Please click now on this button to pay</p>' => 'Bitte klicken Sie auf den nachfolgenden Button um zu bezahlen:',

..and this worked .....?!? how is this possible?

regards
Attachments:

Please Log in to join the conversation.

5 years 4 months ago #309441 by krileon
Where are you trying to translate this? This does not work in Joomla language overrides. You need to use CBs as shown below.

www.joomlapolis.com/blog/kyle/18701-language-overrides-have-arrived

You should then supply the language key CBSUBS_TERMS_AND_CONDITIONS to the parameter. Next in CB language overrides use the below.

Key: CBSUBS_TERMS_AND_CONDITIONS
String: your language string here


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.231 seconds

Facebook Twitter LinkedIn