Download the PHP package zymawy/localizer without Composer

On this page you can find all versions of the php package zymawy/localizer. 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 localizer

Localizer

StyleCI Version Scrutinizer Downloads License

What is Localizer?

Localizer is a laravel package to change easily locale on laravel projects.

It's so simple to use, once it's installed, your App locale will change only by passing routes into localizer middleare.

Top features:

Getting Started

1. Install it with composer

Running the command below:

2. Register service provider

Register the localizer service provider on config/app.php.

Remind to add alias to use Localizer functions comfortably.

3. Publish config

It will publish config file.

Running the command below:

3.1 Publish languages

Also you can publish your languages to modify or add.

4. Migrate

Publish migrations:

Running the command below:

5. Configure defalt values

Default values can be modified also on config/localizer.php.

Keys

Using Localizer

Middleware

All routes in which you want to set language should be under the localizer's middleware to set at each request de App locale.

Changing languages

Tip: /lang prefix will be changed on config

Example languages view

Following there are a little code snippet of a view to select and set languages:

API

Localizer::allowedLanguages()

Returns an array with [$code => $language] for all allowed languages of config.

Localizer::addNames($codes)

Get an array like [$code => $language] from an array of only $codes.

Localizer::addCodes($lang)

Get an array like [$language => $code] from an array of only $langs.

Localizer::setRoute($code)

Used for modals or dropdowns

Returns the url to set up language and return back.

Also if you prefer to use directly route() function you can use it as following code:

Localizer::setRouteHome($code)

Used for language selection views

Returns the url to set language and return '/' url('/')

Also if you prefer to use directly route() function you can use it as following code:

Localizer::getLanguage($code = App::getLocale())

Returns the language name of $code if specified or the current language setted if not.

Tip: Use App::getLocale() to get the current locale


All versions of localizer with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6.4
laravel/framework Version 5.*|^6.0|^7.0
consoletvs/identify Version 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 zymawy/localizer contains the following files

Loading the files please wait ....