Better translation management for Laravel

Overview

Better localization management for Laravel

Latest Version on Packagist Software License Build Status Total Downloads

Introduction

Keeping a project's translations properly updated is cumbersome. Usually translators do not have access to the codebase, and even when they do it's hard to keep track of which translations are missing for each language or when updates to the original text require that translations be revised.

This package allows developers to leverage their database and cache to manage multilanguage sites, while still working on language files during development and benefiting from all the features Laravel's Translation bundle has, like pluralization or replacement.

WAAVI is a web development studio based in Madrid, Spain. You can learn more about us at waavi.com

Table of contents

Laravel compatibility

Laravel translation
4.x 1.0.x
5.0.x 2.0.x
5.1.x|5.3.x 2.1.x
5.4.x 2.2.x
5.5.x 2.3.x and higher
5.6.x 2.3.x and higher
6.x|7.x 2.4.x and higher

Features overview

  • Allow dynamic changes to the site's text and translations.
  • Cache your localization entries.
  • Load your translation files into the database.
  • Force your urls to be localized (ex: /home -> /es/home) and set the locale automatically through the browser's config.
  • Localize your model attributes.

Installation

Require through composer

composer require waavi/translation 2.3.x

Or manually edit your composer.json file:

"require": {
	"waavi/translation": "2.3.x"
}

Once installed, in your project's config/app.php file replace the following entry from the providers array:

Illuminate\Translation\TranslationServiceProvider::class

with:

Waavi\Translation\TranslationServiceProvider::class

Remove your config cache:

php artisan config:clear

Publish both the configuration file and the migrations:

php artisan vendor:publish --provider="Waavi\Translation\TranslationServiceProvider"

Execute the database migrations:

php artisan migrate

You may check the package's configuration file at:

config/translator.php

Translations source

This package allows you to load translation from the regular Laravel localization files (in /resources/lang), from the database, from cache or in a mix of the previous for development. You may configure the desired mode of operation through the translator.php config file and/or the TRANSLATION_SOURCE environment variable. Accepted values are:

  • 'files' To load translations from Laravel's language files (default)
  • 'database' To load translations from the database
  • 'mixed' To load translations both from the filesystem and the database, with the filesystem having priority.
  • 'mixed_db' To load translations both from the filesystem and the database, with the database having priority. [v2.1.5.3]

NOTE: When adding the package to an existing Laravel project, 'files' must be used until migrations have been executed.

For cache configuration, please go to cache configuration

Load translations from files

If you do not wish to leverage your database for translations, you may choose to load language lines exclusively through language files. This mode differs from Laravel in that, in case a line is not found in the specified locale, instead of returning the key right away, we first check the default language for an entry. In case you wish to use this mode exclusively, you will need to set the 'available_locales' config file:

config/translator.php
	'available_locales' => ['en', 'es', 'fr'],

Example:

The content in en/validations.php, where 'en' is the default locale, is:

		[
			'missing_name'			=>	'Name is missing',
			'missing_surname'		=>	'Surname is missing',
		];

The content in es/validations.php is:

		[
			'missing_name'			=>	'Falta el nombre',
		];

Output for different keys with 'es' locale:

		trans('validations.missing_name'); 		// 		'Falta el nombre'
		trans('validations.missing_surname'); 	// 		'Surname is missing'
		trans('validations.missing_email'); 	// 		'validations.missing_email'

Load translations from the database

You may choose to load translations exclusively from the database. This is very useful if you intend to allow users or administrators to live edit the site's text and translations. In a live production environment, you will usually want this source mode to be activated with the translation's cache. Please see Loading your files into the database for details on the steps required to use this source mode.

Example:

The content in the languages table is:

	| id | locale | name    |
	-------------------------
	| 1  | en     | english |
	| 2  | es     | spanish |

The relevant content in the language_entries table is:

	| id | locale | namespace | group       | item	          | text                    |
	-------------------------------------------------------------------------------------
	| 1  | en     | *         | validations | missing.name    | Name is missing         |
	| 2  | en     | *         | validations | missing.surname | Surname is missing      |
	| 3  | en     | *         | validations | min_number      | Number is too small     |
	| 4  | es     | *         | validations | missing.name    | Falta nombre   			|
	| 5  | es     | *         | validations | missing.surname | Falta apellido 			|

Output for different keys with es locale:

		trans('validations.missing.name');   //    'Falta nombre'
		trans('validations.min_number');     //    'Number is too small'
		trans('validations.missing.email');  //    'missing_email'

Mixed mode

In mixed mode, both the language files and the database are queried when looking for a group of language lines. Entries found in the filesystem take precedence over the database. This source mode is useful when in development, so that both the filesystem and the user entries are taken into consideration.

Example:

When files and database are set like in the previous examples:
		trans('validations.missing_name');     //    'Falta el nombre'
		trans('validations.missing_surname');  //    'Falta apellido'
		trans('validations.min_number');       //    'Number is too small'
		trans('validations.missing_email');    //    'missing_email'

Loading your files into the database

When using either the database or mixed translation sources, you will need to first load your translations into the database. To do so, follow these steps:

  • Run the migrations detailed in the installation instructions.

  • Add your languages of choice to the database (see Managing Database Languages)

  • Load your language files into the database using the provided Artisan command:

    php artisan translator:load

When executing the artisan command, the following will happen:

  • Non existing entries will be created.
  • Existing entries will be updated except if they're locked. When allowing users to live edit the translations, it is recommended you do it throught the updateAndLock method provided in the Translations repository. This prevents entries being overwritten when reloading translations from files.
  • When an entry in the default locale is edited, all of its translations will be flagged as pending review. This gives translators the oportunity to review translations that might not be correct, but doesn't delete them so as to avoid minor errata changes in the source text from erasing all translations. See Managing translations for details on how to work with unstable translations.

Both vendor files and subdirectories are supported. Please keep in mind that when loading an entry inside a subdirectory, Laravel 5 has changed the syntax to:

	trans('subdir/file.entry')
	trans('package::subdir/file.entry')

Cache translations

Since querying the database everytime a language group must be loaded is grossly inefficient, you may choose to leverage Laravel's cache system. This module will use the same cache configuration as defined by you in app/config/cache.php.

You may enable or disable the cache through the translator.php config file or the 'TRANSLATION_CACHE_ENABLED' environment variable. Config options are:

Env key type description
TRANSLATION_CACHE_ENABLED boolean Enable / disable the translations cache
TRANSLATION_CACHE_TIMEOUT integer Minutes translation items should be kept in the cache.
TRANSLATION_CACHE_SUFFIX string Default is 'translation'. This will be the cache suffix applied to all translation cache entries.

Cache tags

Available since version 2.1.3.8, if the cache store in use allows for tags, the TRANSLATION_CACHE_SUFFIX will be used as the common tag to all cache entries. This is recommended to be able to invalidate only the translation cache, or even just a given locale, namespace and group configuration.

Clearing the cache

Available since version 2.1.3.8, you may clear the translation cache through both an Artisan Command and a Facade. If cache tags are in use, only the translation cache will be cleared. All of your application cache will however be cleared if you cache tags are not available.

Cache flush command:

php artisan translator:flush

In order to access the translation cache, add to your config/app.php files, the following alias:

    'aliases'         => [
        /* ... */
        'TranslationCache' => \Waavi\Translation\Facades\TranslationCache::class,
    ]

Once done, you may clear the whole translation cache by calling:

    \TranslationCache::flushAll();

You may also choose to invalidate only a given locale, namespace and group combination.

    \TranslationCache::flush($locale, $group, $namespace);
  • The locale is the language locale you wish to clear.
  • The namespace is either '*' for your application translation files, or 'package' for vendor translation files.
  • The group variable is the path to the translation file you wish to clear.

For example, say we have the following file in our resources/lang directory: en/auth.php, en/auth/login.php and en/vendor/waavi/login.php. To clear the cache entries for each of them you would call:

    \TranslationCache::flush('en', 'auth', '*');
    \TranslationCache::flush('en', 'auth/login', '*');
    \TranslationCache::flush('en', 'login', 'waavi');

Managing languages and translations in the Database

The recommended way of managing both languages and translations is through the provided repositories. You may circumvent this by saving changes directly through the Language and Translation models, however validation is no longer executed automatically on model save and could lead to instability and errors.

Both the Language and the Translation repositories provide the following methods:

Method Description
hasTable(); Returns true if the corresponding table exists in the database, false otherwise
all($related = [], $perPage = 0); Retrieve all records from the DB. A paginated record will be return if the second argument is > 0, with $perPage items returned per page
find($id); Find a record by id
create($attributes); Validates the given attributes and inserts a new record. Returns false if validation errors occured
delete($id); Delete a record by id
restore($id); Restore a record by id
count(); Return the total number of entries
validate(array $attributes); Checks if the given attributes are valid
validationErrors(); Get validation errors for create and update methods

Managing Languages

Language management should be done through the \Waavi\Translation\Repositories\LanguageRepository to ensure proper data validation before inserts and updates. It is recommended that you instantiate this class through Dependency Injection.

A valid Language record requires both its name and locale to be unique. It is recommended you use the native name for each language (Ex: English, Español, Français)

The provided methods are:

Method Description
update(array $attributes); Updates a Language entry [id, name, locale]
trashed($related = [], $perPage = 0); Retrieve all trashed records from the DB.
findTrashed($id, $related = []); Find a trashed record by id
findByLocale($locale); Find a record by locale
findTrashedByLocale($locale); Finds a trashed record by locale
allExcept($locale); Returns a list of all languages excluding the given locale
availableLocales(); Returns a list of all available locales
isValidLocale($locale); Checks if a language exists with the given locale
percentTranslated($locale); Returns the percent translated for the given locale

Managing Translations

Translation management should be done through the \Waavi\Translation\Repositories\TranslationRepository to ensure proper data validation before inserts and updates. It is recommended that you instantiate this class through Dependency Injection.

A valid translation entry cannot have the same locale and language code than another.

The provided methods are:

Method Description
update($id, $text); Update an unlocked entry
updateAndLock($id, $text); Update and lock an entry (locked or not)
allByLocale($locale, $perPage = 0); Get all by locale
untranslated($locale, $perPage = 0, $text = null); Get all untranslated entries. If $text is set, entries will be filtered by partial matches to translation value.
pendingReview($locale, $perPage = 0); List all entries pending review
search($locale, $term, $perPage = 0); Search by all entries by locale and a partial match to both the text value and the translation code.
randomUntranslated($locale); Get a random untranslated entry
translateText($text, $textLocale, $targetLocale); Translate text to another locale
flagAsReviewed($id); Flag entry as reviewed

Things to consider:

  • You may lock translations so that they can only be updated through updateAndLock. The language file loader uses the update method and will not be able to override locked translations.
  • When a text entry belonging to the default locale is updated, all of its siblings are marked as pending review.
  • When deleting an entry, if it belongs to the default locale its translations will also be deleted.

Model attributes translation

You can also use the translation management system to manage your model attributes translations. To do this, you only need to:

  • Make sure either the database or mixed source are set.
  • Make sure your models use the Waavi\Translation\Translatable\Trait
  • In your model, add a translatableAttributes array with the names of the attributes you wish to be available for translation.
  • For every field you wish to translate, make sure there is a corresponding attributeName_translation field in your database.

Example:

	\Schema::create('examples', function ($table) {
        $table->increments('id');
        $table->string('slug')->nullable();
        $table->string('title')->nullable();
        $table->string('title_translation')->nullable();
        $table->string('text')->nullable();
        $table->string('text_translation')->nullable();
        $table->timestamps();
    });

    class Example extends Model
	{
	    use \Waavi\Translation\Traits\Translatable;
	    protected $translatableAttributes = ['title', 'text'];
	}

Uri localization

You may use Waavi\Translation\Middleware\TranslationMiddleware to make sure all of your urls are properly localized. The TranslationMiddleware will only redirect GET requests that do not have a locale in them.

For example, if a user visits the url /home, the following would happen:

  • The middleware will check if a locale is present.
  • If a valid locale is present:
    • it will globally set the language for that locale
    • the following data will be available in your views:
      • currentLanguage: current selected Language instance.
      • selectableLanguages: list of all languages the visitor can switch to (except the current one)
      • altLocalizedUrls: a list of all localized urls for the current resource except this one, formatted as ['locale' => 'en', 'name' => 'English', 'url' => '/en/home']
  • If no locale is present:
    • Check the first two letters of the brower's accepted locale HTTP_ACCEPT_LANGUAGE (for example 'en-us' => 'en')
    • If this is a valid locale, redirect the visitor to that locale => /es/home
    • If not, redirect to default locale => /en/home
    • Redirects will keep input data in the url, if any

