Download the PHP package akaunting/laravel-language without Composer

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

Language switcher package for Laravel

Downloads StyleCI Quality

This package allows switching locale easily on Laravel projects. It's so simple to use, once it's installed, your App locale will change only by passing routes into SetLanguage middleware.

Top features:

Getting Started

1. Install

Run the following command:

2. Register (for Laravel < 5.5)

Register the service provider in config/app.php

Add alias if you want to use the facade.

3. Publish

Publish config, migration and blade files.

4. Migrate

Add locale column to users table:

5. Configure

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

Keys

Usage

Middleware

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

URL

Tip: /languages prefix can be changed from

Methods

language()->allowed()

Returns an array with for all allowed languages of config. Example usage on blade:

language()->flags()

Returns an output with flags for all allowed languages of config. Output can be changed from folder

language()->flag()

Returns the flag of the current locale. Output can be changed from folder

language()->names($codes = null)

Get an array like from an array of only $codes.

language()->codes($langs = null)

Get an array like from an array of only $langs.

language()->back($code)

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:

language()->home($code)

Returns the URL to set language and return to home:

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

language()->getName($code = 'default')

Returns the language name of if specified or the current language set if not.

Tip: Use app()->getLocale() to get the current locale

language()->getCode($name = 'default')

Returns the language code of if specified or the current language set if not.

Changelog

Please see Releases for more information what has changed recently.

Contributing

Pull requests are more than welcome. You must follow the PSR coding standards.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see LICENSE for more information.


All versions of laravel-language with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6.4
laravel/framework Version >=5.4.0
jenssegers/agent Version 2.6.*
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 akaunting/laravel-language contains the following files

Loading the files please wait ....