Fetches the current IANA language subtag registry and writes it to
priv/language-subtag-registry.
$ mix lang_tags.update
The registry is compiled into pattern-matched function heads at build time, so a recompile is required for the new data to take effect:
$ mix lang_tags.update
$ mix compile --force
Options
--check- report whether a newer registry is available without writing anything. Exits with a non-zero status when an update is available, which makes it usable as a scheduled CI check.
Summary
Functions
Reads the File-Date header of a registry file on disk.
Extracts the File-Date header from registry contents.
Checks that contents look like the IANA registry before we overwrite the bundled copy with them.
Functions
Reads the File-Date header of a registry file on disk.
Only the first line is read. The registry is several hundred kilobytes and the header is its first line, so there is no reason to load the rest of it just to compare dates.
Extracts the File-Date header from registry contents.
The header is only recognised on the first line, which is where the record-jar format requires it.
Checks that contents look like the IANA registry before we overwrite the bundled copy with them.