Update multilingual.md
User description
Added a way to easily add Language Overrides
PR Type
documentation
Description
- Added a new section to the multilingual documentation on using language overrides from the backend.
- Included PHP code examples for translating strings using Joomla's
Textclass. - Provided step-by-step instructions for creating language overrides in Joomla's backend.
Changes walkthrough 📝
| Relevant files | |||
|---|---|---|---|
| Documentation |
|
💡 PR-Agent usage: Comment
/helpon the PR to get a list of all available PR-Agent tools and their descriptions
PR Reviewer Guide 🔍
| ⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪ |
| 🧪 No relevant tests |
| 🔒 No security concerns identified |
| ⚡ No key issues to review |
PR Code Suggestions ✨
| Category | Suggestion | Score |
| Enhancement |
✅ Provide a detailed guide on creating language overrides in JoomlaSuggestion Impact:The commit added a more detailed explanation of how to create language overrides in Joomla, including steps to navigate to the Language Overrides section and select the appropriate options, which aligns with the suggestion to provide a step-by-step guide.code diff:
It's recommended to provide an example of how to add a new language override in the versioned_docs/version-5.1/general-concepts/multilingual.md [22]
Suggestion importance[1-10]: 9Why: This suggestion adds practical value by providing a step-by-step guide, making the documentation more user-friendly and actionable. | 9 |
✅ Add a comment explaining the function of the code snippetSuggestion Impact:The commit added a comment explaining the function of the Text::_("MOD_EXAMPLE_HELLO") and Text::_("MOD_EXAMPLE_GOODBYE") code snippets, enhancing understandability.code diff:
Add a brief explanation or comment in the code snippet to describe what versioned_docs/version-5.1/general-concepts/multilingual.md [17]
Suggestion importance[1-10]: 8Why: Adding a comment to explain what the code does significantly enhances understandability, especially for readers unfamiliar with Joomla or its i18n features. | 8 | |
| Readability |
✅ Improve the readability by structuring the content into distinct paragraphsSuggestion Impact:The commit improved readability by breaking the text into smaller paragraphs, aligning with the suggestion to separate different concepts.code diff:
Suggestion importance[1-10]: 7Why: Breaking the text into smaller paragraphs improves readability and helps in better understanding, but it is a minor enhancement. | 7 |
| Maintainability |
✅ Improve the clarity of the constant name in the example codeSuggestion Impact:The commit replaced the placeholder constant NAME_OF_YOUR_CONSTANT with more descriptive constants like MOD_EXAMPLE_HELLO and MOD_EXAMPLE_GOODBYE, improving clarity.code diff:
Suggestion importance[1-10]: 6Why: The suggestion to use a more descriptive constant name improves code readability and maintainability, but it is not crucial for understanding the example. | 6 |
Thanks for your contribution!
I really don't want to discourage you as a first time contributor, but we would need in this section some explanation about how Joomla handles multiple languages, ie the idea of using "language constants " and then translating them via the .ini and .sys.ini language files using the Text::_ function.
You could also reference https://manual.joomla.org/docs/building-extensions/install-update/install/manifest#languages which is about including the languages in an extension's manifest file.
Think about a developer who wanted to find out how Joomla handled multiple languages, and what he/she needed to do in their extension code to align with that. That's what should go in this section.
Finally, I suggest you remove "Letting Content Editors edit translations in Joomla is easy." It's not very relevant here (and maybe rather debatable too).
Hey, firstly, thanks for this manual, it really helped me in my job.
I was working on creating a custom template in tailwindcss in Joomla, so I just stumbled upon the missing contribution. Sorry for not doing it the right way, I kinda did it on the fly on my job :D
I'm not a Joomla Expert myself, that's why I only did the Language Overrides in this part of the Manual, however I would be interested in learning how to do it separated in files.
So what you mean is finish the entire page, and add a way to have translations in files in custom components and modules, right?
Cheers, AL
The manual is really aimed at developers of Joomla extensions, so it's providing information to developers about how to design and implement components, modules, plugins and templates primarily.
I would have imagined the multilingual section having something along the following structure
- Some introductory / background material about how Joomla supports multiple languages.
This would describe installed vs content languages, and cover the concept of language constants and .ini and .sys.ini files.
- How to build multilingual support into your extension
Covering manifest files https://manual.joomla.org/docs/building-extensions/install-update/install/manifest#languages and what's in https://manual.joomla.org/docs/building-extensions/modules/module-development-tutorial/step4-languages.
Components will need a 'language' column in any database table, and filter content to users based on it - https://docs.joomla.org/J3.x:Developing_an_MVC_Component/Using_the_language_filter_facility (although the details of this would be in an updated component development tutorial).
- How Joomla Debug utility can help troubleshooting
Other topics could include the following - but mostly linking out to other sections (some of which haven't been written yet)
Language Overrides - this is mostly an admin feature, rather than being relevant to developers, and Joomla handles all the complexity on their behalf. But they should be aware of it.
Language Associations - https://docs.joomla.org/J3.x:Developing_an_MVC_Component/Adding_Associations
Form Fields - https://manual.joomla.org/docs/general-concepts/forms-fields/standard-fields/language and https://manual.joomla.org/docs/general-concepts/forms-fields/standard-fields/contentlanguage
Took a while but I hope its better now. cheers
This is much better - many thanks! Just several comments of a minor nature.
Could you increase the header levels in your file. Ie change ### to ## and #### to ###.
That will make it more consistent with other documentation.
Sure will do that! I have a question, is there someone to write the components documentation?
I would be interested in doing that since I never really understood it completely, hence why I am asking you, do you have a proper Joomla 4 Component Tutorial / Guide I can orient myself to?
Personally, I believe that understanding components and how they work together with modules to be the hardest part about joomla.
I would also offer to do a tutorial on how to write your own template and how to use tailwindcss in Joomla. Let me know your thoughts. Cheers
That would be great if you were willing to do either a component or a template tutorial.
In that case, it would be useful if you got connected to the joomla mattermost community at https://joomlacommunity.cloud.mattermost.com
I registered and got on it with the same name as in my GitHub. What should I do now? ..