Skip to Content Skip to Menu

Language substitutions in Promotions

6 years 9 months ago #302244 by richbrundage
Language substitutions in Promotions was created by richbrundage
I am trying to use language substitutions in a cb subs promotion but the substitutions are not displayed, just the [substitution_string] key. The keys and substitution texts appear as expected in the override section of the default language override tab. I have tried both the append and the custom version of display modification. I know the substitution is active because I can use it in a plan name and it works.

Richard Brundage

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

  • krileon
  • krileon
  • OFFLINE
  • Posts: 48541
  • Thanks: 8290
  • Karma: 1445
6 years 9 months ago #302264 by krileon
Replied by krileon on topic Language substitutions in Promotions
Where are you trying to use a language key (e.g. what parameter specifically)? Please keep in mind language keys do not work inline so trailing spaces can prevent a language key from 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.

6 years 9 months ago #302272 by richbrundage
Replied by richbrundage on topic Language substitutions in Promotions
On the Display tab of the Promotion, in these fields

Plan name override
Plan description override

I thought it might be an interaction with the existing data, such as existing Plan name, but the language key doesn't work even it the Display tab is set to Custom (replacing normal plan name and description

Richard Brundage

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

  • krileon
  • krileon
  • OFFLINE
  • Posts: 48541
  • Thanks: 8290
  • Karma: 1445
6 years 9 months ago #302296 by krileon
Replied by krileon on topic Language substitutions in Promotions
Did you add the language override to CBs language plugin or CBSubs? If added to CBSubs please be sure CBSubs is completely up to date. If added to CB try adding it to CBSubs instead. Be sure there's no leading or trailing spaces when overriding.


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.

6 years 9 months ago #302311 by richbrundage
Replied by richbrundage on topic Language substitutions in Promotions
I made the changes in the CB default language plugin through the override.php file, confirming them in the plugin via the administrator interface. I installed the CB Subs english language plugin and tried it there and had more success, but not complete. If the promotion display is set replace the strings are displayed correctly, but if it is set to append, the strings defined by the CB Subs language plugin are displayed correctly but the ones defined by CB default language display the key and not the substitution.

I have installed the most recent nightly build to test this, and there are no trailing spaces in the substitution strings.

I was puzzled by your suggestion to try the CB Subs language plugin because in my previous work on language substitutions I saw the following:

krileon wrote: Add your CBSubs language overrides to your CB language plugin. CBSubs has no loading behavior for the overrides file (although CB will create it). CBSubs language files are basically legacy now since we've support for plugin language files already in CBs language loading behavior.


It appears this is no longer the case, and that language substitutions for CB subs should be done via separate CB subs language plugins and not the CB language plugins, please confirm.

Richard Brundage

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

  • krileon
  • krileon
  • OFFLINE
  • Posts: 48541
  • Thanks: 8290
  • Karma: 1445
6 years 8 months ago #302348 by krileon
Replied by krileon on topic Language substitutions in Promotions
Language overrides in CBSubs language plugins was fixed awhile back so you can indeed place your CBSubs language overrides there now. If it's working there then suggest continuing to use them there.


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.

Moderators: beatnantkrileon
Powered by Kunena Forum