Download the PHP package alkhatibdev/language-switcher without Composer

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

Social Card of Language Switcher Package

Laravel dynamic language switcher

Latest Version Packagist Downloads (custom server)

Introduction

Laravel dynamic language switcher for both web and API routes with various supported options.

Features

Installation

install via composer

Publish Configs

A language-switcher.php config file will be published on your configs directory. Feel free to read and override all these configurable parts, or stick with the defaults configs


Usage

Basic Usage

Everything is set out of the box, start calling your routes with these supported options:

Via Request query/body keys

Via request headers keys

Via route parameters

For given route: Route::get('/{locale}/home', [HomeController, 'home']);


Note
- All previous examples will ask the package to switch locale to 'en'.
- Upcoming requests still remind this newly set locale.


Customize Package Scope

By default, the package middleware is assigned globally to all your routes. However, you can disable assign_globally from the package config file, and assign middleware alias to all routes and route groups manually.

Disable global assignment

Assign to route or route groups

Assign to middleware groups

Disable Saving

By default, the package uses sessions to store the current locale, switched by a user, to keep the newly selected locale active for the next requests without a need to pass the locale in every request. However, if you want to stop this behavior, set enable_session to false.


License

Language Switcher is open-sourced software licensed under the MIT license.


All versions of language-switcher with dependencies

PHP Build Version
Package Version
No informations.
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 alkhatibdev/language-switcher contains the following files

Loading the files please wait ....