I need to find a list of locale installed/supported in my linux machine. is there a way to find a list of valid locales in my linux using perl ?
thanks
To view information about the current installed locale, use the locale or localectl utility. You can view more information about an environmental variable, for example LC_TIME, which stores the time and date format.
Locale is basically a set of environmental variables that defines the user's language, region, and any special variant preferences that the user wants to see in their Linux interface.
To change the value of a locale which is already set, we can edit the . bashrc profile of the use who needs the new locale. $ locale LANG=en_IN. utf8 LANGUAGE=en_US LC_CTYPE="en_IN.
This command will give you a list of locales:
locale -a
From a Perl script you can execute the same using
system("locale -a");
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With