Stable /api/languages

Language selector

Present language names in English and their native form, including text-direction metadata.

183 languages Native names Direction metadata ISO language codes

Installation

Install once, use everywhere.

composer require nnjeim/world
php artisan world:install

React, Angular, and Vue consume the same Laravel API; no frontend package is required.

Playground

Live behavior and copy-ready code.

Language selector

Connecting to the World API…

Live preview

Selected value

Loading…

component.blade.php
Loading example…

API reference

Request only the fields you need.

GET /api/languages?fields=name_native,dir
Endpoint
/api/languages
Fields used
id, code, name, name_native, dir

Component contract

Props

NameTypeDefaultDescription
name string language_id Submitted form-field name.
value number|null null Initially selected language ID.
nativeNames boolean true Displays each native language name.
disabled boolean false Prevents selection changes.

Events

change Language

Emitted after a language is selected.

direction-change ltr|rtl

Exposes the selected writing direction.

error Error

Reports an unavailable or invalid response.

Validation guidance

  • Submit the numeric language ID.
  • Validate supported product locales separately.
  • Treat text direction as display metadata, not user input.

Accessibility checklist

  • ✓Set the option direction from the returned metadata.
  • ✓Keep the English name available for recognition.
  • ✓Do not infer locale support from the full language dataset.
  • ✓Announce the selected native name.