IT Community - Software Programming, Web Development and Technical Support

MySQL supports indian language character sets

This is a discussion on MySQL supports indian language character sets within the Database Support forums, part of the Web Development category; Hi techies, this article is about how to store and manipulate multi languages in mysql table. May be useful while ...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Web Development > Database Support

Register FAQ Members List Calendar Mark Forums Read
  1 links from elsewhere to this Post. Click to view. #1 (permalink)  
Old 07-10-2007, 08:35 AM
priyan priyan is offline
D-Web Sr.Programmer
 
Join Date: Mar 2007
Posts: 133
priyan is on a distinguished road
Default MySQL supports indian language character sets

Hi techies, this article is about how to store and manipulate multi languages in mysql table. May be useful while developing globalization / locale support enabled websites.

MySQL Multi language support...

By default mysql supports many european languages, Since unicode character(UTF-8) support implemented in mysql it
allows us to store many of the indian (Asian) languages.

Mysql supports Gujrathi, Hindi, Telugu and TAMIL among too many languages in the subcondinent

Let's consider TAMIL language and workout:-

To store & search tamil character sets in MySQL table, first of all we need to create a table with character set UTF-8.

CREATE TABLE multi_language
(
id INTEGER NOT NULL AUTO_INCREMENT,
language VARCHAR(30),
characters TEXT,
PRIMARY KEY(id)
) ENGINE=INNODB CHARACTER SET = utf8;


-- Inserting multi language characters in table multi_language

INSERT INTO multi_language VALUES (NULL, 'English', 'abcdefghijklmnopqsrtuvwxyz');
INSERT INTO multi_language VALUES (NULL, 'Arabic', 'ﺃ‎ﺏﺝﺩ‎ﻫﻭﺯﺡﻁﻱﻙﻝ‎ﻡﻥ');
INSERT INTO multi_language VALUES (NULL, 'Arabic', 'ﺃ‎ﺏﺝﺩ‎ﻫﻭﺯﺡﻁﻱﻙﻝ‎ﻡ ﻥ');
INSERT INTO multi_language VALUES (NULL, 'Hindi', 'ਓਊਨਣਥਨਫ');
INSERT INTO multi_language VALUES (NULL, 'Thai', 'ЁώύЂЬЫЗЪШДГЦШГЕ');
INSERT INTO multi_language VALUES (NULL, 'Thai', 'บริการหาคู่ชาวต่างชาติ หนุ่มๆนานาประเทศกำลังมองหาสาวไทย เพื่อสร้างความสัมพันธ์และแต่งงาน');
INSERT INTO multi_language VALUES (NULL, 'Japanesh', '広告掲載検索オプション 表示設定 言語ツール');
INSERT INTO multi_language VALUES (NULL, 'Chineesh', '所有网页 中国的网页');
INSERT INTO multi_language VALUES (NULL, 'Portuguese','Você pode escolher todos ou uma combinação desses serviços do');
INSERT INTO multi_language VALUES (NULL, 'Telugu', 'ని మీ హొమ్ పేజిగా అమర్చుకోండి');
INSERT INTO multi_language VALUES (NULL, 'Tamil', 'இந்தியா நாட்டின் பக்கங்கள்');
INSERT INTO multi_language VALUES (NULL, 'Arabic', 'البحث في الصفحات العربية ');
INSERT INTO multi_language VALUES (NULL, 'Korean', '시작페이지로 하세요 채용정보 광고 프로그램 정보');
INSERT INTO multi_language VALUES (NULL, 'Serbia', 'Претражи Интернет Претражи стране на језику српски ');
INSERT INTO multi_language VALUES (NULL, 'Greek', 'παγκόσμιο ιστό σελίδες στα Ελληνικά σελίδες από Ελλάδα');
INSERT INTO multi_language VALUES (NULL, 'Greek', 'Αναζήτηση');

