Skip to content

opt_interactive() with locale "de_CH" and "fr_CH" not working #1637

@lgnbhl

Description

@lgnbhl

Prework

Description

When changing to locale "de_CH" or "fr_CH", the number formating change correctly (the separation mark becomes " ' " for "de_CH", see the mpg column in the example) but the language in the buttons of the interactive table created by opt_interactive() remains in English, while it should be in German for "de_CH" or in French for "fr_CH".

Reproducible example

When using gt(locale = "de_CH") with opt_interactive(), the labels remains in English instead of being in German.

library(gt)
library(dplyr)

mtcars |> 
  mutate(mpg = mpg*1000) |> 
  gt(locale = "de_CH") |> # or "fr_CH"
  fmt_number(mpg, decimals = 2) |>
  opt_interactive()

example

Expected result

When using "de_CH", the buttons of the interactive table should be "1–10 von 32 Zeilen" on the left, "Zurück" and "Weiter" on the left.

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions