LanguageChoices final class
Minn\Admin\LanguageChoices · public/minn/src/Minn/Admin/LanguageChoices.php · 42 lines
The language picker's markup. English always leads the list and carries the empty value, because "no locale" and "American English" are the same choice. When the picker also offers what could be downloaded, the two halves split into named groups; otherwise every option sits in one flat list.
The attribute order is not tidy and is not ours to tidy: the English option carries `data-installed` before `selected`, an installed translation carries it after, and themes and plugins have been matching on that markup for years.
Constants and properties
| private | ENGLISH = 'English (United States)' |
Public
| static | dropdown(string $name, string $id, array $installed, array $available, string $selected, bool $offerAvailable): string# | The language select's HTML, installed languages first.
|
Internals 1
Private and protected methods: how the class does its work. Not a contract; they change whenever the code is tidied.
| private | option(string $locale, array $translation, string $selected, bool $installed): string# |
|
Nothing matches.