is a file based translation manager, which unlike other Lang managers dont need a database connection to handle the translation.
-
composer require ctf0/lingo
-
(Laravel < 5.5) add the service provider
'providers' => [
ctf0\Lingo\LingoServiceProvider::class,
]
- install dependencies
yarn add vue vuemit vue-notif
# or
npm install vue vuemit vue-notif --save
- publish the package assets with
php artisan vendor:publish --provider="ctf0\Lingo\LingoServiceProvider"
- after installation, package will auto-add
- package routes to
routes/web.php
- package assets compiling to
webpack.mix.js
MIX_LINGO_FRAMEWORK=bulma
to.env
- package routes to
- add/remove "vendor/locale/file/item"
- show guiding steps while adding new vendor for better UX.
- validate for "vendor/locale/file" existence on the fly
- use localeStorage to remember opened "tab/vendor/files"
- show/hide different elements to avoid noise & keep the user focused
- for styling we use bulma
Or Use another Framework
- duplicate
resources/views/vendor/Lingo/lingo-bulma
and rename it to the framework you want ex.lingo-bootstrap
- duplicate
assets/vendor/Lingo/sass/bulma.scss
and rename it to the framework you want ex.bootstrap.scss
- edit
assets/vendor/Lingo/js/shared/content.vue
&assets/vendor/Lingo/js/Tabs/vendor.vue
- set
MIX_LINGO_FRAMEWORK
to the framework name ex.MIX_LINGO_FRAMEWORK=bootstrap
- start editing the new files.
- add this one liner to your main js file and run
npm run watch
to compile yourjs/css
files.- if you are having issues with
npm run production
, Check
- if you are having issues with
require('./../vendor/Lingo/js/lingo')
new Vue({
el: '#app'
})
- now visit
localhost:8000/lingo
-
we use Laravel Langman for scanning for missing translation keys, but if you have better alternative plz open a ticket.
-
Atm the package doesn't support multi level/nested arrays so any PRs / ideas are welcomed.
however, if a file with nested arrays is detected a warning will show up so you don't accidentally save the file as we overwrite files on save.