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 ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| |||
| 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... |
| Sponsored Links |
| |||
| Hi Priyan, Wonderfull Explanation... Storing Different Languages and Searching the words in that language itself. Its simply great.
__________________ -Murali.. |
| |||
| 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 ? |
| |||
| 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... |
| |||
| 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. |
| |||
| 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... |
| |||
| Ashok, if you are using win-xp then check this setting Quote:
__________________ Keep smiling... Last edited by priyan : 11-28-2007 at 12:52 AM. |
| |||
| Yes, this works. Quote:
Have enabled this option and tamil fonts displayed properly in firefox. thanks.... |
| |||
| Quote:
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.. |
| |||
| 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... |
| |||
| 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. |
| |||
| 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
__________________ Prasath.K |
| |||
| Prasath, thanks for you reply. How do we maintain the country currency values since the currency values are changing day by day.
__________________ Keep smiling... |
| |||
| Quote:
Hi, How can we use the tamil font in browser... like how to type in tamil font? Regards, S.Ashokkumar |
| |||
| Hope you installed supplemental languages in your machine. Now check whether you enables this option.. Quote:
Quote:
__________________ Keep smiling... |
![]() |
| Thread Tools | |
| Display Modes | |
| |
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 |