-- Inserting tamil language character sets
INSERT INTO multi_language VALUES (NULL, 'தகவல்','தகவல், Microsoft மென்பொருள் புதுப்பித்தல் வலை தளங்கள் எவ்வாறு பயன்படுத்தப்படுகின்றன');
INSERT INTO multi_language VALUES (NULL, 'Tamil', 'பத்து நாள் கழித்து அலுவலகத்தில் நுழைந்து நாற்காலியில் உட்கார்ந்ததும், பார்க்க வேண்டிய அவசர வேலைகள் தலையை சுற்ற வைத்தன. வீட்டில் மனைவிவுடன் நடந்த வாக்குவாதம் ஞாபகம் வந்து தலைவலியை அதிகப்படுத்தியது, தலைவலி மாத்திரை கிடைக்கவில்லை. கண்ணை மூடிக் கொண்டு அப்படியே நாற்காலியில் சாய்ந்தான் ');
INSERT INTO multi_language VALUES (NULL, 'மென்பொருள்', 'இந்திய மென்பொருள் துறை கடந்த 5 ஆண்டுகளில் மிகப்பெரிய வளர்ச்சி அடைந்துள்ளது, இது இந்திய நாட்டின் பொருளாதார வளர்ச்சிக்கு மிக பெரிய தூணாக விளங்குகிறது');
INSERT INTO multi_language VALUES (NULL, 'சினிமா', 'சினிமா செய்திகள் : இந்திய சினிமா சரித்திரத்தில் அதிக பொருட்செலவில் தயாரிக்கப்பட்ட திரைப்படம் சூப்பர் ஸ்டார் ரஜினிகாந்த் நடித்த சிவாஜி இயக்குநர் ஷங்கர் இந்த திரைப்படத்தை இயக்கினார்');


-- Query the table Multi_language

SELECT * FROM multi_language WHERE characters like '%இந்திய%';

id language characters

-- ----------- --------------------------------------
10 Tamil இந்தியா நாட்டின் பக்கங்கள்

16 Tamil இந்தியா நாட்டின் பக்கங்கள்

24 மென்பொருள் இந்திய மென்பொருள் துறை கடந்த 5 ஆண்டுகளில் மிகப்பெரிய வளர்ச்சி அடைந்துள்ளது, இது இந்திய நாட்டின் பொருளாதார வளர்ச்சிக்கு மிக பெரிய தூணாக விளங்குகிறது

25 சினிமா சினிமா செய்திகள் : இந்திய சினிமா சரித்திரத்தில் அதிக பொருட்செலவில் தயாரிக்கப்பட்ட திரைப்படம் சூப்பர் ஸ்டார் ரஜினிகாந்த் நடித்த சிவாஜி இயக்குநர் ஷங்கர் இந்த திரைப்படத்தை இயக்கினார்


SELECT * FROM multi_language WHERE language = 'மென்பொருள்';
id language characters
-- ---------- --------------------------------------
24 மென்பொருள் இந்திய மென்பொருள் துறை கடந்த 5 ஆண்டுகளில் மிகப்பெரிய வளர்ச்சி அடைந்துள்ளது, இது இந்திய நாட்டின் பொருளாதார வளர்ச்சிக்கு மிக பெரிய தூணாக விளங்குகிறது



---------------------------------
Locale support for Tamil language:
---------------------------------
Beginning with MySQL 5.0.25, the locale indicated by the lc_time_names system variable controls the
language used to display day and month names and abbreviations.

Command to Change the client character set (which sends request to the server), this has to be done
so that the server can understand the request which send by Client.

-- To be executed at Client Side
SET NAMES 'utf8';
-- System Variable Name : character_set_client

-- To Set Locale time zone name
SET @@lc_time_names = 'en_US';

For Tamil language, we need to set the time zone as follows..

SET @@lc_time_names = 'ta_IN';

Now, we use select query and check out the result..
SELECT DAYNAME('2010-01-01'), MONTHNAME('2010-01-01');
Result:
DAYNAME('2010-01-01') MONTHNAME('2010-01-01')
--------------------- -----------------------
வெள்ளி ஜனவரி

SELECT DATE_FORMAT(SYSDATE(), '%d-%b-%Y');
10-ஜூலை-2007

For Telugu language, we need to set the time zone as follows..

SET @@lc_time_names = 'te_IN';
SELECT DAYNAME('2010-01-01'), MONTHNAME('2010-01-01');
Result
DAYNAME('2010-01-01') MONTHNAME('2010-01-01')
--------------------- -----------------------
శుక్రవారం జనవరి

Senoir techies can share your views this regard, so that we can able to build a better responding globalized website.
__________________
Keep smiling...
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 07-11-2007, 12:26 AM
Murali Murali is offline
D-Web Master
 
Join Date: Feb 2007
Location: India-Chennai.
Posts: 386
Murali is on a distinguished road
Send a message via AIM to Murali
Default Re: MySQL supports indian language character sets

Hi Priyan,

Wonderfull Explanation...

Storing Different Languages and Searching the words in that language itself.
Its simply great.
__________________
-Murali..
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 07-20-2007, 11:27 PM
cooolll cooolll is offline
D-Web Trainee
 
Join Date: Jul 2007
Posts: 2
cooolll is on a distinguished road
Default Re: MySQL supports indian language character sets

Hi priyan,

I am not able to retrieve the result from the table... refer the details given under.

create table lang_test (id integer not null primary key, telugu varchar(100));
insert into lang_test values (1,'శుక్రవారం జనవర');

when retrieving the result from the table, i am getting the following result ..

select * from lang_test;
-----------------
id telugu
-----------------
1 ????????? ????

can you please help me out ?
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 07-21-2007, 06:10 AM
priyan priyan is offline
D-Web Sr.Programmer
 
Join Date: Mar 2007
Posts: 133
priyan is on a distinguished road
Default Re: MySQL supports indian language character sets

Hi,

You missed out the basics that you have to specify the character set as UTF8, otherwise the system will assign the default character set of the mysql server.

create table lang_test (id integer not null primary key, telugu varchar(100));
insert into lang_test values (1,'శుక్రవారం జనవర');

change the table character set and try.
__________________
Keep smiling...
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 07-24-2007, 04:30 AM
Selena Selena is offline
D-Web Trainee
 
Join Date: Jul 2007
Location: Bangalore.
Posts: 9
Selena is on a distinguished road
Default Re: MySQL supports indian language character sets

Hi,

Its really a wonderful one to see different language characters in DB.
Me too tried this and really good one for storing all language characters to DB and searching with it.

Most Worthfull one.
__________________
Selna.
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 11-23-2007, 07:13 AM
write2ashokkumar write2ashokkumar is offline
D-Web Programmer
 
Join Date: Mar 2007
Posts: 85
write2ashokkumar is on a distinguished road
Default Re: MySQL supports indian language character sets

Hi,

What's the reason for tamil font not displayed properly in firefox whereas the same very well shown in IE ?
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 11-24-2007, 01:27 AM
priyan priyan is offline
D-Web Sr.Programmer
 
Join Date: Mar 2007
Posts: 133
priyan is on a distinguished road
Default Re: MySQL supports indian language character sets

Ashok,

It seems like tamil font that's required for FIREFOX missing, so you need to download some open type tamil fonts and try.

Refer this link and download opentype tamils fonts..
TDIL Data Centre
__________________
Keep smiling...
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 11-28-2007, 12:00 AM
write2ashokkumar write2ashokkumar is offline
D-Web Programmer
 
Join Date: Mar 2007
Posts: 85
write2ashokkumar is on a distinguished road
Default Re: MySQL supports indian language character sets

Priyan,

I have installed few open type tamil fonts but still tamil fonts not displayed properly in FIREFOX..
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 11-28-2007, 12:49 AM
priyan priyan is offline
D-Web Sr.Programmer
 
Join Date: Mar 2007
Posts: 133
priyan is on a distinguished road
Default Re: MySQL supports indian language character sets

Ashok, if you are using win-xp then check this setting

Quote:
Control Panel -> Regional and Language Option ->
Languages -> Install files for complex script and right-to-left languages (including Thai)
Enable / install this option and try.
__________________
Keep smiling...

Last edited by priyan : 11-28-2007 at 12:52 AM.
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 11-29-2007, 06:13 AM
write2ashokkumar write2ashokkumar is offline
D-Web Programmer
 
Join Date: Mar 2007
Posts: 85
write2ashokkumar is on a distinguished road
Default Re: MySQL supports indian language character sets

Yes, this works.

Quote:
Control Panel -> Regional and Language Option ->
Languages -> Install files for complex script and right-to-left languages (including Thai)
.

Have enabled this option and tamil fonts displayed properly in firefox.

thanks....
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #11 (permalink)  
Old 11-29-2007, 06:46 AM
Murali Murali is offline
D-Web Master
 
Join Date: Feb 2007
Location: India-Chennai.
Posts: 386
Murali is on a distinguished road
Send a message via AIM to Murali
Default Re: MySQL supports indian language character sets

Quote:
Originally Posted by priyan View Post
Ashok, if you are using win-xp then check this setting


Enable / install this option and try.
Hi,

But it is showing the message that some files are required for this installation CD-ROM is required.

