diff --git a/R/utils.R b/R/utils.R index 7b2bdacb3b..7b23bde45f 100644 --- a/R/utils.R +++ b/R/utils.R @@ -65,7 +65,12 @@ is_gt_tbl_empty_w_rows <- function(data) { # Adjustments for a completely empty table (no columns and no rows) adjust_gt_tbl_empty <- function(data) { - data <- cols_add(data, no_data = "TABLE HAS NO DATA") + # Get the table's locale + tbl_locale <- dt_locale_get_value(data = data) + + no_table_data_text <- get_locale_no_table_data_text(locale = tbl_locale) + + data <- cols_add(data, no_data = no_table_data_text) data <- tab_options(data, column_labels.hidden = TRUE) data <- cols_align(data, align = "center", columns = no_data) data <- cols_width(data, no_data ~ px(500))