mirror of
https://github.com/OpenXE-org/OpenXE.git
synced 2025-01-15 00:01:13 +01:00
6695369af7
Füge Copyright-Hinweise hinzu.
62 lines
1.3 KiB
PHP
62 lines
1.3 KiB
PHP
<?php
|
|
/*
|
|
* SPDX-FileCopyrightText: 2023 Roland Rusch, easy-smart solution GmbH <roland.rusch@easy-smart.ch>
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
|
*/
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Xentral\Components\I18n;
|
|
|
|
/**
|
|
* Interface LocalizationInterface
|
|
*
|
|
* @author Roland Rusch, easy-smart solution GmbH <roland.rusch@easy-smart.ch>
|
|
*/
|
|
interface LocalizationInterface
|
|
{
|
|
const LOCALE_DEFAULT = 'locale_default';
|
|
const LOCALE_ATTRIBUTE_NAME = 'locale_attr_name';
|
|
const LANGUAGE_DEFAULT = 'language_default';
|
|
const LANGUAGE_ATTRIBUTE_NAME = 'language_attr_name';
|
|
|
|
|
|
|
|
/**
|
|
* Set the language.
|
|
*
|
|
* @param string $language
|
|
*/
|
|
public function setLanguage(string $language);
|
|
|
|
|
|
|
|
/**
|
|
* Return the language string as defined by $key.
|
|
*
|
|
* @param string|null $key A constant from Iso639\Key
|
|
*
|
|
* @return string
|
|
*/
|
|
public function getLanguage(string $key = null): string;
|
|
|
|
|
|
|
|
/**
|
|
* Set the locale.
|
|
*
|
|
* @param string $locale
|
|
*/
|
|
public function setLocale(string $locale);
|
|
|
|
|
|
|
|
/**
|
|
* Return the locale string as defined by $key.
|
|
*
|
|
* @param string|null $key A constant from Iso3166\Key
|
|
*
|
|
* @return string
|
|
*/
|
|
public function getLocale(string $key = null): string;
|
|
} |