Check locale compatibility
  • 01 Feb 2022
  • 1 minute to read

Check locale compatibility


Article Summary

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). 

  1. Go to Quick-access menu > Localisation > Locale compatibility check.
  2. 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:

  1. Go to Quick-access menu > Localisation > Language customisation.
  2. Select the language pack you need to fix from the dropdown list.
  3. Click Open language pack for editing.
  4. Once the language pack has loaded, click Continue.
  5. Select the langconfig.php component and locate the locale string using the String identifier filter.
  6. Click Show strings.
  7. 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.
  8. 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;

Totara Academy Badge Localisation(1)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.


Was this article helpful?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.