get_language_from_code: Conversion from language code to language name

View source: R/other-code-translations.R

get_language_from_codeR Documentation

Conversion from language code to language name

Description

Takes a language code (defined in the Marc standards) and returns the language name.

Usage

get_language_from_code(x)

Arguments

x

A language code (defined in the Marc standards) or a vector of language codes

Value

Returns the language name. NA if cannot be matched to language in standard.

Examples


get_language_from_code("yor")
# Yoruba

# tolerant of case and leading/trailing whitespace
get_language_from_code(c("yor", " SPA ", "not-a-language", "nah", NA))
# c("Yoruba", "Spanish", NA, "Nahuatl", NA)


NYPL/libbib documentation built on Feb. 6, 2024, 4:19 a.m.