Combining 2 PHP frameworks that both implement __() internationalization function
Posted
by
mclin
on Stack Overflow
See other posts from Stack Overflow
or by mclin
Published on 2010-12-29T06:35:50Z
Indexed on
2010/12/29
7:54 UTC
Read the original article
Hit count: 245
Never had a question I couldn't google until now, and it may be a doozy:
I have a PHP site that combines Wordpress with Kohana - Wordpress for the blog, and Kohana for the custom functionality. This is done using a Wordpress plugin that stitches them together.
This works great except they both define a __()
internationalization function, with different arguments etc. so once wordpress has overridden kohana's __()
, if kohana calls __()
it explodes.
I'm not that familiar with PHP so this might be naive, but shouldn't this stuff be namespaced? Is there anyway other than changing the source of one or the other framework to allow them to call their own respective __()
?
© Stack Overflow or respective owner