- 05 Jul 2023
- 1 minute to read
Check locale compatibility
- Updated on 05 Jul 2023
- 1 minute to read
In Totara you can use language packs to localise your site for other languages. Any language packs you use will include the name of the operating system locale, which is used for formatting dates. If the server's locale name is different to the locale name found in the language pack, a number of errors can arise where dates are displayed on your site (e.g. on the calendar).
- Go to Quick-access menu > Localisation > Locale compatibility check.
- Check the Local test column of the table - if this says OK then you do not have any errors.
If you identify any errors while using this tool you can address the problem by installing the appropriate locale on your server.
Alternatively, if you want to use a custom language locale you can change them by locally overriding the language pack. Follow these steps:
- Go to Quick-access menu > Localisation > Language customisation.
- Select the language pack you need to fix from the dropdown list.
- Click Open language pack for editing.
- Once the language pack has loaded, click Continue.
- Select the langconfig.php component and locate the locale string using the String identifier filter.
- Click Show strings.
- Change the value of the locale string (or localewin on Windows), using the equivalent locale name from the Available server locales list on the Locale compatibility check page.
- Click Save changes to the language pack.
For some locales in Totara, date formats require a leading zero (e.g. 07/04/21). However, by default Totara strips out leading zeros.
To prevent the leading zero being stripped out, set the following setting in \totara_www\config.example.php:
$CFG->nofixday = true;
The Totara Academy has a course dedicated to Localisation in Totara. Here you can learn more on how to localise your system, see best practice, and give it a go yourself.
© Copyright 2024 Totara Learning Solutions. All rights reserved.