Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Displaying alternate language
Hi all, I have a small site, all in English right now, and the client wants
visitors to be able to select between English, Polish or Russian. I have the
translation text in MS Word docs. My thought was to store the text in MySQL
tables and then pull it out for display based on a session var. Seems simple
enough, I'm just having a little trouble as to how to format the text
properly.
Can anyone help - how do I get the text, with all the crazy characters, from
Word into a text field in MySQL, and then out to display on the page? Simple
URLencoding didn't work...

--
Dave -
Head Developer
http://www.blurredistinction.com
Adobe Community Expert
http://www.adobe.com/communities/experts/



Report this thread to moderator Post Follow-up to this message
Old Post
Dave Mennenoh
08-21-07 12:00 AM


Re: Displaying alternate language
On Mon, 20 Aug 2007 23:27:34 +0200, Dave Mennenoh  =

<dave@blurredistinction.com> wrote:

> Hi all, I have a small site, all in English right now, and the client =
=

> wants
> visitors to be able to select between English, Polish or Russian. I ha=
ve  =

> the
> translation text in MS Word docs. My thought was to store the text in =
=

> MySQL
> tables and then pull it out for display based on a session var. Seems =
=

> simple
> enough, I'm just having a little trouble as to how to format the text
> properly.
> Can anyone help - how do I get the text, with all the crazy characters=
,  =

> from
> Word into a text field in MySQL, and then out to display on the page? =
=

> Simple
> URLencoding didn't work...

Urlencoding is only for urls, not for content.

- Use the iconv_* function to all in UTF-8 to let PHP behave nicely.
- Set the field (or table, or database) in the database to utf-8, run "S=
ET  =

names=3D'UTF8'" once on the database connection prior to evry other quer=
y.
- Output a header (either use the default_charset setting in php.ini or =
=

output your own header()) informing the UA everything is in UTF8.
-- =

Rik Wasmus

Report this thread to moderator Post Follow-up to this message
Old Post
Rik
08-21-07 12:00 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PHP Language archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 02:59 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.