4 * This file is part of the Symfony package.
6 * (c) Fabien Potencier <fabien@symfony.com>
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
12 namespace Symfony\Component\Intl\ResourceBundle
;
15 * Gives access to language-related ICU data.
17 * @author Bernhard Schussek <bschussek@gmail.com>
19 interface LanguageBundleInterface
extends ResourceBundleInterface
22 * Returns the name of a language.
24 * @param string $lang A language code (e.g. "en").
25 * @param string|null $region Optional. A region code (e.g. "US").
26 * @param string $locale Optional. The locale to return the name in.
27 * Defaults to {@link \Locale::getDefault()}.
29 * @return string|null The name of the language or NULL if not found.
31 public function getLanguageName($lang, $region = null, $locale = null);
34 * Returns the names of all known languages.
36 * @param string $locale Optional. The locale to return the names in.
37 * Defaults to {@link \Locale::getDefault()}.
39 * @return string[] A list of language names indexed by language codes.
41 public function getLanguageNames($locale = null);
44 * Returns the name of a script.
46 * @param string $script A script code (e.g. "Hans").
47 * @param string $lang Optional. A language code (e.g. "zh").
48 * @param string $locale Optional. The locale to return the name in.
49 * Defaults to {@link \Locale::getDefault()}.
51 * @return string|null The name of the script or NULL if not found.
53 public function getScriptName($script, $lang = null, $locale = null);
56 * Returns the names of all known scripts.
58 * @param string $locale Optional. The locale to return the names in.
59 * Defaults to {@link \Locale::getDefault()}.
61 * @return string[] A list of script names indexed by script codes.
63 public function getScriptNames($locale = null);