Created
August 20, 2013 22:08
-
-
Save intellix/6287989 to your computer and use it in GitHub Desktop.
SlmLocale.php with aliases for auto redirect to locale
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* SlmLocale Configuration | |
* | |
* If you have a ./config/autoload/ directory set up for your project, you can | |
* drop this config file in it and change the values as you wish. | |
*/ | |
$settings = array( | |
/** | |
* Default locale | |
* | |
* Some good description here. Default is something | |
* | |
* Accepted is something else | |
*/ | |
'default' => 'en', | |
/** | |
* Supported locales | |
* | |
* Some good description here. Default is something | |
* | |
* Accepted is something else | |
*/ | |
'supported' => array('en', 'sv', 'no', 'fi', 'de'), | |
/** | |
* Aliases for locales | |
* | |
* Some good description here. Default is something | |
* | |
* Accepted is something else | |
*/ | |
'aliases' => array( | |
'sv-SE' => 'sv', | |
'no-NO' => 'no', | |
'nb-NO' => 'no', | |
'fi-FI' => 'fi', | |
'de-DE' => 'de', | |
'de-AT' => 'de' | |
), | |
/** | |
* Strategies | |
* | |
* Some good description here. Default is something | |
* | |
* Accepted is something else | |
*/ | |
'strategies' => array( | |
'SlmLocale\Strategy\UriPathStrategy', | |
'SlmLocale\Strategy\HttpAcceptLanguageStrategy', | |
), | |
/** | |
* Throw exception when no locale is found | |
* | |
* Some good description here. Default is something | |
* | |
* Accepted is something else | |
*/ | |
//'throw_exception' => false, | |
/** | |
* End of SlmLocale configuration | |
*/ | |
); | |
/** | |
* You do not need to edit below this line | |
*/ | |
return array( | |
'slm_locale' => $settings | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment