Download the PHP package backpack/language-switcher without Composer

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

Language Switcher

Latest Version on Packagist Total Downloads The Whole Fruit Manifesto

This package adds a Language Switcher dropdown for projects using Backpack for Laravel.

Preview

Demo

Try it right now, in our online demo.

Installation

1) In your Laravel project, install this package:

2) Add the middleware to backpack config config/backpack/base.php:

Optionally, you may add the middleware to the web, api or other middleware groups where you may want to use the language switcher, in app/Http/Kernel.php.

3) Add the dropdown view to topbar_right_content.blade.php or wherever you need it:

4) In order to add the available languages of your app, you'll need to enable them in the backpack crud config file config/backpack/crud.php

There you can set the array of locales your app uses. Keep in mind the default locale of your app should remain in config.app.locale and config.app.fallback_locale.

Usage

Can I show/hide the main label or flags?

Yes!
You can do it by sending special arguments to the component:

Can I use this package outside of the backpack/admin scope?

Yes!
If you wish to use the language switcher on other parts of your app, you can do it by adding the middleware in app/Http/Kernel.php. You can, for instance, enable this for the whole web middleware group, or the api.

Can I customize the endpoint routes ?

Yes! You can do it by publishing the config file php artisan vendor:publish --provider="Backpack\LanguageSwitcher\LanguageSwitcherServiceProvider" --tag="config". There you can totally disable the package route and register your own, or change some behavior related with display urls.

Please take caution to protect the endpoint with throttling or any other security measure if you overwrite the routes. The default package route uses: 'throttle:60,1'

Notes

This package uses outhebox/blade-flags to get the flags representing languages/locales.

If you find any issue with any with it, like a missing or wrong flag, you can report directly to the maintainer.

Security

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

Credits

License

This project was released under MIT License, so you can install it on top of any Backpack & Laravel project. Please see the license file for more information.


All versions of language-switcher with dependencies

PHP Build Version
Package Version
Requires backpack/crud Version ^6.7
outhebox/blade-flags Version ^1.2
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 backpack/language-switcher contains the following files

Loading the files please wait ....