palmabit / multilanguage
This package helps handling of language and translation with laravel framework
Installs: 239
Dependents: 3
Suggesters: 0
Security: 0
Stars: 2
Watchers: 2
Forks: 0
Open Issues: 0
pkg:composer/palmabit/multilanguage
Requires
- php: >=5.4.0
- illuminate/support: >=4.2
Requires (Dev)
- doctrine/dbal: >=2.4
- fzaninotto/faker: >=1.4
- mockery/mockery: 0.9.0
- orchestra/testbench: 2.2.*
- way/generators: ~2.0
This package is not auto-updated.
Last update: 2025-10-07 08:35:19 UTC
README
#Multilanguage
##Description
This package adds multilanguage capability to your laravel app.
Installation
The simplest method of installation is to install it as a global Composer package:
- composer require
"palmabit/multilanguage 1.0.*"
- Add to your service providers the following string:
'Palmabit\Multilanguage\MultilanguageServiceProvider'
- Run the following command:
"php artisan asset:publish"
Docs
In order to see the docs install the laravel package example app: https://github.com/Palmabit-IT/package-examples
API REST
GET current language
http://<url>/api/v1/lang
response:
{
"lang": "en"
}
Set new language (PUT)
http://<url>/api/v1/lang/<new-lang>
response:
{
"success": true
"lang": "en"
}
Set new language (POST)
http://<url>/api/v1/lang
parameters:
{
"lang": "en"
}
response:
{
"success": true
"lang": "en"
}