logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Help on configuring multilingual web server
Author
makapacs



Joined: 31 May 2008
Posts: 3

PostPosted: Sat 31 May '08 21:00    Post subject: Help on configuring multilingual web server Reply with quote

Hi,

I am latvian and I have developed website in English and Latvian languages.
I am running my website on apache 2.0.58 with PHP 5.1.6

I looked around & found some info about content negotiation as solution to have multilingual language website.(http://vancouver-webpages.com/multilingual/howto.html & others)

I am thinking to use type map file and multiviews concept. So, I have done following steps"

Step 1: I have added "AddLanguage lv .lv" entry in httpd.conf file where lv is code for latvian language

Step 2: I have created .htaccess file in my website directory "latviesuWeb" with content:
AddHandler type-map var
Options +MultiViews
DirectoryIndex index.php

Step 3: I have created index.var file in website directory "latviesuWeb" with content:
URI: index.php; vary="type,language"
URI: index.php?lang=lv
Content-type: application/php;
Content-language: lv
URI: index.php?lang=en
Content-type: application/php;
Content-language: en

Step4. Restart Apache web server

Now, when I link http://localhost/latviesuWeb/index.php?lang=lv, the latvian letters come up unreadable form.
Here is the beginning of the html file in index.php:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="lv" lang="lv">
<head lang="lv">
<title>Anita un Margota Ka-zas</title>
<meta http-equiv="content-type" content="text/html;charset=ISO-8859-1" />
<meta http-equiv="content-language" content="lv,en">
<meta description="Anitas un Margota Ka-zas">
<meta keywords="preca-s Anita Jurevica un Margots Kapacs 8 augusta- Saldu- 2008 gada-">
<meta http-equiv="Content-Style-Type" content="text/css" />

Any idea on how to make latvian letters come up in readable form? am i making the right changes & configurations?

Thank you,

Margots
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7373
Location: Germany, Next to Hamburg

PostPosted: Mon 02 Jun '08 20:03    Post subject: Reply with quote

I don't know "latvian". Which countery is that?

Are you sure that ISO-8859-1 which is for Western European languages have all your letters? Are all letters unreadable or just a few?
Did you try to save your files in UTF-8? And use UTF-8 as content-type? Which browsers did you try?
Back to top
makapacs



Joined: 31 May 2008
Posts: 3

PostPosted: Tue 03 Jun '08 2:36    Post subject: Reply with quote

thanks for replay

Latvian language is native language in Latvia or in German language this country is called somewhat like Latland.

If you look in the header posted by me above you will see that the charset is set to ISO-8859-1. I have also tried UTF-8, but still some letters does not display. I don't think that the problem is in charset in the html, because i looked into some Latvian language websites (View->Page Source) and they were using charset UTF-8 and all Latvian letters are displaying correctly. That's makes me think that there is some configuration done at web server side.

I am using Firefox browser 2.0.0.14 and I just tested IE7. It is the same result - some letters are not being displayed correctly.

Any other ideas?

Thank You.
Back to top
makapacs



Joined: 31 May 2008
Posts: 3

PostPosted: Tue 03 Jun '08 3:02    Post subject: Reply with quote

I looked more on other lativan letter websites(view-page source) and I found charset windows-1257 that is displaying all letters properly.

Still, no idea how many other latvian letter websites that are using charset utf-8 can display latvian letters properly?

Thank You
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7373
Location: Germany, Next to Hamburg

PostPosted: Tue 03 Jun '08 11:16    Post subject: Reply with quote

You may try HTML special chars for non standart letter? like รค becomes &auml;

http://unicode.e-workers.de/entities.php Maybe that helps you.
Back to top


Reply to topic   Topic: Help on configuring multilingual web server View previous topic :: View next topic
Post new topic   Forum Index -> Apache