Skip to content

Novis\Intl\Locale

Chooses a language for a request, and shows which language data a locale tag uses.

Members

2 members.

MemberSignature
negotiatenegotiate(string $acceptLanguage, array<string> $offered, string $default): string
resolveresolve(array<string> $tags, Service $service): array<string>

Enums

  • Service { Collation, Numbers, Plurals, Dates, RelativeTime, Lists, Segmentation }The kind of data that Locale::resolve checks. For each locale tag, such as de-AT for German in Austria, it returns the locale whose data is used. Collation is the data for sorting text. Numbers is the data for writing numbers. Plurals is the data for plural forms. Dates is the data for writing dates. RelativeTime is the data for times such as "in 3 days". Lists is the data for joining lists. Segmentation is the data for splitting text into words.