You are not logged in.
Pages: 1
How do I quickly preview what a locale looks like? E.g: is there something like
$ localepreview en_DK.UTF-8
Of course, I can easily write a script like
#!/bin/bash
LOCALE=$1
export LANG=$LOCALE
export LC_TIME=$LOCALE
export LC_NUMERIC=$LOCALE
export LC_MONETARY=$LOCALE
echo "Date and Time (locale: $LOCALE):"
date
echo
echo "Numeric Formatting:"
printf "Number: %'.2f\n" 1234567.89
But what about the other variables? Is there a convenient file there in the system that give such examples? Something like
$ less /usr/share/iso-codes/json/iso_3166-1.json
Offline
export LANG=en_DK.UTF-8
locale
For locale information files similar to your iso-codes example, you can find locale data in /usr/share/locale/, for example:
less /usr/share/locale/en_DK.UTF-8/LC_TIME
Offline
/usr/share/locale/en_DK.UTF-8/LC_TIME shoudl be a directory?
https://man.archlinux.org/man/core/man-pages/locale.5.en
locale -k LC_NAME # eg.
Idk whether there's a nice script of code to demonstrate the various locales w/ dummies, sorry.
Offline
Pages: 1