Skip to Content Skip to Menu

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

CBSubs Language String substitution failure

  • boyjahq
  • boyjahq
  • OFFLINE
  • Posts: 473
  • Thanks: 33
  • Karma: 3
9 years 5 months ago #265126 by boyjahq
Replied by boyjahq on topic CBSubs Language String substitution failure
Is there a migration-type tool for transforming the old language file format to the new one? Our language file contains hundreds of custom strings (literally).

And yes, I have spent the last 3 days pouring over all of the materials you mentioned, watching the videos about language files and what to expect when moving to CB2, searching forum posts, etc. NOWHERE did I find any Caution notes, telling me that updating from 1.9.1 would require a complete line by line reworking of all language files for multi language sites. Only after exhaustive search did I finally find reference to the language override plugin (which is described as a temporary solution!) with a download link. Because of this lack of critical update information and no clear and direct link to what is involved regarding multi language (especially for something that shows up as an auto update in the Extension Manager update panel in the backend of JOOMLA), it was very difficult for me to believe that the update could shut down a multi language site completely until major effort was put into completely redoing the format of all 1.9.1 language files.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48460
  • Thanks: 8280
  • Karma: 1443
9 years 5 months ago #265135 by krileon
Replied by krileon on topic CBSubs Language String substitution failure

Is there a migration-type tool for transforming the old language file format to the new one? Our language file contains hundreds of custom strings (literally).

No, but you can probably use Notepad++ with TextFX using some REGEXP in a search and replace to mass replace with the new usage. If you've an IDE like phpStorm you could also do a REGEXP search and replace directly in it.

And yes, I have spent the last 3 days pouring over all of the materials you mentioned, watching the videos about language files and what to expect when moving to CB2, searching forum posts, etc. NOWHERE did I find any Caution notes, telling me that updating from 1.9.1 would require a complete line by line reworking of all language files for multi language sites. Only after exhaustive search did I finally find reference to the language override plugin (which is described as a temporary solution!) with a download link. Because of this lack of critical update information and no clear and direct link to what is involved regarding multi language (especially for something that shows up as an auto update in the Extension Manager update panel in the backend of JOOMLA), it was very difficult for me to believe that the update could shut down a multi language site completely until major effort was put into completely redoing the format of all 1.9.1 language files.

We've been telling people to stop using defines. To use 'KEY' => 'STRING' usage. To stop modifying the default language files. We've provided language plugins to example this usage. We announced the language define deprecation change before CB 2.x released, after it released, and provided resources on new usage. We updated Transifex with the 'KEY' => 'STRING' usage as well. All of this information has been available since last year so over 5-6 months this information has been available (and was discussed during RC CB 2.x releases with translate teams).

With that said we also have B/C for defines usage as long as they aren't core strings we'll try to find a define for them if all CBTxt usage checks fail. All of our language usage information is also in a central location at the below page.

www.joomlapolis.com/cb-solutions/languages


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.

  • boyjahq
  • boyjahq
  • OFFLINE
  • Posts: 473
  • Thanks: 33
  • Karma: 3
8 years 11 months ago #273871 by boyjahq
Replied by boyjahq on topic CBSubs Language String substitution failure
I understand that I can do search and replace on the old translation file to make it conform to the new format, but do you have a suggestion for how I treat modifications to existing definitions when I have made modifications to them? For example, in my version of en-gb I changed _UE_MEMBERSINCE from "Member since" to "Member from". Must I go through the entire language file and try to identify all such cases? Or do I simply copy and paste my converted language file (including all duplications) in the existing language file? Will that work? And if it does, won't it create greater drain on performance?

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48460
  • Thanks: 8280
  • Karma: 1443
8 years 11 months ago #273906 by krileon
Replied by krileon on topic CBSubs Language String substitution failure
If you're simply overriding a few strings I do not recommend modifying existing language files or even making a language plugin. Instead use a language override plugin to adjust your few strings. See the below regarding this.

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

Most language keys except those stored in database have changed though so direct copy paste of your old strings likely will not work. You'll need to redo likely some of your strings if not all.


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.

  • boyjahq
  • boyjahq
  • OFFLINE
  • Posts: 473
  • Thanks: 33
  • Karma: 3
8 years 7 months ago #279818 by boyjahq
Replied by boyjahq on topic CBSubs Language String substitution failure
So if I create all the necessary files and folders for my language and make unique additions to language.php, what happens when there is an update to the default language files? How are additions to the default language file added to my separately created language files?

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48460
  • Thanks: 8280
  • Karma: 1443
8 years 7 months ago #279835 by krileon
Replied by krileon on topic CBSubs Language String substitution failure
They aren't, if need strings are added and your language plugin is missing them then the translation will fallback to the default string specified in the code. You'll have to DIFF the two and see what changed.


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