Sri Lankan English Locale for Ubuntu (And other Linuxes)

Sinhala (si_LK) is the only locale available for Sri Lanka in Ubuntu OS. While the Sinhala locale is not bad in itself, displaying “රු” in currencies, “පෙ.ව” and “ප.ව.” and Sinhala month and date names are a distraction, specially in terminal where Sinhala unicode rendering is not that good.

So I created a Sri Lankan English locale (en_LK).

It has all the Sri Lanka specific time formats, currency symbols, etc., but in English.

And submitted it to glibc (Package that has the locale files.) and Ubuntu for their consideration to be included by default:

  1. glibc: https://sourceware.org/bugzilla/show_bug.cgi?id=20848
  2. Ubuntu: https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1643309

If they accept it, we’ll get Sri Lankan English locale out of the box, if not, here’s how to install it:

Manually Installing Sri Lankan English Locale

1. Go to https://github.com/a2way-com/en_LK-locale/releases and download the latest version’s ZIP file.

2. Move the en_LK file out of the ZIP, into /usr/share/i18n/locales.

3. Navigate to the location mentioned above and issue the command sudo localedef -i en_LK -f UTF-8 en_LK.UTF-8 -c. I guess this compiles the locale or some other shite.

4. Now you should be able to see “English (Sri Lanka)” option in “Regional Formats” tab in “Language Support” dialog in “System Settings”.

System Settings → Language Support → Regional Formats → Display numbers… → English (Sri Lanka)

5. Re-log-in.

Leave a Reply