laravel-lang/native-locale-names
Native locale names for Laravel: a lightweight package providing localized language names in their own scripts, ready to use for language switchers and locale lists.
Language switcher / locale selector UX. This package answers one narrow but highly visible product question: what do we call each language in the picker? Shipping "Deutsch" next to "Русский" and "日本語" instead of "German / Russian / Japanese" is a recognized localization-quality signal. Users who can't read the UI language need to find their own language in its own script — this is the single most common reason locale switchers fail usability review.
Build vs. buy for a 40-line problem. The alternative is a hand-maintained array in config/app.php, an intl Locale::getDisplayName() call, or a spreadsheet someone exports once and nobody updates. The package's value proposition is not code, it is curated, continuously refreshed CLDR-derived data. Framing it as "buy the data, not the code" makes the decision easy: we are not adopting a framework dependency, we are outsourcing a small content-maintenance burden.
Roadmap: internationalization expansion. Every new locale we add to the roadmap is a new label we'd otherwise have to source, spell-check, and keep correct (including variants like pt-BR vs pt-PT and script variants). This package de-risks incremental locale rollout — adding a market becomes a config change in our allow-list rather than a content project with a translation vendor.
Feature scoping: where the package does not decide for us. Three product decisions remain ours and should be made explicitly, not inherited:
null in a dropdown is a user-visible bug.Adjacent surfaces as scope creep guardrails. If the selector ships, the same labels will be requested for admin screens, email footers, and marketing pages. Deciding up front whether this package is the single source of truth across all surfaces (recommended) or only the app prevents three divergent label sets six months out.
Not a decision this supports: translation of content, locale negotiation/detection, timezone or currency formatting, or ICU-grade collation. Do not let a "we added i18n support" narrative overpromise on the back of a label-only package.
Adopt when:
intl when you have multiple environments, containers, or a mix of distros.laravel-lang/lang or laravel-lang/locale-list), in which case this is a near-zero-marginal-cost add and the dependency graph is already present.Look elsewhere / do it manually when:
intl collation on top, or expect to solve it yourself.Adoption preconditions to verify before committing: PHP 8.1+, Laravel 11–13 (>=2.8.0 for Laravel 13), no conflicting laravel-lang/locale-list major version already installed, and a documented fallback contract for missing keys.
To executives — one paragraph. We're adding a dependency-free data package that gives us the correct name of every language in that language — "Deutsch," "Русский," "日本語" — for our language selector and settings screens. It's maintained by the Laravel-Lang organization, the de facto standard for Laravel localization data, is MIT-licensed, and replaces a hand-maintained list that goes stale every time we add a market. Cost is hours of engineering, not days; the risk is small and containable because the data is static, forkable, and behind our own abstraction layer. What I need from you is not a go/no-go on the library but a decision on product scope: which locales we expose and whether we sort them by the user's own language order.
To engineering — the ask. Adopt it, but do not call the static class from views. Wrap it: a versioned config/locales.php allow-list as our source of truth, and a single LocaleNameRepository that merges allow-list + labels and enforces sort order and fallback. That's ~50 lines and it means a swap to intl or a fork is a one-file change. Three things need explicit decisions and tests:
null, exception, or raw code). Silent nulls in a dropdown are a shipped bug.intl is available for locale-aware collation.Also flag: the 2.x namespace rename (Native → LocaleNames) means any snippet found online pre-2.x is wrong, and the likely install failure is a laravel-lang/locale-list major-version conflict.
To design/UX — the review artifact. Expect visible label diffs on day one, especially for region and script variants. Treat the first render as a UX review, not a regression: this is our one chance to confirm the endonyms match how our target markets actually refer to themselves.
The honest caveat to keep in the room. This package solves labels, not localization. It does not translate content, detect user locale, format dates or currency, or sort properly for every language. Success criterion should be stated narrowly — "users can find their own language in the switcher" — so the win is measurable and the scope doesn't quietly expand into a full i18n program on the back of a 7-star data library.
How can I help you explore Laravel packages today?