WordPress setup one language for admin and the other for theme
Here is one quick tip, if you want to have one language for WordPress admin and the other language for theme, just add this to your theme functions.php
file:
// setup one language for admin and the other for theme // must be called before load_theme_textdomain() function set_my_locale($locale) { $locale = ( is_admin() ) ? "en_US" : "sr_RS"; setlocale(LC_ALL, $locale ); return $locale; } add_filter( 'locale', 'set_my_locale' ); |
First language is for admin area, and second one is for theme and entire WordPress front end.
This must be called before: load_theme_textdomain()
If you have problems with plugins translation, check out function: load_plugin_textdomain()
Leave a Reply