How can I develop a feature in Moodle to ensure that it will support all languages, including RTL languages such as Arabic and Hebrew?
2 Answers
Moodle already supports right to left languages.
You just need to be careful about styling. There are some guidelines here : https://docs.moodle.org/dev/CSS_coding_style#Right-to-left

- 9,436
- 1
- 27
- 41
-
Won't I need to change any code that reads as follows? $fullname = $firstname . ' ' . $lastname; (there may be a core function that should be used instead of the above to provide the full name, but the general point is about difficulties thrown up by concatenation). – Joseph Cape May 12 '15 at 07:40
Moodle natively supports RTL lingos, as Russell England already said. Just make sure that you include a CSS document to your plugin/theme where the padding/margins are on the right side of text rather than the left side, and you'll be good-to-go. No extra coding required. :)
Some concatenations may need to be reversed depending on how clean your core code is, if it's standard core, Moodle will automatically know which way round to concatenate short strings and numbers. If not, it's still not such an issue since it's a fairly straight forward PHP edit to get things to work the way they should.
You may encounter issues if your data is not compliant with your site's language. E.g. Rendering an English full name on an Arabic site, as the name will show up reversed.
TLDR: Moodle supports RTL natively. There's no specific requirement for custom code except for some specific concatenations cases.

- 797
- 2
- 10
- 22