LocaleBundleInterface.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. /*
  3. * This file is part of the Symfony package.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Symfony\Component\Intl\ResourceBundle;
  11. /**
  12. * Gives access to locale-related ICU data.
  13. *
  14. * @author Bernhard Schussek <bschussek@gmail.com>
  15. */
  16. interface LocaleBundleInterface extends ResourceBundleInterface
  17. {
  18. /**
  19. * Returns the name of a locale.
  20. *
  21. * @param string $locale The locale to return the name of (e.g. "de_AT")
  22. * @param string $displayLocale Optional. The locale to return the name in
  23. * Defaults to {@link \Locale::getDefault()}.
  24. *
  25. * @return string|null The name of the locale or NULL if not found
  26. */
  27. public function getLocaleName($locale, $displayLocale = null);
  28. /**
  29. * Returns the names of all known locales.
  30. *
  31. * @param string $displayLocale Optional. The locale to return the names in
  32. * Defaults to {@link \Locale::getDefault()}.
  33. *
  34. * @return string[] A list of locale names indexed by locale codes
  35. */
  36. public function getLocaleNames($displayLocale = null);
  37. }