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:^2.0
php -d memory_limit=1G artisan world:install
React, Angular, and Vue consume the same Laravel API; no frontend package is required.
For the default database cache, run application migrations first. Existing 1.x users should review the 2.0 upgrade guide or stay with the 1.x documentation.
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
| Name | Type | Default | Description |
|---|---|---|---|
| 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.