Although we support setlocale in its full generality, most likely you'll want to set a locale once and forget about it. You can do that by including the locale in your application and writing to the instance variables that hold the underlying locale data for the SEGGER Embedded Studio C library.

For instance, you might wish to use Czech locale with a UTF codeset:

static __RAL_locale_t cz_locale =
{
  "cz_CZ.utf8",
  &__RAL_cs_CZ_locale,
  &__RAL_codeset_utf8
};

You can install this directly into the locale without using setlocale:

__RAL_global_locale.__category[LC_COLLATE]  = &cz_locale;
__RAL_global_locale.__category[LC_CTYPE]    = &cz_locale;
__RAL_global_locale.__category[LC_MONETARY] = &cz_locale;
__RAL_global_locale.__category[LC_NUMERIC]  = &cz_locale;
__RAL_global_locale.__category[LC_TIME]     = &cz_locale;