diff --git a/src/Symfony/Components/HttpKernel/Request.php b/src/Symfony/Components/HttpKernel/Request.php
index 3cbb928af8..ac93f963d4 100644
--- a/src/Symfony/Components/HttpKernel/Request.php
+++ b/src/Symfony/Components/HttpKernel/Request.php
@@ -489,25 +489,25 @@ class Request
/**
* Returns the preferred language.
*
- * @param array $cultures An array of ordered available cultures
+ * @param array $locales An array of ordered available locales
*
- * @return string The preferred culture
+ * @return string The preferred locale
*/
- public function getPreferredLanguage(array $cultures = null)
+ public function getPreferredLanguage(array $locales = null)
{
$preferredLanguages = $this->getLanguages();
- if (null === $cultures) {
+ if (null === $locales) {
return isset($preferredLanguages[0]) ? $preferredLanguages[0] : null;
}
if (!$preferredLanguages) {
- return $cultures[0];
+ return $locales[0];
}
- $preferredLanguages = array_values(array_intersect($preferredLanguages, $cultures));
+ $preferredLanguages = array_values(array_intersect($preferredLanguages, $locales));
- return isset($preferredLanguages[0]) ? $preferredLanguages[0] : $cultures[0];
+ return isset($preferredLanguages[0]) ? $preferredLanguages[0] : $locales[0];
}
/**
diff --git a/src/Symfony/Framework/WebBundle/DependencyInjection/WebExtension.php b/src/Symfony/Framework/WebBundle/DependencyInjection/WebExtension.php
index 862c99f865..14a3bfb944 100644
--- a/src/Symfony/Framework/WebBundle/DependencyInjection/WebExtension.php
+++ b/src/Symfony/Framework/WebBundle/DependencyInjection/WebExtension.php
@@ -68,8 +68,8 @@ class WebExtension extends LoaderExtension
$configuration->merge($loader->load($this->resources['user']));
}
- if (isset($config['default_culture'])) {
- $configuration->setParameter('user.default_culture', $config['default_culture']);
+ if (isset($config['default_locale'])) {
+ $configuration->setParameter('user.default_locale', $config['default_locale']);
}
if (isset($config['class'])) {
diff --git a/src/Symfony/Framework/WebBundle/Helper/UserHelper.php b/src/Symfony/Framework/WebBundle/Helper/UserHelper.php
index 5b3c7c4a44..4208d5b94b 100644
--- a/src/Symfony/Framework/WebBundle/Helper/UserHelper.php
+++ b/src/Symfony/Framework/WebBundle/Helper/UserHelper.php
@@ -49,13 +49,13 @@ class UserHelper extends Helper
}
/**
- * Returns the user culture
+ * Returns the user locale
*
* @return string
*/
- public function getCulture()
+ public function getLocale()
{
- return $this->user->getCulture();
+ return $this->user->getLocale();
}
public function getFlash($name, $default = null)
diff --git a/src/Symfony/Framework/WebBundle/Resources/config/schema/dic/symfony/symfony-1.0.xsd b/src/Symfony/Framework/WebBundle/Resources/config/schema/dic/symfony/symfony-1.0.xsd
index 38542c67f5..733fca835a 100644
--- a/src/Symfony/Framework/WebBundle/Resources/config/schema/dic/symfony/symfony-1.0.xsd
+++ b/src/Symfony/Framework/WebBundle/Resources/config/schema/dic/symfony/symfony-1.0.xsd
@@ -15,7 +15,7 @@
-
+
diff --git a/src/Symfony/Framework/WebBundle/Resources/config/user.xml b/src/Symfony/Framework/WebBundle/Resources/config/user.xml
index 8880d72288..8da9ceb260 100644
--- a/src/Symfony/Framework/WebBundle/Resources/config/user.xml
+++ b/src/Symfony/Framework/WebBundle/Resources/config/user.xml
@@ -6,7 +6,7 @@
Symfony\Framework\WebBundle\User
- en
+ en
Symfony\Framework\WebBundle\Session\NativeSession
Symfony\Framework\WebBundle\Session\PdoSession
SYMFONY_SESSION
@@ -25,7 +25,7 @@
- %user.default_culture%
+ %user.default_locale%
diff --git a/src/Symfony/Framework/WebBundle/User.php b/src/Symfony/Framework/WebBundle/User.php
index df3ac7a037..c86048694b 100644
--- a/src/Symfony/Framework/WebBundle/User.php
+++ b/src/Symfony/Framework/WebBundle/User.php
@@ -25,7 +25,7 @@ use Symfony\Framework\WebBundle\Session\SessionInterface;
class User
{
protected $session;
- protected $culture;
+ protected $locale;
protected $attributes;
protected $oldFlashes;
@@ -43,7 +43,7 @@ class User
$this->setAttributes($session->read('_user', array(
'_flash' => array(),
- '_culture' => isset($options['default_culture']) ? $options['default_culture'] : 'en',
+ '_locale' => isset($options['default_locale']) ? $options['default_locale'] : 'en',
)));
// flag current flash to be removed at shutdown
@@ -95,26 +95,26 @@ class User
}
/**
- * Returns the user culture
+ * Returns the user locale
*
* @return string
*/
- public function getCulture()
+ public function getLocale()
{
- return $this->getAttribute('_culture');
+ return $this->getAttribute('_locale');
}
/**
- * Sets the user culture.
+ * Sets the user locale.
*
- * @param string $culture
+ * @param string $locale
*/
- public function setCulture($culture)
+ public function setLocale($locale)
{
- if ($this->culture != $culture) {
- $this->setAttribute('_culture', $culture);
+ if ($this->locale != $locale) {
+ $this->setAttribute('_locale', $locale);
- $this->dispatcher->notify(new Event($this, 'user.change_culture', array('culture' => $culture)));
+ $this->dispatcher->notify(new Event($this, 'user.change_locale', array('locale' => $locale)));
}
}