datasketch / shi18ny

19 stars 7 forks source link

Fix/update i function #18

Closed lenafm closed 4 years ago

lenafm commented 4 years ago

Update i_ function so that one doesn't have to call i18n <- i18nLoad(i18n) before.

E.g. the following now works without the uncommented code (before it only worked with the i18nLoad:

localeDir = "dir_with_custom_yaml_files"

i18n <- list(
  defaultLang = "en",
  localeDir = localeDir,
  availableLangs = c("en", "de")
  )

# i18n <- i18nLoad(i18n)

i_("choose_file", "de", i18n = i18n)