mlocale_set(3m17n)
β¨ 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
localeis notNULL, the locale of the specified part is set tolocale. π«Ά - If
localeis not supported by the system, the current locale is not changed β no dramatic meltdown, it just quietly stays exactly where it was. π - If
localeisNULL, 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 functionmlocale_get_prop()β she's the one who spills the name β¨ - Otherwise, it returns
NULL. π
π₯ ERRORS π₯
MERROR_LOCALE
π COPYRIGHT π
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
- debian trixie: m17n-docs 1.8.4-1
- ubuntu noble: m17n-docs 1.8.4-1
- ubuntu questing: m17n-docs 1.8.4-1
- ubuntu resolute: m17n-docs 1.8.4-1build1
- ubuntu stonking: m17n-docs 1.8.4-1build1
- Copyright (C) 2001 Information-technology Promotion Agency (IPA)
- Copyright (C) 2001-2011 National Institute of Advanced Industrial Science and Technology (AIST)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms