I think I'll lose my hair over this...
Here's my situation:
- I have a WP MU running on my server
- I have several sites in english
Now I want to add a blog in a different language under the same WP install, which will be using a twentyfourteen child theme, but I want everything else to stay in english.
I downloaded both the global WP and 2014 translations. I've tried to put one or both of these into my functions.php:
add_action('after_setup_theme', 'my_theme_setup');
function my_theme_setup(){
load_theme_textdomain( 'nwnsablog', get_template_directory() . '/languages');
}
add_filter( 'locale', 'my_theme_localized' );
function my_theme_localized( $locale )
{
return 'sk_SK';
}
I put these files: sk_SK.mo, sk_SK.po, [themename]-sk_SK.po, [themename]-sk_SK.mo
into the languages
folder in my theme root. I also put the first two into the languages
folder inside wp-content
.
At this point, it's still all in english. If I change the define('WPLANG', 'sk_SK');
line in wp-config, most of the strings are translated, but it also translates them outside the theme, which I don't want.
I could get to a point where a different part of strings was translated (I'm guessing they were theme specific), but I can't reproduce that. Anyway, it wouldn't be very useful, as it's only a halfway translation.
Anyone can help?