Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- Plugin Name: FR or EN ?
- Plugin URI: http://yourls.org/
- Description: Load FR or EN depending on something
- Version: 0.1
- Author: Ozh
- Author URI: http://ozh.org/
- */
- // Hook into 'get_locale' filter
- yourls_add_filter( 'get_locale', 'fr_or_en_select' );
- // Return 'fr_FR' or 'en_US' depending on something
- function fr_or_en_select() {
- // test something here
- if( ...?.... ) {
- $locale = 'fr_FR';
- } else {
- $locale = 'en_US';
- }
- return $locale;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement