All Projects → overtrue → Laravel Lang

overtrue / Laravel Lang

Licence: mit
🌏 75 languages support for Laravel application.

Projects that are alternatives of or similar to Laravel Lang

Laravel Js Localization
🌐 Convert your Laravel messages and consume them in the front-end!
Stars: ✭ 451 (-60.23%)
Mutual labels:  i18n, laravel, localization
Linguist
Easy multilingual urls and redirection support for the Laravel framework
Stars: ✭ 188 (-83.42%)
Mutual labels:  i18n, laravel, localization
Lang.js
🎭 Laravel Translator class in JavaScript!
Stars: ✭ 232 (-79.54%)
Mutual labels:  i18n, laravel, localization
Mobility
Pluggable Ruby translation framework
Stars: ✭ 644 (-43.21%)
Mutual labels:  i18n, localization
Laravel Translation Loader
Store your translations in the database or other sources
Stars: ✭ 446 (-60.67%)
Mutual labels:  i18n, laravel
Fluent Rs
Rust implementation of Project Fluent
Stars: ✭ 503 (-55.64%)
Mutual labels:  i18n, localization
React Localize Redux
Dead simple localization for your React components
Stars: ✭ 384 (-66.14%)
Mutual labels:  i18n, localization
Localization Helper
🎌 Laravel Localization Helper :: Easily add translation variables from Blade templates.
Stars: ✭ 31 (-97.27%)
Mutual labels:  laravel, localization
Frenchkiss.js
The blazing fast lightweight internationalization (i18n) module for javascript
Stars: ✭ 776 (-31.57%)
Mutual labels:  i18n, localization
Parrot
Self-hosted Localization Management Platform built with Go and Angular
Stars: ✭ 967 (-14.73%)
Mutual labels:  i18n, localization
Goloc
A flexible tool for application localization using Google Sheets.
Stars: ✭ 42 (-96.3%)
Mutual labels:  i18n, localization
Juliazh.jl
Julia语言中文文档
Stars: ✭ 425 (-62.52%)
Mutual labels:  i18n, localization
Texterify
The localization management system.
Stars: ✭ 37 (-96.74%)
Mutual labels:  i18n, localization
React Intl Hooks
React hooks for internationalization without the hassle ⚛️🌍
Stars: ✭ 64 (-94.36%)
Mutual labels:  i18n, localization
Fluent.js
JavaScript implementation of Project Fluent
Stars: ✭ 622 (-45.15%)
Mutual labels:  i18n, localization
Easy localization
Easy and Fast internationalizing your Flutter Apps
Stars: ✭ 407 (-64.11%)
Mutual labels:  i18n, localization
Next Translate
Next.js plugin + i18n API for Next.js 10 🌍 - Load page translations and use them in an easy way!
Stars: ✭ 867 (-23.54%)
Mutual labels:  i18n, localization
Atom I18n
:atom: One Atom i18n Package for Any Locale 🌏 🌎 🌍
Stars: ✭ 56 (-95.06%)
Mutual labels:  i18n, localization
Androidlocalizeplugin
🌏 Android localization plugin. support multiple languages, no need to apply for key.
Stars: ✭ 352 (-68.96%)
Mutual labels:  i18n, localization
Laravel Pt Br Localization
Tradução do Laravel para português brasileiro (pt_BR locale)
Stars: ✭ 373 (-67.11%)
Mutual labels:  laravel, localization

Laravel-lang

75 languages support for Laravel 5 application based on Laravel-Lang/lang.

For Laravel 5 For Lumen 5 Latest Stable Version Latest Unstable Version Total Downloads License

Features

  • Laravel 5+ && Lumen support.
  • Translations Publisher.
  • Made with 💖.

Install

$ composer require "overtrue/laravel-lang:~3.0"

Laravel 5.*

After completion of the above, Replace the config/app.php content

Illuminate\Translation\TranslationServiceProvider::class,

with:

Overtrue\LaravelLang\TranslationServiceProvider::class,

Lumen

Add the following line to bootstrap/app.php:

$app->register(Overtrue\LaravelLang\TranslationServiceProvider::class);

Configuration

Laravel

you can change the locale at config/app.php:

'locale' => 'zh_CN',

Lumen

set locale in .env file:

APP_LOCALE=zh_CN

Usage

There is no difference with the usual usage.

If you need to add additional language content, Please create a file in the resources/lang/{LANGUAGE} directory.

Add custom language items

Here, for example in Chinese:

resources/lang/zh_CN/demo.php:

<?php

return [
    'user_not_exists'    => '用户不存在',
    'email_has_registed' => '邮箱 :email 已经注册过!',
];

Used in the template:

echo trans('demo.user_not_exists'); // 用户不存在
echo trans('demo.email_has_registed', ['email' => '[email protected]']);
// 邮箱 [email protected] 已经注册过!

Replace the default language items partially

We assume that want to replace the password.reset message:

resources/lang/zh_CN/passwords.php:

<?php

return [
    'reset' => '您的密码已经重置成功了,你可以使用新的密码登录了!',
];

You need only add the partials item what you want.

publish the language files to your project resources/lang/ directory:

$ php artisan lang:publish [LOCALES] {--force}

examples:

$ php artisan lang:publish zh_CN,zh_HK,th,tk

PHP 扩展包开发

想知道如何从零开始构建 PHP 扩展包?

请关注我的实战课程,我会在此课程中分享一些扩展开发经验 —— 《PHP 扩展包实战教程 - 从入门到发布》

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].