[wp-hackers] Locale woes

Jamie Talbot wphackers at jamietalbot.com
Fri Feb 3 09:06:20 GMT 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jamie Talbot wrote:
> Fatal error: Cannot instantiate non-existent class: cachedfilereader in
> /path/to/wp/wp-includes/wp-l10n.php on line 67
> 
> That's this line:
> 
> $input = new CachedFileReader($mofile);
> 
> where $mofile is the locale that my filter returns.
> 
> This error only occurs if $this->my_locale matches an existant .mo file, which is not defined as
> WPLANG.  Setting it to 'de_DE', for example, if that language pack is not installed, causes no
> error.  Of course, because no 'de_DE' language pack is installed, it's pretty pointless.  If I have
> the language pack 'ja_JP' and my filter returns 'ja_JP', if WPLANG is defined as 'ja_JP' then all is
> well.  If WPLANG is defined as something else, I get that error.
> 

The solution after all is pretty simple, I think.  streams.php is not being included if WPLANG is
set to '', so as long as it is set to something in wp-config.php, there isn't a problem.

I know you were worried, but you can all relax now :)

Jamie.

- --
http://jamietalbot.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFD4x0LrovxfShShFARAh13AJ9kpwQDwr//e2gyLXQR6ZqYOnvcOwCgh0FR
qCzDzwSSOdS8AkrxfklobUw=
=B+EZ
-----END PGP SIGNATURE-----


More information about the wp-hackers mailing list