What may be the issue here?
__________________
-Murali..
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #12 (permalink)  
Old 11-30-2007, 12:37 AM
priyan priyan is offline
D-Web Sr.Programmer
 
Join Date: Mar 2007
Posts: 133
priyan is on a distinguished road
Default Re: MySQL supports indian language character sets

Murali,

Since these options are not installed by default during XP installation, you need to install the required files and fonts using XP CD-ROM when it's required.
__________________
Keep smiling...
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #13 (permalink)  
Old 11-30-2007, 01:21 AM
priyan priyan is offline
D-Web Sr.Programmer
 
Join Date: Mar 2007
Posts: 133
priyan is on a distinguished road
Default Re: MySQL supports indian language character sets

Techies,

Can somebody tell us about how to handle currency conversion while implementing globalization in web sites ?
__________________
Keep smiling...

Last edited by priyan : 12-04-2007 at 04:00 AM.
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #14 (permalink)  
Old 12-04-2007, 04:14 AM
prasath prasath is offline
D-Web Sr.Programmer
 
Join Date: Jul 2007
Location: Chennai
Posts: 173
prasath is on a distinguished road
Smile Re: MySQL supports indian language character sets

Hi,
Currency conversion

Currency conversion, we need value of each country currency by single dollar

For example, 1 dollar=1.1141(Austrilian dollar)
1 dollar= 39.115(Indian Rupee)
The above values we can easily get through currency converter.

But, we maintain different countries currency value equal as American dollar in our reference

Note:Refer the attachement

Thanks,
Prasath.K
Attached Images
File Type: jpg Currency_conversion.jpg (60.7 KB, 4 views)
__________________
Prasath.K
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #15 (permalink)  
Old 12-05-2007, 07:39 AM
priyan priyan is offline
D-Web Sr.Programmer
 
Join Date: Mar 2007
Posts: 133
priyan is on a distinguished road
Default Re: MySQL supports indian language character sets

Prasath, thanks for you reply.

How do we maintain the country currency values since the currency values are changing day by day.
__________________
Keep smiling...
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #16 (permalink)  
Old 12-10-2007, 11:36 PM
write2ashokkumar write2ashokkumar is offline
D-Web Programmer
 
Join Date: Mar 2007
Posts: 85
write2ashokkumar is on a distinguished road
Default Re: MySQL supports indian language character sets

Quote:
Originally Posted by priyan View Post
Prasath, thanks for you reply.

How do we maintain the country currency values since the currency values are changing day by day.


Hi,

How can we use the tamil font in browser... like how to type in tamil font?

Regards,
S.Ashokkumar
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #17 (permalink)  
Old 12-12-2007, 04:40 AM
priyan priyan is offline
D-Web Sr.Programmer
 
Join Date: Mar 2007
Posts: 133
priyan is on a distinguished road
Default Re: MySQL supports indian language character sets

Hope you installed supplemental languages in your machine. Now check whether you enables this option..

Quote:
Control Panel - > Regional Language Options -> Languages.
From the Languages option, click DETAILS button and a new dialogue box will appear. Go through the Settings from new dialogue box and add Key board services for your language.

Quote:
Languages ->
Text Services and input Languages -> DETAILS
-> Settings
Here you need to
1- Add TAMIL key board service
2- Preferences -> Language Bar -> Enable "Show the language bar on the desktop".
After this change, Language bar will appear on the desktop and you can choose your desired language while browsing.
__________________
Keep smiling...
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

LinkBacks (?)
LinkBack to this Thread: http://www.discussweb.com/database-support/1557-mysql-supports-indian-language-character-sets.html
Posted By For Type Date
MySQL AB :: MySQL Forums :: Newbie :: Re: MultiLanguageSupportin MYSQL This thread Refback 07-30-2007 08:04 AM

Similar Threads
Thread Thread Starter Forum Replies Last Post
Indian Troops Used As Guinea Pigs Sabari The Lounge 1 09-10-2007 09:46 AM
environments supports simplesabita Testing Tools 1 08-22-2007 03:59 AM
How can I have two sets of links with different colors? oxygen HTML, CSS and Javascript Coding Techniques 1 07-27-2007 03:43 AM
Escape Character in MySql raj Database Support 6 07-13-2007 05:27 AM
Professional offshore outsourcing Indian companies Genevieve37 The Lounge 0 05-30-2007 10:45 PM


All times are GMT -7. The time now is 01:24 PM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.

SEO by vBSEO 3.0.0