Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- Plugin Name: Set Locale
- Plugin URI: http://yoursite.tld
- Description: Sets the locale
- Author: Johannes Pilkahn
- Version: 1.0
- Author URI: http://tramprennen.org
- */
- function sl_current_lang() {
- $sl_uri = $_SERVER["REQUEST_URI"];
- $sl_lang = array_pop( explode( '/', $sl_uri ) );
- return $sl_lang;
- }
- function sl_set_locale() {
- if( sl_current_lang() == 'en' ) {
- define( 'WPLANG', 'en_US' );
- } else {
- define( 'WPLANG', 'el_GR' );
- }
- }
- sl_set_locale();
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement