Download the PHP package reachweb/locale-lander without Composer

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

locale_lander_bg

Locale Lander

Locale Lander is a simple addon for Statamic, particularly useful for multi-site setups involving multiple languages. It redirects users to the default language of their browser during their first visit or displays a banner informing the user that the content is available in their native language.

How to Install

Install using composer:

How to Use (Redirection)

To use the redirection feature, no additional configuration is needed after installation. The addon should function right out of the box.

How to Use (Banner)

To use the banner feature, Locale Lander provides a tag called, you guessed it, locale-lander.

First, you must disable automatic redirection. Publish the config file:

and in config/locale-lander.php disable redirection:

Then, you can use the tag by adding the necessary code to a file that loads on all pages of your website, usually layout.antlers.html.

The tag will return an array that always contains an 'entry' key. If the Entry is unavailable in this locale, entry will be false. Otherwise, it will contain the title and the url of the entry. A site key is also provided with information about the user's locale site.

As you might have guessed, the addon contains an example banner template, styled with Tailwind CSS, that works out of the box.

Publish the template:

and you should be good to go. If you are not using Tailwind CSS, you will need to style it yourself.

In case you want to implement your own version, note that you should set a cookie named locale_banner_closed to prevent showing the banner to users who have closed it.

How it Works

This addon automatically applies a middleware in the statamic.web middleware group. Here's the process:

Common Issues


All versions of locale-lander with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1 || ^8.2
statamic/cms Version 4.51.0|^5.0.0
symfony/intl Version ^6.4 || ^7.0
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 reachweb/locale-lander contains the following files

Loading the files please wait ....