在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):joedixon/laravel-translation开源软件地址(OpenSource Url):https://github.com/joedixon/laravel-translation开源编程语言(OpenSource Language):PHP 67.7%开源软件介绍(OpenSource Introduction):About Laravel TranslationLaravel Translation is a package for Laravel 5 which allows you full control over your translations when using Laravel's localization functionality. The package allows you to manage your translations using either the native file based translations, but also provides a database driver which is useful in multi-server setups. It exposes a user interface allowing you to update existing and add new translations to your application. Below are a full list of features:
Version Compatibility
InstallationInstall the package via Composer
Publish configuration and assets
The service provider is loaded automatically using package discovery. UsageConfigurationThe package ships with a configuration file called
Choose either
Apply middleware to the routes which ship with the package. For example, you may
which to use the
Choose which of Laravel's translation methods to use when searching for missing translation keys.
Choose which paths to use when searching for missing translations. Narrowing the search to specific directories will result in a performance increase when scanning for missing translations.
Choose the root URL where the package user interface can be accessed. All routes will be prefixed by this value. e.g. setting this value to
Choose the name of the languages table when using the database driver.
Choose the name of the translations table when using the database driver. DriversFileUtitlises Laravel's native php array and JSON based language files and exposes a user interface to manage the enclosed translations. Add and update languages and translations using either the user interface or the built-in Artisan commands. DatabaseThe database driver takes all of the functionality of Laravel's file based language files, but moves the storage to the database, utilising the connection configured for your Laravel application. It also replaces the translation loader in the container so all of Laravel's
translation retrieval methods ( To utilise the database driver, make sure to update the database table names in the configuration file and run the migrations. User interfaceNavigate to http://your-project.test/languages (update First, click on the language you wish to edit. On the subsequent page, find the translation you want to edit and click on the pencil icon or on the text and make your edits. As soon as you remove focus from the input, your translation will be saved, indicated by the green check icon. Artisan CommandsThe package ships with a series of Artisan commands which assist with translation management.
Add a new language to the application.
Add a new language key for the application.
List all of the available languages in the application.
List all of the translation keys in the app which don't have a corresponding translation.
Synchronise translations between drivers. This is useful if you have an exisitng application using the native file based language files and wish to move to the database driver. Running this command will take all of the translations from the language files and insert them in to the database.
This command will scan your project (using the paths supplied in the configuration file) and create all of the missing translation keys. This can be run for all languages or a single language. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论