yes... you can store html code of whole web page in a field... the type of field should be 'text' so that unlimited amount of text can be stored...
It can be very long, include javascript and css.. It still works without any problem..
yes... you can store html code of whole web page in a field... the type of field should be 'text' so that unlimited amount of text can be stored...
It can be very long, include javascript and css.. It still works without any problem..
you mean in mysql, correct ? TEXT field type need any parameter for Length/Values (in PHPmyadmin GUI DB TABLE creator) ? VARCHAR is not suited and it will return error for page code in a field ?
Yes.. In mysql....
You cannot choose 'VARCHAR' or anything other than 'TEXT'..
You don't have to specify any Length/Values for 'TEXT' but there is no harm in doing so except that it will limit the length to the number of characters you have specified.
VARCHAR is not suited because there is a limit for the number of characters a VARCHAR field can have..
Jason: that approach looks alright, but what you are stuck with then is just two languages. If you want to have three (or more) then that won't work, and if you ever later want to expand your site you will have to rewrite the code.
Of course you could just add another layer to all of it where those are the "fr" sub-array items, but starting off that way will help in the end.
Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
Unless I'm missing something, I'm pretty sure you can have an unlimited number of languages. You are stuck with one base language though.
You'd have your english=>french array file, a english=>german array file, etc, etc. Then you pass the selected language to the zend_translate object and you are good to go.
Now if someone wants to translate from any language other than english, things might get a bit more complicated.
Hmm.... true. But that requires a copy of the English phrases for every language (as opposed to a sub-array of each language for each phrase). Actually, that may work better in some cases. Still, though, you need to include a setup where you will include the correct translation page (fr_trans.php, eng_trans.php, etc) then base it on that.
As for more than one base language, no, that's not very useful. One language as a base makes the most sense. (You could, with complex code, do that anyway, just look for fr->X && ger-->X, where X is the phrase in English and thus fr==ger.)
On a more general note, the big advantage of a phrase-by-phrase system like this (or any variation) is that you are allowed to just default to the english if no french (etc) translation is available for a certain phrase. This way you can have the really important bits of information translated into a language and have the long complex text (like a "welcome" note) in English.
Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
Yeah, but that is the beauty of Zend_Translate. Once the translate object is set up, all you have to do is pass it a language, either based on the user's choice, or one you automatically determine, or a default. And that's it. The object takes care of including the right translation. And with the base language in the source, if a language somehow gets selected that you don't have a translation for, the default is used.
Exactly.
If I save html code in DATABASE field(eg german) then how I can fast change the code in a wysiwyg Editor like dreamweaver ?
Bookmarks