Skip to Content Skip to Menu

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

Where to place custom constants?

  • GUEST
11 years 1 week ago #235488 by
Hello!

I have some custom strings that I would need in several languages inside CB.
A good example is the dreaded '_UE_TABINBOX' which is the label for IM Inbox tab in community builder. I am also running a multilingual site, so just renaming the tab to 'Inbox' isn't cutting it for me.

I could now edit all the various language translation files for CB and add the related string like this

DEFINE('_UE_TABINBOX','Inbox');

but on next language file update these customization would be gone and I would have to re-do it.

Do you know of a better way to place i18n strings that are safe regarding later upgrades?

Let me know if you need more info.

Best regards

Carsten

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48473
  • Thanks: 8281
  • Karma: 1443
11 years 1 week ago #235500 by krileon
Replied by krileon on topic Where to place custom constants?
Download the English language plugin and modify it. This helps avoids the default language being overridden on update. You can find the English language plugin at the below location.

forge.joomlapolis.com/projects/lan-cb-en/files


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.

  • GUEST
11 years 1 week ago #235595 by
Replied by on topic Where to place custom constants?
That at least resolves the issue for CB updates. But as soon as I update a language file I will still have to redo the changes.
Wouldn't it be nice to have a facility where i can enter DB-based custom translations that are checked before/after the standard translations?

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48473
  • Thanks: 8281
  • Karma: 1443
11 years 1 week ago #235608 by krileon
Replied by krileon on topic Where to place custom constants?

But as soon as I update a language file I will still have to redo the changes.

Best I can suggest to combat this issue is use a program like Winmerge to diff the latest against your current language file to see what the changes were then simply add in the changes manually to your existing. This would avoid your custom changes being overridden.

Wouldn't it be nice to have a facility where i can enter DB-based custom translations that are checked before/after the standard translations?

That's planned for a later CB release, but for now language plugins is our only translation solution.


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