what i need is to use 2 different char set in a form..
some fields in the form r needed to be filled in nepali language and some in english. i am using utf-8, cakephp.
previously i was using
textarea {font-family:nepali} in css. now i want to migrate to utf-8..
multi language problem..
Moderator: General Moderators
Re: multi language problem..
No can do. Just use UTF-8, it contains both English and Nepali characters (and any other language for that matter, including Klingon).pba wrote:2 different char set in a form..
Include the [text]<meta http-equiv='Content-Type' content='text/html; charset=utf-8'/>[/text] header in yout HTML and you should be fine.
Re: multi language problem..
thanks Applo...but my problem is.. i need to restrict users to input in a particular language. at present users can input in any language as their wish.
example:- a input field meant to be filled in nepali language can be filled in nepali or any other language.
what i need:- a input field meant to be filled in nepali can not be filled in any other language....
example:- a input field meant to be filled in nepali language can be filled in nepali or any other language.
what i need:- a input field meant to be filled in nepali can not be filled in any other language....
Re: multi language problem..
How would you detect if some text is in a particular language or not?
For example, wluod you cnsoider tihs a viald Elginsh secnente?
You could take the entered text apart character by character, and for each character verify if they're in the language's unicode range. This might work for languages that use characers unique for that language alone (such as Klingon, and Nepali too I guess, although I dunno of there exist some Birmese or Bhutanese dialect or native language of inner Mongolia which uses the same character set). Won't work for languages sharing the same alphabet, such as most western languages.
Another possibility would be dictionary heuristics, which seem quite an overkill for a simple restriction like this.
For example, wluod you cnsoider tihs a viald Elginsh secnente?
You could take the entered text apart character by character, and for each character verify if they're in the language's unicode range. This might work for languages that use characers unique for that language alone (such as Klingon, and Nepali too I guess, although I dunno of there exist some Birmese or Bhutanese dialect or native language of inner Mongolia which uses the same character set). Won't work for languages sharing the same alphabet, such as most western languages.
Another possibility would be dictionary heuristics, which seem quite an overkill for a simple restriction like this.
Re: multi language problem..
Nepali is usually written in Devanagari, which is also used for other Indic languages.Apollo wrote:This might work for languages that use characers unique for that language alone (such as Klingon, and Nepali too I guess, although I dunno of there exist some Birmese or Bhutanese dialect or native language of inner Mongolia which uses the same character set).