Click here to Skip to main content
15,882,055 members
Articles / Programming Languages / Javascript
Article

write Turkish with a QWERTY Keyboard and without any special switching

Rate me:
Please Sign up or sign in to vote.
4.52/5 (8 votes)
15 Aug 2006CPOL1 min read 71K   370   5   3
This code is a very easy way to allow people to write in Turkish in their website without expecting the user to change any special keyboard switching or pressing external buttons.

Introduction

There are generally two ways to be able to write in Turkish visiting a website:

  • use Turkish Keyboard layout;
  • website provides external buttons to represent some six letters that do not exist in a typical QWERTY English keyboard.

I would like to present to the Internet community a third method of writing Turkish that neither expects a special keyboard switching, nor peripheral buttons that hinder the flow of writing Turkish on a website.

Turkish Letters That Are Not In English

There are different Turkish letters not included in English depending on the case. For capital letters the sequence goes like this:

Sample screenshot

and small-case letters:

Sample screenshot

Letters that are not in a typical QWERY keyboard should be easily evident. The S with the cedilla, or the g with the breve accent are all subtle differences between Turkish and English.

A Simple Solution

In regular writing it is certainly common to have a space after a punctuation mark, such as the period, or the command, or the colon, etc. If there is not a space after such punctuation marks and one of the letters in QWERTY but not exactly in Turkish could mean a letter we need. For example, if we type "Buras.i Mu,stur" then the software can immediately replace the ".i" combination with the dotless-i letter that is in Turkish but not English. The Javascript code attached to this article precisely does this.

The following QWERTY sequences translates to the following Turkish letters:

Sample screenshot

and

Sample screenshot

 

There is really only one special case for the small-case letters and that's the dotless-i:

Sample screenshot

Please remember that there is no space in between the punctuation mark and the letter that follows it in order to display the mapped Turkish letter.

 

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
GeneralMy vote of 4 Pin
Burak Tunçbilek11-Aug-12 3:56
Burak Tunçbilek11-Aug-12 3:56 
GeneralMy vote of 5 Pin
zuheyr9-Aug-10 5:21
zuheyr9-Aug-10 5:21 
GeneralAnother way Pin
Jean-Louis Guenego14-Feb-07 1:07
Jean-Louis Guenego14-Feb-07 1:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.