mlanguage_code(3m17n)

πŸ’– mlanguage_code πŸ’–

okay bestie, welcome to the m17n Library manual, page mlanguage_code(3m17n) πŸ¦‹ β€” yes that's the manual name, we're keeping it, it's giving library lore.


✨ NAME ✨

mlanguage_code β€” that's her. that's the girl. πŸ’…


✨ SYNOPSIS ✨

MSymbol mlanguage_code (MSymbol language, int len)

✨ DESCRIPTION ✨

okay so. mlanguage_code() gets you a language code. πŸŽ€ it returns a symbol whose name is the ISO639 language code of language.

so what even is language? it's a symbol whose name is one of these three things:

  • an ISO639-2 3-letter language code
  • an ISO639-1 2-letter language code
  • or just an English word πŸ‘‘

and len? len is the vibe check that decides what kind of code you get back:

  • if len is 3, you get an ISO639-2 3-letter language code back.
  • if len is 2, you get an ISO639-1 2-letter language code back when it's defined β€” and if it's not defined? you get Mnil. not me getting rejected by the ISO standard 😭
  • if len is 0, you get a 2-letter code when it's defined; otherwise you get a 3-letter code. so she tries her best, and if the 2-letter doesn't exist she serves you the 3-letter instead. adaptable icon. ✨

✨ RETURN VALUE ✨

if the info is available, this function returns a non-Mnil symbol. otherwise it returns Mnil. simple as that, no cap. πŸ’œ


✨ SEE ALSO ✨

  • mlanguage_name_list()
  • mlanguage_text()

go read those next bestie, they're the whole friend group 🫢


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>.


okay that's the whole page, you ate that 🌈 this was Version 1.8.4, dated Mon Sep 25 2023, and it lives in the m17n Library man pages. mwah, bye bestie πŸ‘‘πŸ’–

πŸ“¦ where this page comes from