Download the PHP package sinkcup/laravel-locale-setter without Composer

On this page you can find all versions of the php package sinkcup/laravel-locale-setter. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-locale-setter

Laravel Locale Setter Middleware

This package detect Accept-Language in HTTP header(query string and cookie will be comming), setLocale, then you can use Laravel localization for I18N.

CircleCI

Installation

Install the package via Composer:

Next, add the package's service provider to your config/app.php:

and then you'll just need to publish the package's configuration:

which will create config/locale.php.

Usage

Global Middleware

Normally, it should run during every HTTP request, simply add the middleware class to the $middleware property of your app/Http/Kernel.php class. For example:

Assigning Middleware To Routes

if you would like to assign middleware to specific routes, you should add the middleware class to the $routeMiddleware property of your app/Http/Kernel.php class. For example:

Once the middleware has been defined in the HTTP kernel, you may use the middleware method to assign middleware to a route:

Config

Linux locale and HTML 4 language code followed RFC1766 which was released at March 1995. It's out-of-date.

Due to historical reasons, Linux locale and browsers are still using old standard at now.

iOS want to change it, use zh-Hans and zh-Hans-CN, but it's wrong too.

If you want to do something right, follow the modern standard - BCP47 which HTML5 using, and map old language codes to new.

You should use cmn-Hans, cmn-Hans-CN, cmn-Hant and cmn-Hant-TW, instead of zh-CN, zh-TW, zh-Hans and zh-Hant.

create dirs:

then use:

If you care about regional differences, create dirs:

then use:


All versions of laravel-locale-setter with dependencies

PHP Build Version
Package Version
Requires laravel/framework Version >=5.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package sinkcup/laravel-locale-setter contains the following files

Loading the files please wait ....