.\" Copyright (C) 2001 Information-technology Promotion Agency (IPA) .\" Copyright (C) 2001-2011 .\" National Institute of Advanced Industrial Science and Technology (AIST) .\" This file is part of the m17n library documentation. .\" Permission is granted to copy, distribute and/or modify this document .\" under the terms of the GNU Free Documentation License, Version 1.2 or .\" any later version published by the Free Software Foundation; with no .\" Invariant Section, no Front-Cover Texts, .\" and no Back-Cover Texts. A copy of the license is included in the .\" appendix entitled "GNU Free Documentation License". .TH "mlanguage_code" 3m17n "Mon Sep 25 2023" "Version 1.8.4" "The m17n Library" \" -*- nroff -*- .ad l .nh .SH NAME mlanguage_code \- .SH SYNOPSIS MSymbol \fBmlanguage_code\fP (MSymbol \fIlanguage\fP, int \fIlen\fP) .SH DESCRIPTION .PP Get a language code\&. The .ft B mlanguage_code() .ft R function returns a symbol whose name is the ISO639 language code of .ft B language\fP\&. .ft B language .ft R is a symbol whose name is an ISO639\-2 3\-letter language code, an ISO639\-1 2\-letter language codes, or an English word\&. .PP \fBlen .ft R specifies the type of the returned language code\&. If it is 3, an ISO639\-2 3\-letter language code is returned\&. If it is 2, an ISO639\-1 2\-letter language code is returned when defined; otherwise .ft B Mnil .ft R is returned\&. If it is 0, a 2\-letter code is returned when defined; otherwise a 3\-letter code is returned\&. .PP .SH RETURN VALUE .PP .RS 4 If the information is available, this function returns a non\-\fBMnil .ft R symbol\&. Otherwise, it returns .ft B Mnil\fP\&. .RE .PP .SH "SEE ALSO" .PP .RS 4 \fBmlanguage_name_list()\fP, .ft R .ft B mlanguage_text()\fP\&. .br .RE .PP .SH COPYRIGHT Copyright (C) 2001 Information\-technology Promotion Agency (IPA) .br Copyright (C) 2001\-2011 National Institute of Advanced Industrial Science and Technology (AIST) .br Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License .