EctoTsvector.Dictionary (ecto_tsvector v0.1.0)
Helper module for Postgres supported language dictionaries.
Summary
Functions
Returns the generic language dictionary for Postgres: "simple".
Maps a two character language code to the corresponding language dictionary in Postgres, returns the generic dictionary if the language code is not recognized.
Maps a two character language code to the corresponding language dictionary in Postgres, raises if the language code is not recognized.
Functions
@spec generic() :: String.t()
Returns the generic language dictionary for Postgres: "simple".
@spec language_code_to_postgres(String.t()) :: String.t()
@spec language_code_to_postgres(String.t()) :: String.t()
Maps a two character language code to the corresponding language dictionary in Postgres, returns the generic dictionary if the language code is not recognized.
Omits language localizations, i.e. "en-US" is treated identically to "en".
Maps a two character language code to the corresponding language dictionary in Postgres, raises if the language code is not recognized.
Omits language localizations, i.e. "en-US" is treated identically to "en".