LangTagMatcher (langtagmatcher v0.1.0)

Link to this section Summary

Functions

Return a list of all languages in available that matches criteria, in the ascending order by the index of the matching criteria. The fallback languages are added at the back if they are not already in the list.

Link to this section Types

@type language() :: String.t()
@type languages() :: list()
Link to this type

subtag_rep()

@type subtag_rep() :: [map()]

Link to this section Functions

Link to this function

match(criteria, available, fallback)

@spec match(languages(), languages(), languages()) :: languages()

Return a list of all languages in available that matches criteria, in the ascending order by the index of the matching criteria. The fallback languages are added at the back if they are not already in the list.