Skip to Content Skip to Menu

🎃 Happy Halloween! Treat yourself with an awesome discount on memberships! Get 20% off now with code SPOOKY-2024!

New custom language string in field not working.

  • sarkomand
  • sarkomand
  • OFFLINE
  • Posts: 9
  • Thanks: 1
  • Karma: 0
8 years 8 months ago #278450 by sarkomand
Hello.

I've created a new custom HTML field for the registration form to put a subtitle and an introtext.

On the field description I've added this:

<h2>CB_TYPE_AANVRAAG</h2>
<p>CB_TYPE_AANVRAAG_INTRO</p>

I'm using the language override plugin. I've added this to the cblanguageoverride-language.php file:

'REGISTER_TITLE' => 'Lidmaatschap aanvragen',
'CB_TYPE_AANVRAAG' => 'TYPE AANVRAAG',
'CB_TYPE_AANVRAAG_INTRO' => 'Lorem ipsum dolor sit amet',

REGISTER_TITLE works as expected, but my customs strings don't. I've also added my strings to language.php but they still don't work.

How can I make my custom strings work?

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48460
  • Thanks: 8280
  • Karma: 1443
8 years 8 months ago #278542 by krileon
You can't have inline translations. You need to use only a language string then add your HTML, etc.. to it. Example as follows.

Code:
'CB_TYPE_DESC' => '<h2>TYPE AANVRAAG</h2><p>Lorem ipsum dolor sit amet</p>',

You'd then use CB_TYPE_DESC as your field description.


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.
The following user(s) said Thank You: sarkomand

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

Moderators: beatnantkrileon
Powered by Kunena Forum