Giter Club home page Giter Club logo

laravel-translation-loader's Introduction

Laravel Translation Loader

Packagist Release Licence

This package is an adaptation of spatie/laravel-translation-loader

WARNING: this package is currently in development.

Features added

  • Translations namespace compatibility ;
  • Console commands to synchronise translations from files to DB;

Requirements

  • PHP >= 8.1
  • Laravel Framework >= 9.0

NOTE: These instructions are for Laravel >= 9.0. If you are using prior version, please see the previous version's docs.

Installation

composer require novius/laravel-translation-loader:dev-master

In config/app.php (Laravel) you should replace Laravel's translation service provider

Illuminate\Translation\TranslationServiceProvider::class,

by the one included in this package:

Novius\TranslationLoader\TranslationServiceProvider::class,

You must publish and run the migrations to create the language_lines table:

php artisan vendor:publish --provider="Novius\TranslationLoader\TranslationServiceProvider" --tag="migrations"
php artisan migrate

Publish languages files:

php artisan vendor:publish --provider="Novius\TranslationLoader\TranslationServiceProvider" --tag="lang"

Optionally you could publish the config file using this command.

php artisan vendor:publish --provider="Novius\TranslationLoader\TranslationServiceProvider" --tag="config"

Commands

# Synchronise translations from files to DB
php artisan translations:sync

# Clear DB translations + re-import them
php artisan translations:reset

Lint

Run php-cs with:

composer run-script lint

Contributing

Contributions are welcome! Leave an issue on Github, or create a Pull Request.

Licence

This package is under MIT Licence.

laravel-translation-loader's People

Contributors

ange7 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.