|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
You don't need a fax machine to get faxes. Get a fax-to-email fax number from CallWave. Try it free.
|
|
#1
|
|||
|
|||
|
Texts
Hi there,
I just wanted to have input on your take considering texts in a PHP application (or any web application for that matter). I have a basic OO PHP application, where I have texts in: - The php files that are presented. - The methods contain texts - Standard data originating from the database (such as country names, type information). Now What I would like to do is to have all standard texts Data Driven. Although I am currently planning a system, your take on this would be quite welcome. Best regards: Lilithian |
|
#2
|
||||
|
||||
|
your use of "text" is unfamiliar to me - please clarify.
__________________
life is a game.... Have fun ----------------------------- http://www.phpwomen.org strength in unity PHPCommunity IRC #phpc on freenode |
|
#3
|
|||
|
|||
|
tests
Quote:
All text that is presented to the user. Any linguistic information, such as sentences, words etc. I am not sure that I can be more percise than this. |
|
#4
|
||||
|
||||
|
Ahh - strings. I personally do not like output scattered all through my code. to me it sloppier and doesn't lend the code to reuse so I use templates to help separate my business logic from my display logic.
There are a number of templating systems out there - smarty and savant for example - but I tend to just use PHP itself as my templating engine. Yes it requires me to be much more disciplined in my coding to keep things clean - but I hate having to code in one lang and then use another for the template. |
|
#5
|
|||
|
|||
|
Noted
I'll take a look at these things, but its not the presentation that is my problem, its the storage.
I want to put all texts in the database. For example one method is to store a text_id (corresponding to a line in a dedicated database table ) everywhere where texts are to be presented. And every time you get to a page you make a select on the texts table in order to retrieve the texts you want to present. Now I am looking for a more structured approach to text storage, and retrieval, than just storing text snippet identities in the code. But thanks just the same |
|
#6
|
||||
|
||||
|
Is this for I18n purposes? have you looked at gettext?
|
|
#7
|
|||
|
|||
|
hmmm
Quote:
I18n? Looked at it, and it sounds promising. Yes my application is intended to work independent of the location. I'll see how they propose storing the texts. |
|
#8
|
||||
|
||||
|
I18n == "Internationalization"
"I" - then 18 letters then an "n" |
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Programming Theory > Texts |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|
|