Kdyby / Translation

Integration of Symfony/Translation into Nette Framework
https://packagist.org/packages/kdyby/translation
Other
88 stars 84 forks source link

get a list of whitelisted locales in simple format #54

Open bazo opened 10 years ago

bazo commented 10 years ago

now you can get avaiable locales in format sk_SK from

    $translator->getAvailableLocales()

but for router you need

    new Route('[<locale=sk sk|en>/]<presenter>/<action>[/<id>]', 'homepage:default');

in config i have

    whitelist: [sk, de, en]

so it would make sense if i could get the list as sk, en, de instead of sk_SK, de_DE, en_EN so the values would be directly usable in route definition

fprochazka commented 10 years ago

I agree, I have in my todo to redesign how whitelisting works, so there is going to be a major improvement :)

fprochazka commented 7 years ago

I have no idea what I meant by the major improvement :confused: