Jump to content
Larry Ullman's Book Forums

Recommended Posts

Hey! Sorry, but there's really not enough information here for me to go on. Could you walk through this in more details? Which scripts are you using? What exact steps are you taking? How does it fail? What debugging steps have you tried and what were the results?

Link to comment
Share on other sites

  • 2 weeks later...

Hi,Larry,i am sorry,i did not a clear question.i want to say that when i choose a language,the username field,email field..

in the login page changes accordingly.

Do i need to create multiple independent username tables or set username table field to define? i do not understand,so what should i do?

Thank you for your help.

Link to comment
Share on other sites

  • 2 weeks later...

If you look at the book and the source code, you'll see there's a table with one row for each language and one column for each word. Translations then occur by creating records of each word in each language.

Link to comment
Share on other sites

  • 2 weeks later...

Hi,Larry,charter 17 starts,follow your steps,create table languages,create table threads,create table posts,create table users,create table words,and I added username fields,pass fields,email fields in the words table,then insert languages table,insert users table,inssert words tables,create homepage,create register page,there is no problem with this,links can be converted to different languages,just when I click on the link register page,the username fields,pass fields,email fields

,the fields language is not translated.

Thank you for your selfless help.

Link to comment
Share on other sites

To be clear, the translations work like so:

1. The user selects their preferred language from the pulldown menu.

2. This stores the preferred language ID in the session.

3. A query pulls all the keywords in the preferred language from the database using that ID.

4. Places in the PHP code then use the translated text.

 

To debug this, I would work it through in that order. First make a language selection. Then confirm the stored language ID by printing out the session value. Then run the retrieval query on the database directly using that ID. Then check the PHP where it doesn't seem to be using the translation.

Link to comment
Share on other sites

  • 1 month later...

Hi,Larry

PHP and MySQL for Dynamic Web Sites:Visual QuickPro Guide(4th Edition)is a process-oriented,PHP Advanced and Object-Oriented Programming:Visual QuickPro Guide(3rd Edition)is object-oriented,is programming oriented already mainstream programming?

Can it be mixed with object-oriented?

Do you have plans to update the contents of the object-oriented book?
Thank you.

Link to comment
Share on other sites

  • 2 weeks later...

Thanks! I don't have plans to update the PHP Advanced book right now, which means it wouldn't be updated for quite a while.

But, yes, PHP does support using object-oriented and procedural programming intermixed.

Link to comment
Share on other sites

 Share

×
×
  • Create New...