Skip to contents

Reads the language marker (_en / _fr before .parquet) that ivt_write_parquet() / get_statcan_ivt() put in the file name, so collect_ivt() and label_ivt_columns() can pick the matching language without being told. Falls back to "en" when there is no marker.

Usage

ivt_parquet_language(x)

Arguments

x

A .parquet path, an Arrow dataset, or a dplyr-on-Arrow query (the path is taken from the path attribute / source file list).

Value

"en" or "fr".

Examples

ivt_parquet_language("98-10-0044_fr.parquet")
#> [1] "fr"
ivt_parquet_language("98-10-0044_en.parquet")
#> [1] "en"