ggformaEnglish

设置图形的语言和地区格式

函数索引 / 语言与字典

locale_info()

分别选择显示语言、数字和百分比格式、日期格式,以及换行与阅读方向。

怎么用

使用 BCP 47 标签,例如 zh-Hans、de-DE、en-GB。可让中文标题同时配用德式数字和英式日期,设置只对当前图表生效。

返回结果

返回包含已解析语言、文字系统、地区、数字和日期资源、字体请求及段落方向的列表。

调用方式

locale_info(
  lang = "en",
  region = NULL,
  number_locale = NULL,
  date_locale = NULL,
  font_family = "sans",
  text_direction = "auto",
  break_locale = NULL,
  percent_locale = NULL
)

参数

lang、region、number_locale, date_locale、font_family、text_direction、break_locale、percent_locale

逐项参数说明(英文)

R 示例

loc <- locale_info("zh-Hans", number_locale = "de-DE", date_locale = "en-GB")
forma_format(12345.5, locale = loc)
locale_info("az-Arab")$text_direction

查看完整英文文档