get_language_from_code {libbib} | R Documentation |
Takes a language code (defined in the Marc standards) and returns the language name.
get_language_from_code(x)
x |
A language code (defined in the Marc standards) or a vector of language codes |
Returns the language name. NA if cannot be matched to language in standard.
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)