Locales: Difference between revisions

Partially taken from nixos.wiki/wiki/Locales to give a full picture. Adjusted/shortened some part to fit and fixed some spelling errors
add more contect for supportedLocales
Line 27: Line 27:
     LC_COLLATE = "es_VE.UTF-8";
     LC_COLLATE = "es_VE.UTF-8";
   };
   };
</syntaxhighlight>'''defaultLocale''' will set the locale systemwide to the desired value. In addition, with '''supportedLocales''', the system will also support Venezuelan Spanish. And in the '''extraLocaleSettings''', it is possible to set the LC locales individually. This does allow fine-grained adjustments of the used locales. In the above example a mix of American English and Venezuelan Spanish is used. It is also possible to find these settings at [https://search.nixos.org/options NixOS options]. Just search for i18 locale.
</syntaxhighlight>'''defaultLocale''' will set the language and the character set systemwide to the desired value. Specifically, defaultLocale will define the <code>LANG</code> environment variable.
 
In addition, with '''supportedLocales''', the system will also support Venezuelan Spanish. The value <code>"all"</code> means that all locales supported by Glibc will be installed. A full list of supported locales can be found at https://sourceware.org/git/?p=glibc.git;a=blob;f=localedata/SUPPORTED.
 
And in the '''extraLocaleSettings''', it is possible to set the LC locales individually. This does allow fine-grained adjustments of the used locales. In the above example a mix of American English and Venezuelan Spanish is used. It is also possible to find these settings at [https://search.nixos.org/options NixOS options]. Just search for i18 locale.


'''BEWARE:''' The setting <code>i18n.supportedLocales</code> requires a different format to <code>i18n.extraLocaleSettings</code>  with the added <code>/UTF-8</code>. Otherwise, your locale settings will likely not work.
'''BEWARE:''' The setting <code>i18n.supportedLocales</code> requires a different format to <code>i18n.extraLocaleSettings</code>  with the added <code>/UTF-8</code>. Otherwise, your locale settings will likely not work.