Download the PHP package nicolasbeauvais/laravel-transcribe without Composer
On this page you can find all versions of the php package nicolasbeauvais/laravel-transcribe. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download nicolasbeauvais/laravel-transcribe
More information about nicolasbeauvais/laravel-transcribe
Files in nicolasbeauvais/laravel-transcribe
Package laravel-transcribe
Short Description A simple language files translation manager in your artisan console
License MIT
Homepage https://github.com/nicolasbeauvais/laravel-transcribe
Informations about the package laravel-transcribe
Laravel Transcribe
Transcribe is a language files manager in your artisan console, it helps you search, update, add, and remove translation lines with ease. Taking care of a multilingual interface is not a headache anymore.
Acknowledgment
Laravel Transcribe has been hard-forked from themsaid/laravel-langman in order to maintain and improve the existing library.
Installation
Begin by installing the package through Composer. Run the following command in your terminal:
If you're using Laravel 5.5 or higher the package will automatically register itself. If you're using Laravel 5.4 or lower, add the following line in your providers array of config/app.php
:
This package has a single configuration option that points to the resources/lang
directory, if only you need to change
the path then publish the config file:
Usage
Showing lines of a translation file
You get:
Brings only the translation of the name
key in all languages.
Brings the translation of a nested key.
Brings the translation of a vendor package language file.
Brings the translation of only the "en" and "it" languages.
Brings only the translation lines with keys matching the given key via close match, so searching for nam
brings values for
keys like (name
, username
, branch_name_required
, etc...).
In the table returned by this command, if a translation is missing it'll be marked in red.
Finding a translation line
You get a table of language lines where any of the values matches the given phrase by close match.
Searching view files for missing translations
This command will look into all files in resources/views
and app
and find all translation keys that are not covered in your translation files, after
that it appends those keys to the files with a value equal to an empty string.
Searching translations for unused keys
This command will look into all language files and find all keys that are not used in your view files.
Filling missing translations
It'll collect all the keys that are missing in any of the languages or has values equals to an empty string, prompt asking you to give a translation for each, and finally save the given values to the files.
Translating a key
Using this command you may set a language key (plain or nested) for a given group, you may also specify which language you wish to set leaving the other languages as is.
This command will add a new key if not existing, and updates the key if it is already there.
Removing a key
It'll remove that key from all language files.
Renaming a key
This will rename users.name
to be users.full_name
, the console will output a list of files where the key used to exist.
Notes
transcribe:sync
, transcribe:missing
, transcribe:trans
, and transcribe:remove
will update your language files by writing them completely, meaning that any comments or special styling will be removed, so I recommend you backup your files.
All versions of laravel-transcribe with dependencies
illuminate/support Version ~5.1.0|~5.2.0|~5.3.0|~5.4.0|~5.5.0|~5.6.0
illuminate/console Version ~5.1.0|~5.2.0|~5.3.0|~5.4.0|~5.5.0|~5.6.0
illuminate/filesystem Version ~5.1.0|~5.2.0|~5.3.0|~5.4.0|~5.5.0|~5.6.0