Part of the EllisLab Network
   
 
other languages other than english
Posted: 25 January 2007 09:46 AM   [ Ignore ]  
Summer Student
Total Posts:  21
Joined  01-18-2007

when i try to write and hebrew text into the a controller file it show as “????????????”

edit:
also the scaffolding features gives jibrish to my langauge.
thanks.

Profile
 
 
Posted: 28 January 2007 12:58 PM   [ Ignore ]   [ # 1 ]  
Summer Student
Total Posts:  21
Joined  01-18-2007

anyone…..........................?

Profile
 
 
Posted: 28 January 2007 01:03 PM   [ Ignore ]   [ # 2 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  486
Joined  09-14-2006

I don’t have vast experience with languages other than English and Spanish, but it seems to me that your PHP files are saved in one encoding type and being served as another. Try saving them as utf-8 and use one of the following.
In your php:

header('Content-Type: text/html; charset=utf-8');


or in your html:

<meta http-equiv="content-type" content="text/html; charset=utf-8" />

 Signature 

Code Igniter 1.5.4 / CentOS 5 / PHP 5.2.3 / Apache 2.2.2 / MySQL 5.0.27

Profile
 
 
Posted: 28 January 2007 04:38 PM   [ Ignore ]   [ # 3 ]  
Research Assistant
RankRankRank
Total Posts:  915
Joined  07-10-2006

There are several forum threads about handling internationalization and localization. Thre is one solution based on gettext. I believe that Jozef Hizbrik is working on a i18n/l10n solution that does support the RTL languages. I’m not sure, but I think he is using Harry Fueck’s (harryf) replacement PHP functions for UTF-8 string handling. These were originally developed for the WACT framework.

Do forum searches for ‘internationalization’ and ‘i18n’.

Profile
 
 
Posted: 29 January 2007 01:53 AM   [ Ignore ]   [ # 4 ]  
Lab Assistant
RankRank
Total Posts:  109
Joined  05-25-2006

Sorry friends, i am no expert for RTL languages :-(
But i think my UTF-8 HOWTO should be useful for everyone using other encoding than ISO-8859-1.
If your hebrew web page can use some 8-bit encoding (probably Windows-1255 and ISO-8859-8), please use it.
You must patch CI yourself to support UTF-8 (read points 4 and 5 in UTF-8 HOWTO).

 Signature 

CI 1.5 on WAMP (W2k Pro, Apache 2, MySQL 4.1, PHP 4.4)

Profile
 
 
Posted: 09 February 2007 03:14 PM   [ Ignore ]   [ # 5 ]  
Summer Student
Total Posts:  21
Joined  01-18-2007

sorry for “jumping” the thread but i have a problame.
kinda nooby but:
how do i save a controller file as a UTF-8 I tried putting in the begining:
<? header(“Content-Type: text/html; charset=UTF-8”); ?>
but i get an error that the file needs to be saved as UTF-8…
thanks in advance.

Profile
 
 
Posted: 09 February 2007 04:38 PM   [ Ignore ]   [ # 6 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  486
Joined  09-14-2006

It depends on the editor. It’s usually in the save-as dialog, but I know I’ve seen it in other places in different editors. What editor do you use?

 Signature 

Code Igniter 1.5.4 / CentOS 5 / PHP 5.2.3 / Apache 2.2.2 / MySQL 5.0.27

Profile
 
 
Posted: 10 February 2007 10:45 AM   [ Ignore ]   [ # 7 ]  
Summer Student
Total Posts:  21
Joined  01-18-2007
joeles - 09 February 2007 04:38 PM

It depends on the editor. It’s usually in the save-as dialog, but I know I’ve seen it in other places in different editors. What editor do you use?

dreamweaver.
but i solved it with opening it with the “notepad” soft.
but again the scaffolding feature doesnt work with the UTF-8.

Profile
 
 
Posted: 12 February 2007 06:09 AM   [ Ignore ]   [ # 8 ]  
Grad Student
Rank
Total Posts:  38
Joined  08-31-2006

Hello,

The scaffolding doesn’t work at all or it shows strange characters too ?

For internationalization, to avoid problems everything should be in UTF-8, from the database to the user browser.
To do so, you should :

- add the following line in your views to tell the user browser to user UTF-8 :

<meta http-equiv="content-type" content="text/html;charset=utf-8" />

- edit your .php and .html files and save them as UTF-8 with your editor (I personnaly use Eclipse, your can change the settings for the whole project)

- create your database with the UTF-8 setting (with MySQL choose “utf8_general_ci”).

- when you access your database, force the use UTF-8 with the following command before any database query in your models

$this->db->query("SET NAMES 'utf8'");

  (i’ve been forced to do this with MySQL, maybe with other databases it’s not necessary).

Hope this helps,

Tchule.

PS : We should put a link to the wiki on the front page of this site.

Profile
 
 
Posted: 12 February 2007 07:04 AM   [ Ignore ]   [ # 9 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  486
Joined  09-14-2006

In Dreamweaver it’s under: Modify->Page Properties…

 Signature 

Code Igniter 1.5.4 / CentOS 5 / PHP 5.2.3 / Apache 2.2.2 / MySQL 5.0.27

Profile
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 719, on June 06, 2008 10:16 AM
Total Registered Members: 66413 Total Logged-in Users: 22
Total Topics: 84753 Total Anonymous Users: 1
Total Replies: 454816 Total Guests: 244
Total Posts: 539569    
Members ( View Memberlist )
Newest Members:  byrooNirCalexmuellerkizerdrixcaptainredmuffquinodligtharttechsivamDjordjesammozza