Learn R Programming

xmpdf (version 0.2.1)

as_lang_alt: Coerce to XMP "language alternative" structure

Description

as_lang_alt() coerces to an XMP "language alternative" structure suitable for use with xmp() objects.

Usage

as_lang_alt(x, ...)

# S3 method for character as_lang_alt(x, ..., default_lang = getOption("xmpdf_default_lang"))

# S3 method for lang_alt as_lang_alt(x, ...)

# S3 method for list as_lang_alt(x, ..., default_lang = getOption("xmpdf_default_lang"))

Value

A named list of class "lang_alt".

Arguments

x

Object suitable for coercing

...

Ignored

default_lang

Language tag value to copy as the "x-default"

See Also

xmp(), as_xmp(), get_xmp(), and set_xmp(). For more information about the XMP "language alternative" structure see https://github.com/adobe/xmp-docs/blob/master/XMPNamespaces/XMPDataTypes/CoreProperties.md#language-alternative.

Examples

Run this code
  as_lang_alt("A single title")
  as_lang_alt(c(en = "An English Title", fr = "A French Title"))
  as_lang_alt(c(en = "An English Title", fr = "A French Title"), default_lang = "en")
  as_lang_alt(list(en = "An English Title", fr = "A French Title"))

Run the code above in your browser using DataLab