10. An apparatus, comprising at least one processor and memory, for composing a message in an online textbox using a non-Latin script, the apparatus being configured for: receiving a selection of a target language for composing the message in the online textbox; loading a hash table and an integer n that are associated with the target language, the hash table comprises a plurality of entries mapping at least one character of a first language to at least one character of the target language, the integer n comprises a maximum number of characters to add to a queue; receiving an input comprising a character of the first language; adding to the queue the received character of the first language by determining a number of characters in the queue, if the number of characters in the queue is more than n, then removing at least one character from the queue in a first-in and first-out manner and adding the received character to the end of the queue; and parsing the queue by using the hash table to map the queue to an entry in the hash table.
10. An apparatus, comprising at least one processor and memory, for composing a message in an online textbox using a non-Latin script, the apparatus being configured for: receiving a selection of a target language for composing the message in the online textbox; loading a hash table and an integer n that are associated with the target language, the hash table comprises a plurality of entries mapping at least one character of a first language to at least one character of the target language, the integer n comprises a maximum number of characters to add to a queue; receiving an input comprising a character of the first language; adding to the queue the received character of the first language by determining a number of characters in the queue, if the number of characters in the queue is more than n, then removing at least one character from the queue in a first-in and first-out manner and adding the received character to the end of the queue; and parsing the queue by using the hash table to map the queue to an entry in the hash table. 11. The apparatus of claim 10 , wherein the apparatus is further configured for: determining that the queue does not have more than n characters; and attempting to match the queue to a corresponding script in the hash table.