Skip to Content Skip to Menu

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

Custom Fields and their translation

  • netizenuk
  • netizenuk
  • OFFLINE
  • Posts: 36
  • Thanks: 1
  • Karma: 0
9 years 1 month ago #270449 by netizenuk
Custom Fields and their translation was created by netizenuk
Hello,
Is there a tutorial document somewhere on CUSTOM FIELDS and how to translate them?
In specific I am trying to introduce new fields. I can easily translate its title but I cannot succeed in translating its description. Note that currently I am editing the default translation file of that language and I understand that this will be overwritten on a potential update.
Q1: Do I *have* to have a custom language plugin in order for my custom fields to be translated or the temp solution above should be working already?
Q2: Can I have more than one custom language plugins of the *same* language? I.e.one that I have downloaded from JP and one custom made by me, or this will break things?
Thank you.

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

  • nant
  • nant
  • OFFLINE
  • Posts: 12339
  • Thanks: 1467
  • Karma: 877
9 years 1 month ago #270465 by nant
Replied by nant on topic Custom Fields and their translation

netizenuk wrote: Hello,
Is there a tutorial document somewhere on CUSTOM FIELDS and how to translate them?
In specific I am trying to introduce new fields. I can easily translate its title but I cannot succeed in translating its description. Note that currently I am editing the default translation file of that language and I understand that this will be overwritten on a potential update.
Q1: Do I *have* to have a custom language plugin in order for my custom fields to be translated or the temp solution above should be working already?
Q2: Can I have more than one custom language plugins of the *same* language? I.e.one that I have downloaded from JP and one custom made by me, or this will break things?
Thank you.


If you are using some html editor you need to edit directly the HTML code and make sure there is no tag (example <p>) in the description - if the description only has the language key (example: MY_FIELD_DESCRIPTION) it should be picked up ok.
The following user(s) said Thank You: netizenuk

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

  • netizenuk
  • netizenuk
  • OFFLINE
  • Posts: 36
  • Thanks: 1
  • Karma: 0
9 years 1 month ago #270495 by netizenuk
Replied by netizenuk on topic Custom Fields and their translation
OK I got it now. I was doing the right thing with the wrong editor which was adding a <p> in the description and it caused the translation to not work.

Can you please answer Q2 as I now need to start making sure that things wont get lost after an update. Am I supposed to create new (custom) language plugins for eng and the other language and have them working concurrently with the ones downloaded from JP ?

Thank you Niko

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48466
  • Thanks: 8280
  • Karma: 1443
9 years 1 month ago #270498 by krileon
Replied by krileon on topic Custom Fields and their translation
You can try a language override plugin otherwise you need to maintain your own language plugin. You can't have 2 language plugins of the same language installed at the same time. See the below for language override usage information.

www.joomlapolis.com/forum/6-news-and-publicity/227556-cb-language-override-video-tutorial-resources


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.

  • netizenuk
  • netizenuk
  • OFFLINE
  • Posts: 36
  • Thanks: 1
  • Karma: 0
9 years 1 month ago #270603 by netizenuk
Replied by netizenuk on topic Custom Fields and their translation
Thank you for the reply.

I have not yet installed and used the override plugin but I watched the youtube tutorials about languages and the override plugin. It does make sense when using language keys but what about having a custom html field in the registration form which we want it to appear in multiple languages? Am I correct to assume that we cannot include html tags in language keys?
If yes, what is the proper way of doing this?

Thank you in advance,
N

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48466
  • Thanks: 8280
  • Karma: 1443
9 years 1 month ago #270622 by krileon
Replied by krileon on topic Custom Fields and their translation

but what about having a custom html field in the registration form which we want it to appear in multiple languages?

You'd just add a language key to the Custom HTML field then translate it in your language files.

Am I correct to assume that we cannot include html tags in language keys?

A language key is just to reference a language string. The key can have HTML, but I don't recommend it. Examples as follows.

Recommended:
'MY_FIELD_DESCRIPTION' => '<strong>Test</strong>'

Not Recommended (but should work):
'<strong>Test</strong>' => '<strong>Test</strong>'


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