Its about maintainability. Is "learn about our website" the only thing you ever want to echo? Will it always be only in english? Might you want to echo it other places, or use it in different circumstances? Try to think of instances where you might want to make a change that causes you to have to go and search through the code for a million different echoes spread all over the place. The 'extra code' is insurance aga…
Yes yes yes! I can't emphasize this enough. My biggest regret in 10 years of building cdbaby.com was that when I wanted to make it multi-lingual, 7 years into it, I was screwed! All of the language was spread around so many little print/echo statements in 10,000 different places. With each one I had thought, "Oh it's just a little one shot deal." But after a few years, guess what you have thousands of? Do it their wa…
Hey PHP guys... OOP question
11–14 of 14 posts
Re: Hey PHP guys... OOP question
#12I tried Cake, Symphony, and Zend Framework - they are all quite strong but Cake and Symphony make you build your app 'their way', Zend Framework is looser than the others (more a collection of libraries) but is bloated, slow, and over-engineered.
My opinion is biased because I am a core developer.
Kohana's i18n system is pretty intuitive too. http://www.kohanaphp.com
Re: Hey PHP guys... OOP question
#13You should use the latter but pass it through the __() function. Read the docs on I internationalisation. There is a pretty standard way of translating text in cake
Re: Hey PHP guys... OOP question
#14Its about maintainability. Is "learn about our website" the only thing you ever want to echo? Will it always be only in english? Might you want to echo it other places, or use it in different circumstances? Try to think of instances where you might want to make a change that causes you to have to go and search through the code for a million different echoes spread all over the place. The 'extra code' is insurance aga…
Yes yes yes! I can't emphasize this enough. My biggest regret in 10 years of building cdbaby.com was that when I wanted to make it multi-lingual, 7 years into it, I was screwed! All of the language was spread around so many little print/echo statements in 10,000 different places. With each one I had thought, "Oh it's just a little one shot deal." But after a few years, guess what you have thousands of? Do it their wa…
Not a flame, just a serious thought: from what I remember the RoR was worked on for a year or more - did it take longer than that to implement internationalization?