I’m sorry the problem doesn’t affect only 404 page.
Here’s how it is – I use 2 languages for my page
English and Lithuanian, I need admin page to be in my language(Lithuanian), I set
define('WPLANG', 'lt_LT');
so far so good, but I need my archive, 404, and some others pages to be in 2 languages:
domain/en/non-existing-page – should generate 404 page in English,
domain/lt/non-existing-page – should generate 404 page in Lithuanian.
wp_title() function generates _e(‘Page not found’); and thus it’s translated in account of define('WPLANG', 'lt_LT');
, it ignores /en/,/lt/ language codes and translates string according to defined language. And it happens anywhere a string is translated without theme text-domain. I can work around this problem, by adding needed strings to themes localization, and then translating string using themes text domain, e.g. _e('Page not found', 'theme-text-domain');
So in short
_e('Page not found', 'theme-text-domain');
will translate string depending from language code /en/,/lt/
_e(‘Page not found’); will translate string depending from defined language define('WPLANG', 'lang_LANG');
Now the question is, if it’s really a bug, or it is just the way it works?