You may choose to activate this Middleware globally by adding the middleware to your App\Http\Kernel file:

	protected $middleware = [
		/* ... */
        \Waavi\Translation\Middleware\TranslationMiddleware::class,
    ]

Or to apply it selectively through the 'localize' route middleware, which is already registered when installing the package through the ServiceProvider.

It is recommended you add the following alias to your config/app.php aliases:

	'aliases'         => [
		/* ... */
		'UriLocalizer'	=> Waavi\Translation\Facades\UriLocalizer::class,
    ];

Every localized route must be prefixed with the current locale:

	// If the middleware is globally applied:
	Route::group(['prefix' => \UriLocalizer::localeFromRequest()], function(){
		/* Your routes here */
	});

	// For selectively chosen routes:
	Route::group(['prefix' => \UriLocalizer::localeFromRequest(), 'middleware' => 'localize')], function () {
	    /* Your routes here */
	});

Starting on v2.1.6, you may also specify a custom position for the locale segment in your url. For example, if the locale info is the third segment in a URL (/api/v1/es/my_resource), you may use:

    // For selectively chosen routes:
    Route::group(['prefix' => 'api/v1'], function() {
        /** ... Non localized urls here **/

        Route::group(['prefix' => \UriLocalizer::localeFromRequest(2), 'middleware' => 'localize:2')], function () {
            /* Your localized routes here */
        });
    });

In your views, for routes where the Middleware is active, you may present the user with a menu to switch from the current language to another by using the shared variables. For example:

<li class="dropdown">
    <a href="#" class="dropdown-toggle" data-toggle="dropdown">{{ $currentLanguage->name }} <b class="caret"></b></a>
    <ul class="dropdown-menu">
        @foreach ($altLocalizedUrls as $alt)
            <li><a href="{{ $alt['url'] }}" hreflang="{{ $alt['locale'] }}">{{ $alt['name'] }}</a></li>
        @endforeach
    </ul>
</li>
Comments
  • [L5.2] Call to undefined method ...\Facades\UriLocalizer::localeFromRequest()

    [L5.2] Call to undefined method ...\Facades\UriLocalizer::localeFromRequest()

    Hi,

    I followed the doc to configuring Waavi\Translation but got a problem with the UriLocalizer facade.

    • "laravel/framework": "5.2.22"
    • "waavi/translation": "2.1.4"

    The code

    Route::group(['prefix' => \UriLocalizer::localeFromRequest()], function(){
    ...
    

    thrown the Exception:

    FatalErrorException in Facade.php line 215: Call to undefined method Waavi\Translation\Facades\UriLocalizer::localeFromRequest()
    

    I do not understand the error because of course, the Facade & Service exists. So why it does not found the well defined method localeFromRequest() ??

    I'm lost...

    Cheers, Cyrille.

    opened by Cyrille37 11
  • Segment fault after updating to laravel  4.2

    Segment fault after updating to laravel 4.2

    After installing the package on Laravel 4.2, none of my blade views were being displayed. Turns out that the server was throwing a apache segment fault. After removing waavi tranlation, everything came back to normal. Used the same package on older version of Laravel and never had any problem.

    Not sure if this is just me, only had this issue in one project.

    opened by victorpierredev 8
  • translator:load doesn't load translations to db

    translator:load doesn't load translations to db

    Hi,

    I have the same problem as decsribed here https://github.com/Waavi/translation/issues/9, locally (EasyPhp) an on the server (apache). Languages are defined in the languages table and I have the version with DIRECTORY_SEPARATOR. In the cache table, I have for example a key like this "laravelwaavi|translation|fr.nav.*", so I suppose that the package finds the translation files!?

    I tried with debug on/off, different cache types, one language with one file...

    I don't know really what else I could provide to help

    opened by fonz-lu 8
  • 'Maximum function nesting level of 100 reached' after load

    'Maximum function nesting level of 100 reached' after load

    I have this error when I run translator:load

    'Maximum function nesting level of 100 reached'

    I even changed the max nesting to 1000 but I still have the error.

    Any ideas what I can do?

    opened by myfakeusername 7
  • Migration error: Specified key was too long; max key length is 1000 bytes

    Migration error: Specified key was too long; max key length is 1000 bytes

    When running migrations I got this error:

    [Illuminate\Database\QueryException]
    SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes (S
    QL: alter table `translator_translations` add unique 
    `translator_translations_locale_namespace_group_item_unique`(`
    locale`, `namespace`, `group`, `item`))
    

    This was already reported years ago here https://github.com/Waavi/translation/issues/6 but it was closed and I don't understand how can I work around it?

    opened by mariavilaro 6
  • route, middleware infinite redirect es/es/es/es

    route, middleware infinite redirect es/es/es/es

    Hi,

    I configure all items in laravel 5.3 but redirect all sections to es/es/es

    my code is: app/Http/Kernel.php

    protected $middleware = [
            \Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class,
    		\Waavi\Translation\Middleware\TranslationMiddleware::class,
        ];
    

    web/routes.php

    Route::get('/', function () {	
    	return view('home');
    });
    

    config/translator.php

    
    return [
    
        /*
        |--------------------------------------------------------------------------
        | Default Translation Mode
        |--------------------------------------------------------------------------
        |
        | This option controls the translation's bundle mode of operation.
        |
        | Supported:
        |
        |   'mixed'         Both files and the database are queried for language entries, with files taking priority.
        |   'database'      Use the database as the exclusive source for language entries.
        |   'files'         Use files as the exclusive source for language entries [Laravel's default].
         */
        'source'            => 'database',
    
        // In case the files source is selected, please enter here the supported locales for your app.
        // Ex: ['en', 'es', 'fr']
        'available_locales' => ['en', 'es'],
    
        /*
        |--------------------------------------------------------------------------
        | Default Translation Cache
        |--------------------------------------------------------------------------
        |
        | Choose whether to leverage Laravel's cache module and how to do so.
        |
        |   'enabled'       Boolean value.
        |   'timeout'       In minutes.
        |
         */
        'cache'             => [
            'enabled' => env('TRANSLATION_CACHE_ENABLED', false),
            'timeout' => env('TRANSLATION_CACHE_TIMEOUT', 60),
            'suffix'  => env('TRANSLATION_CACHE_SUFFIX', 'translation'),
        ],
    ];
    

    Please Help!

    opened by ApuRed 6
  • Command handle method for Laravel 5.5

    Command handle method for Laravel 5.5

    Trying to load my translation a get this error [ReflectionException] Method Waavi\Translation\Commands\FileLoaderCommand::hand le() does not exist after some googling I find out that in newest Laravel versions the method handle is called instead of fire. post referende: https://laracasts.com/discuss/channels/laravel/tinkercommandhandle-does-not-exist

    I was tempted to use Trait instead of injecting directly the method, that would be more elegant, but I choose the easiest way.

    opened by lysz210 5
  • Laravel 5.5 ReflectionException: php artisan translator:flush

    Laravel 5.5 ReflectionException: php artisan translator:flush

    I get next exception:

    [ReflectionException]                                                         
    Method Waavi\Translation\Commands\CacheFlushCommand::handle() does not exist 
    

    Could you suggest something?

    composer.lock:
    {
                "name": "waavi/translation",
                "version": "2.3.1",
                "source": {
                    "type": "git",
                    "url": "https://github.com/Waavi/translation.git",
                    "reference": "c89d1023cef62f26c2cbc431511fd8c08af69617"
                },
                "dist": {
                    "type": "zip",
                    "url": "https://api.github.com/repos/Waavi/translation/zipball/c89d1023cef62f26c2cbc431511fd8c08af69617",
                    "reference": "c89d1023cef62f26c2cbc431511fd8c08af69617",
                    "shasum": ""
                },
                "require": {
                    "doctrine/dbal": "^2.5",
                    "laravel/framework": "~5.5"
                },
                "require-dev": {
                    "mockery/mockery": "^0.9.9",
                    "orchestra/testbench": "~3.5",
                    "phpunit/phpunit": "~6.0"
                },
                "type": "library",
                "autoload": {
                    "psr-4": {
                        "Waavi\\Translation\\": "src/"
                    }
                },
                "notification-url": "https://packagist.org/downloads/",
                "license": [
                    "MIT"
                ],
                "authors": [
                    {
                        "name": "Waavi",
                        "email": "[email protected]",
                        "homepage": "http://waavi.com"
                    }
                ],
                "description": "A Translation package for Laravel 5 with database and cache support",
                "keywords": [
                    "laravel",
                    "laravel-translator",
                    "localization",
                    "translation",
                    "translator",
                    "waavi"
                ],
                "time": "2017-09-01T15:24:21+00:00"
            }
    
    opened by DieselPower200 5
  • Localization does not work with Route::post

    Localization does not work with Route::post

    I don`t what is happening but localization does not work with route::post:

    Route::group(['prefix' => UriLocalizer::localeFromRequest()], function () {
    Route::get('/advertisements/save',function(){
    		echo trans('main.entry_created');
    	})->name('advertisements.store');
    
    Route::post('/advertisements/save',function(){
    		echo trans('main.entry_created');
    	})->name('advertisements.store');
    });
    

    With route::get it is always translated correctly, but with route::post it always translates to default locale - english. I have also activated translation middleware globally. Maybe I am using something wrong?

    opened by seriousTom 5
  • Problem translating attributes

    Problem translating attributes

    Got this in my translation file (validation.php):

    'attributes' => [
            'nick' => 'Nickname',
            'passwd' => 'Passwort',
    ],
    

    this is imported in my database: group: validation item: attributes.nick

    But in my error messages its not resolved. Is there an error on my side or are attribute translations not supported?

    opened by cmaerz 5
  • Update Dependancy Versions

    Update Dependancy Versions

    The unit tests pass (with 1 failure which was failing with 5.1.x) and having implemented and tested on a laravel 5.2 installation all appears to be working correctly.

    opened by thetomcake 5
  • Add support for base url

    Add support for base url

    Add support for base url.

    This is required if URL is something like https://localhost/fistforlder/secondfolder/ and not the traditional https://localhost. This requires proper APP_URL configuration in .env (or respective configuration in config/app.php).

    opened by kungro 0
  • not supported with url

    not supported with url

    hello,

    using Laravel version - 5.8

    followed https://github.com/Waavi/translation#uri-localization this instruction. but I didn't get the correct route in PHP artisan route: list. and also API gave 404 status code.

    here is api.php -

    Route::group(['prefix' => '/v1', 'middleware' => ['auth:api'], 'namespace' => 'Api\V1', 'as' => 'api.'], function () { Route::group(['prefix' => \UriLocalizer::localeFromRequest(2),'middleware' => 'localize:2'], function () { Route::get('me', 'UserController@profile'); }); });

    Here route list -

    Screenshot from 2020-11-09 11-42-56

    Please help me,

    Thanks in advance!!

    opened by roshani3110 0
  • Laravel 8 Support

    Laravel 8 Support

    Update for Travis

    PHP travis version updated to 7.4

    Updates for composer

    laravel version updated to ^8.0 phpunit version updated to ~9.1 testbench version updated to ~6.0 mockery version updated to ^1.3

    You should set the release tag "2.5" for this PR.

    Regards.

    opened by cstriuli 15
  • Migrations not publishing

    Migrations not publishing

    • Solve the issue of migration tables not publishing to migrations folder .
    • Am using a multitenant package and i had to do that edit in vendor folder, which is not recommended. $this->publishes([ DIR . '/../config/translator.php' => config_path('translator.php'), DIR . '/../database/migrations/' => database_path('migrations'), ]); // $this->loadMigrationsFrom(DIR . '/../database/migrations/'); Remove this part That is the suggested solution.
    opened by musioks 0
  • array_replace_recursive(): Argument #1 is not an array

    array_replace_recursive(): Argument #1 is not an array

    Currently Running Laravel v5.8.35 with Waavi/Translation 2.3.4. Cache is enabled but initial loading is from file only, we're not running it with database or mixed mode enabled. Randomly getting this error in production only, haven't been able to reproduce locally or in production-like environments.

    Stack Traces always point back to: /home/forge/default/vendor/waavi/translation/src/Loaders/Loader.php:42 Illuminate\View\Engines\CompilerEngine::handleViewException

    We've actually been seeing this error for a while but had attributed it to Session timeouts because locale is stored in the session. However, we just saw it today on an initial page load without a session.

    My thoughts are something around the Caching system but I'm still unable to reproduce. Curious if anyone has encountered this error before and just looking for some input. I've thought about just disabling the Cache feature but I'm worried about performance.

    opened by mickeyfmann 5
Owner
Waavi
Waavi
[virion] Language management library for automatic translation

libtranslator :: library for automatic translation ✔️ Multilingual support for plugin messages ✔️ Translation language is set according to the player

PocketMine-MP projects of PresentKim 5 Jul 29, 2022
Laravel translation made __('simple').

Translation.io client for Laravel 5.5+/6/7/8 Add this package to localize your Laravel application. Use the official Laravel syntax (with PHP or JSON

Translation.io 109 Dec 29, 2022
🎌 Laravel Localization Helper :: Easily add translation variables from Blade templates.

LocalizationHelper Package for convenient work with Laravel's localization features and fast language files generation. Take a look at contributing.md

Awes.io 36 Jul 18, 2022
Manage Laravel translation files

Laravel 5 Translation Manager For Laravel 4, please use the 0.1 branch! This is a package to manage Laravel translation files. It does not replace the

Barry vd. Heuvel 1.5k Jan 4, 2023
A GUI for managing JSON translation files in your laravel projects.

Laravel Language Manager Langman is a GUI for managing your JSON language files in a Laravel project. Installation Begin by installing the package thr

Mohamed Said 515 Nov 30, 2022
A Gui To Manage Laravel Translation Files

Lingo A file based translation manager, which unlike other Lang managers don't need a database connection to handle the translation. Installation comp

Muah 97 Dec 5, 2022
Provides support for message translation and localization for dates and numbers.

The I18n library provides a I18n service locator that can be used for setting the current locale, building translation bundles and translating messages. Additionally, it provides the Time and Number classes which can be used to output dates, currencies and any numbers in the right format for the specified locale.

CakePHP 26 Oct 22, 2022
Internationalization tools, particularly message translation.

Aura.Intl The Aura.Intl package provides internationalization (I18N) tools, specifically package-oriented per-locale message translation. Installation

Aura for PHP 86 Dec 18, 2022
The Translation component provides tools to internationalize your application.

Translation Component The Translation component provides tools to internationalize your application. Getting Started $ composer require symfony/transl

Symfony 6.4k Jan 6, 2023
Filament Translations - Manage your translation with DB and cache

Filament Translations Manage your translation with DB and cache, you can scan your languages tags like trans(), __(), and get the string inside and tr

Fady Mondy 32 Nov 28, 2022
Official PHP library for the DeepL language translation API.

deepl-php Official PHP client library for the DeepL API. The DeepL API is a language translation API that allows other computer programs to send texts

DeepL 78 Dec 23, 2022
French-Traduction-Pterodactyl est la traduction française de pterodactyl French-Traduction-Pterodactyl is the French translation of pterodactyl

French-Traduction-Pterodactyl Star French-Traduction-Pterodactyl est la traduction française de pterodactyl French-Traduction-Pterodactyl is the Frenc

null 5 Sep 26, 2022
Translation (i18n) Manager as a virion

TL Translation (i18n) Manager as a virion Translation use hook-like $t = $tl->useTranslation($player->getLocale()); $player->sendMessage($t("message-k

RedMC Network 3 Oct 28, 2022
Composer package providing translation features for PHP apps

PHP translation This is a composer package providing translation support for PHP applications. It is similar to gettext, in usage, with these differen

Sérgio Carvalho 0 Aug 15, 2022
List of 77 languages for Laravel Framework 4, 5, 6, 7 and 8, Laravel Jetstream , Laravel Fortify, Laravel Cashier and Laravel Nova.

Laravel Lang In this repository, you can find the lang files for the Laravel Framework 4/5/6/7/8, Laravel Jetstream , Laravel Fortify, Laravel Cashier

Laravel Lang 6.9k Dec 29, 2022
75 languages support for Laravel 5 application based on Laravel-Lang/lang.

Laravel-lang 75 languages support for Laravel 5 application based on Laravel-Lang/lang. Features Laravel 5+ && Lumen support. Translations Publisher.

安正超 1.3k Jan 4, 2023
Easy localization for Laravel

Laravel Localization Easy i18n localization for Laravel, an useful tool to combine with Laravel localization classes. The package offers the following

Marc Cámara 3k Jan 4, 2023
[Deprecated] A Laravel package for multilingual models

This package has been deprecated. But worry not. You can use Astrotomic/laravel-translatable. Laravel-Translatable If you want to store translations o

Dimitris Savvopoulos 2k Dec 25, 2022
Easy multilingual urls and redirection support for the Laravel framework

Linguist - Multilingual urls and redirects for Laravel This package provides an easy multilingual urls and redirection support for the Laravel framewo

Tanel Tammik 189 Jul 18, 2022