Locale resolver that extracts site, language, and currency from routes/requests and bootstraps the Aimeos locale manager for multi-site e-commerce.
// Source: https://github.com/aimeos/aimeos-laravel | License: MIT | Copyright 2015 Aimeos
// Provided via justclaw.it.com; keep this notice with the code.
<?php
/**
* @license MIT, http://opensource.org/licenses/MIT
* @copyright Aimeos (aimeos.org), 2015-2023
*/
namespace Aimeos\Shop\Base;
use Illuminate\Support\Facades\Request;
use Illuminate\Support\Facades\Route;
/**
* Service providing the context objects
*/
class Locale
{
/**
* @var \Illuminate\Contracts\Config\Repository
*/
private $config;
/**
* @var \Aimeos\MShop\Locale\Item\Iface
*/
private $locale;
/**
* Initializes the object
*
* @param \Illuminate\Contracts\Config\Repository $config Configuration object
*/
public function __construct( \Illuminate\Contracts\Config\Repository $config )
{
$t
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search 40K more like it.
Get a free API key