Text translations and conditions within backend

5 days 13 hours ago #315595 by activha
Hello

I have the string CBPTXT::T( $plan->name ) which seems to be ok for frontend but it does not translate on admin backend and plugin output

Ouput is : [cb:if user="#me" user_id="0"]Negopack avec paiement mensuel[/cb:if][cb:if user="#me" user_id!="0"]Negopack N5 avec paiement mensuel[/cb:if]

Did I miss something ? Or do I have to use another thing ?

Thanks
4 days 17 hours ago #315610 by krileon
Where in backend is it not translating? Some backend views don't translate the strings and instead show raw output. Nearly all backend strings don't run through substitutions.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Templates - CBSubs - Hosting - Forge - Incubator - GroupJive
--
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 EST to 4:00 PM EST. 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.
4 days 17 hours ago #315612 by activha
In the plugin that we just made on the previous post www.joomlapolis.com/forum/255-developer-members-support/241854-how-to-access-items-within-the-basket

In fact this is not a translation but a substitution problem. Strings do translate but they don't apply the substitution after.
So we need to know how to properly apply [cb:if] after translation ? what should we add in the plugin ?
4 days 15 hours ago #315617 by krileon
What specifically in your code are you wanting translations and substitutions applied to? $paymentBasket->item_name should already have translations and substitutions applied. For $name you're using $product->alias, which is the plan alias not the plan name and should be a simple string like "plan-a" which does not parse translations or substitutions.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Templates - CBSubs - Hosting - Forge - Incubator - GroupJive
--
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 EST to 4:00 PM EST. 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.
4 days 15 hours ago #315618 by activha
ok we'll use $product->alias but $product->title does not apply substitution neither in the plugin nor in CB backend.
For instance title displays as [cb:if user="#me" user_id="0"]Adhésion Negopack avec paiement mensuel[/cb:if][cb:if user="#me" user_id!="0"]Negopack avec paiement mensuel[/cb:if] in CBsubs backend
4 days 14 hours ago #315621 by krileon
Review the Pwiki, Google Analytics, or iDevAffiliate integrations as you should be building the $subscription object, followed by $plan object, then calling ->getPersonalized for the plan to get the personalized (language strings and substitutions) plan name. All 3 are utilizing such API directly inside their loadPaymentItems foreach loops.

Substitutions are not ran in most backend views, but you have not clarified what backend view this is a problem in. There also is no $product->title so I have no idea what part of your code you're referring to.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Templates - CBSubs - Hosting - Forge - Incubator - GroupJive
--
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 EST to 4:00 PM EST. 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.
Moderators: beatnantkrileon
Time to create page: 0.431 seconds
Facebook Twitter Google LinkedIn