-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Closed
Labels
Description
Hi,
What about if I have translation file like: messages.sr@latin.yml
? sr@latin
is a valid ISO language code for Serbian in the Latin alphabet. After I have updated the Symfony 2.3 it throws InvalidArgumentException
which means I cannot use files containing @latin
. Before it worked just fine. Is is done for some special purpose @fabpot ?
Commit reference: 06a80fb
This is a reference code:
/**
* Asserts that the locale is valid, throws an Exception if not.
*
* @param string $locale Locale to tests
*
* @throws \InvalidArgumentException If the locale contains invalid characters
*/
private function assertValidLocale($locale)
{
if (0 !== preg_match('/[^a-z0-9_\\.\\-]+/i', $locale, $match)) {
throw new \InvalidArgumentException(sprintf('Invalid locale: %s.', $locale));
}
}