mlocale_set(3m17n)

πŸ“¦
version 1.8.4 Β· 2 versions
, in debian trixie, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

✨ mlocale_set ✨

okay bestie, welcome to the mlocale_set(3m17n) page πŸ’– this one lives in the m17n library and it's literally all about telling your program which locale vibes it should be running in. the manual name is mlocale_set and we're in section 3m17n, iykyk πŸŽ€


🌸 NAME 🌸

mlocale_set β€” that's it, that's the name. the original page keeps it mysterious, so we keep it mysterious too πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

MLocale* mlocale_set (int category, const char * name)

✨ DESCRIPTION ✨

so here's the tea: mlocale_set() sets the current locale. it can set a part of the current locale or query it β€” main character energy, it does both 😌

which part we're talking about is decided by category, and lowkey this matters a lot: category must be a valid first argument to setlocale(). no cap. if it's not, that's not our problem.

now, the function signature up there calls the second parameter name, but the prose below calls it locale β€” yes girl, the docs are doing a little outfit change mid-page, we're keeping both looks πŸ™ˆ so:

  • If locale is not NULL, the locale of the specified part is set to locale. 🫢
  • If locale is not supported by the system, the current locale is not changed β€” no dramatic meltdown, it just quietly stays exactly where it was. πŸ’€
  • If locale is NULL, the current locale of the specified part is queried instead. πŸ”

πŸ‘‘ RETURN VALUE πŸ‘‘

  • If the call is successful, mlocale_set() returns an opaque locale object that corresponds to the locale. πŸŽ€ you can snag the name of that locale with the function mlocale_get_prop() β€” she's the one who spills the name ✨
  • Otherwise, it returns NULL. 😭

πŸ”₯ ERRORS πŸ”₯

  • MERROR_LOCALE

Copyright (C) 2001 Information-technology Promotion Agency (IPA)

Copyright (C) 2001-2011 National Institute of Advanced Industrial Science and Technology (AIST)

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License <http://www.gnu.org/licenses/fdl.html>.


this page is Version 1.8.4, dated Mon Sep 25 2023, and it comes to you from mlocale_set(3m17n) 🌈

and that's the whole page, bestie β€” go set some locales, stay iconic, and remember: if the system doesn't support your locale, she simply doesn't change. periodt. πŸ’…πŸŒˆβ­

πŸ“¦ where this page comes from