diff --git a/java/res/xml-sw600dp/rows_tamil.xml b/java/res/xml-sw600dp/rows_tamil.xml
new file mode 100644
index 0000000000000000000000000000000000000000..785e751c8d6ee35e46739415bd8da5cfce9233e8
--- /dev/null
+++ b/java/res/xml-sw600dp/rows_tamil.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2014, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<merge xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin">
+    <include latin:keyboardLayout="@xml/key_styles_common" />
+    <Row
+        latin:keyWidth="8.182%p"
+        latin:keyLabelFlags="fontNormal|autoXScale"
+    >
+        <include latin:keyboardLayout="@xml/rowkeys_tamil1" />
+        <Key
+            latin:keyStyle="deleteKeyStyle"
+            latin:keyWidth="fillRight" />
+    </Row>
+    <Row
+        latin:keyWidth="8.182%p"
+        latin:keyLabelFlags="fontNormal|autoXScale"
+    >
+        <include latin:keyboardLayout="@xml/rowkeys_tamil2" />
+        <Key
+            latin:keyStyle="enterKeyStyle"
+            latin:keyWidth="fillRight" />
+    </Row>
+    <Row
+        latin:keyWidth="8.182%p"
+        latin:keyLabelFlags="fontNormal|autoXScale"
+    >
+        <include latin:keyboardLayout="@xml/rowkeys_tamil3" />
+        <include latin:keyboardLayout="@xml/keys_exclamation_question" />
+    </Row>
+    <include latin:keyboardLayout="@xml/row_qwerty4" />
+</merge>
diff --git a/java/res/xml/kbd_tamil.xml b/java/res/xml/kbd_tamil.xml
new file mode 100644
index 0000000000000000000000000000000000000000..617e4de477e34ae6b066ec41167436ed71986eaa
--- /dev/null
+++ b/java/res/xml/kbd_tamil.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2014, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<Keyboard
+    xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
+>
+    <include
+        latin:keyboardLayout="@xml/rows_tamil" />
+</Keyboard>
diff --git a/java/res/xml/key_styles_currency.xml b/java/res/xml/key_styles_currency.xml
index f576d046524854aa4c62c5f29b1cec4315e5434c..900c9bb7a1a9160a682aae7990f5d4e312c7075d 100644
--- a/java/res/xml/key_styles_currency.xml
+++ b/java/res/xml/key_styles_currency.xml
@@ -18,15 +18,10 @@
 */
 -->
 
-<merge
-    xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin"
->
+<merge xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin">
     <switch>
-        <case
-            latin:passwordInput="true"
-        >
-            <include
-                latin:keyboardLayout="@xml/key_styles_currency_dollar" />
+        <case latin:passwordInput="true">
+            <include latin:keyboardLayout="@xml/key_styles_currency_dollar" />
         </case>
         <!-- Countries using Euro currency, 23 countries as of November 2012.
               1. Andorra (ca_AD, ca_ES)
@@ -52,11 +47,8 @@
              21. Slovenia (sl_SI)
              22. Spain (es_ES, ca_ES, eu_ES, gl_ES)
              23. Vatican City (it_VA) -->
-        <case
-            latin:countryCode="AD|AT|BE|CY|EE|FI|FR|DE|GR|IE|IT|XK|LU|MT|MO|ME|NL|PT|SM|SK|SI|ES|VA"
-        >
-            <include
-                latin:keyboardLayout="@xml/key_styles_currency_euro" />
+        <case latin:countryCode="AD|AT|BE|CY|EE|FI|FR|DE|GR|IE|IT|XK|LU|MT|MO|ME|NL|PT|SM|SK|SI|ES|VA">
+            <include latin:keyboardLayout="@xml/key_styles_currency_euro" />
         </case>
         <!-- Note: Some subtype locale may not have country code, and it it supposed to indicate the
              country where the language originally/mainly spoken. -->
@@ -76,33 +68,37 @@
              sl: Slovenia (sl_SL)
              sv: Sweden (sv_SV)
              tr: Trukey (tr_TR) -->
-        <case
-            latin:localeCode="da|de|es|el|fi|fr|it|nl|sk|sl|sv|tr"
-        >
-            <include
-                latin:keyboardLayout="@xml/key_styles_currency_euro" />
+        <case latin:localeCode="da|de|es|el|fi|fr|it|nl|sk|sl|sv|tr">
+            <include latin:keyboardLayout="@xml/key_styles_currency_euro" />
         </case>
         <!-- ca: Catalan (Andorra, Spain)
              et: Estonian (Estonia)
              lb: Luxembougish (Luxembourg)
              mt: Maltese (Malta) -->
-        <case
-            latin:languageCode="ca|et|lb|mt"
-        >
-            <include
-                latin:keyboardLayout="@xml/key_styles_currency_euro" />
+        <case latin:languageCode="ca|et|lb|mt">
+            <include latin:keyboardLayout="@xml/key_styles_currency_euro" />
         </case>
-        <!-- IN: India (Rupee) -->
-        <case
-            latin:countryCode="IN"
-        >
-            <!-- U+20B9: "₹" INDIAN RUPEE SIGN
-                 U+00A3: "£" POUND SIGN
+        <!-- fa: Persian (Rial and Afgahni)
+             hi: Hindi (Indian Rupee)
+             iw: Hebrew (New Sheqel)
+             lo: Lao (Kip)
+             mn: Mongolian (Tugrik)
+             ne: Nepali (Nepalese Rupee)
+             ta_IN: Tamil (Tamil Rupee)
+             th: Thai (Baht)
+             uk: Ukrainian (Hryvnia)
+             vi: Vietnamese (Dong)  -->
+        <!-- TODO: The currency sign of Turkish Lira was created in 2012 and assigned U+20BA for
+             its unicode, although there is no font glyph for it as of November 2012. -->
+        <!-- TODO: The currency sign of Armenian Dram was created in 2012 and assigned U+058F for
+             its unicode, although there is no font glyph for it as of September 2013. -->
+        <case latin:languageCode="fa|hi|iw|lo|mn|ne|ta|th|uk|vi">
+            <!-- U+00A3: "£" POUND SIGN
                  U+20AC: "€" EURO SIGN
                  U+00A2: "¢" CENT SIGN -->
             <key-style
                 latin:styleName="currencyKeyStyle"
-                latin:keySpec="&#x20B9;"
+                latin:keySpec="!text/keyspec_currency"
                 latin:moreKeys="!text/morekeys_currency" />
             <key-style
                 latin:styleName="moreCurrency1KeyStyle"
@@ -118,29 +114,15 @@
                 latin:styleName="moreCurrency4KeyStyle"
                 latin:keySpec="&#x00A2;" />
         </case>
-        <!-- bn: Bengali (Bangladesh Taka)
-             fa: Persian (Rial and Afgahni)
-             hi: Hindi (Indian Rupee)
-             iw: Hebrew (New Sheqel)
-             lo: Lao (Kip)
-             mn: Mongolian (Tugrik)
-             ne: Nepali (Nepalese Rupee)
-             th: Thai (Baht)
-             uk: Ukrainian (Hryvnia)
-             vi: Vietnamese (Dong)  -->
-        <!-- TODO: The currency sign of Turkish Lira was created in 2012 and assigned U+20BA for
-             its unicode, although there is no font glyph for it as of November 2012. -->
-        <!-- TODO: The currency sign of Armenian Dram was created in 2012 and assigned U+058F for
-             its unicode, although there is no font glyph for it as of September 2013. -->
-        <case
-            latin:languageCode="bn|fa|hi|iw|lo|mn|ne|th|uk|vi"
-        >
-            <!-- U+00A3: "£" POUND SIGN
+        <!-- IN: India (Rupee) -->
+        <case latin:countryCode="IN">
+            <!-- U+20B9: "₹" INDIAN RUPEE SIGN
+                 U+00A3: "£" POUND SIGN
                  U+20AC: "€" EURO SIGN
                  U+00A2: "¢" CENT SIGN -->
             <key-style
                 latin:styleName="currencyKeyStyle"
-                latin:keySpec="!text/keyspec_currency"
+                latin:keySpec="&#x20B9;"
                 latin:moreKeys="!text/morekeys_currency" />
             <key-style
                 latin:styleName="moreCurrency1KeyStyle"
@@ -157,9 +139,7 @@
                 latin:keySpec="&#x00A2;" />
         </case>
         <!-- GB: United Kingdom (Pound) -->
-        <case
-            latin:countryCode="GB"
-        >
+        <case latin:countryCode="GB">
             <!-- U+00A3: "£" POUND SIGN
                  U+20AC: "€" EURO SIGN
                  U+00A5: "Â¥" YEN SIGN
@@ -185,8 +165,7 @@
         </case>
         <!-- ar: Arabic (Dollar and Rial) -->
         <default>
-            <include
-                latin:keyboardLayout="@xml/key_styles_currency_dollar" />
+            <include latin:keyboardLayout="@xml/key_styles_currency_dollar" />
         </default>
     </switch>
 </merge>
diff --git a/java/res/xml/keyboard_layout_set_tamil.xml b/java/res/xml/keyboard_layout_set_tamil.xml
new file mode 100644
index 0000000000000000000000000000000000000000..5c0491505f2b2d7c6c7c4582f3afea0e873b6127
--- /dev/null
+++ b/java/res/xml/keyboard_layout_set_tamil.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2014, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<KeyboardLayoutSet
+    xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin">
+    <Element
+        latin:elementName="alphabet"
+        latin:elementKeyboard="@xml/kbd_tamil"
+        latin:enableProximityCharsCorrection="true" />
+    <Element
+        latin:elementName="symbols"
+        latin:elementKeyboard="@xml/kbd_symbols" />
+    <Element
+        latin:elementName="symbolsShifted"
+        latin:elementKeyboard="@xml/kbd_symbols_shift" />
+    <Element
+        latin:elementName="phone"
+        latin:elementKeyboard="@xml/kbd_phone" />
+    <Element
+        latin:elementName="phoneSymbols"
+        latin:elementKeyboard="@xml/kbd_phone_symbols" />
+    <Element
+        latin:elementName="number"
+        latin:elementKeyboard="@xml/kbd_number" />
+</KeyboardLayoutSet>
diff --git a/java/res/xml/method.xml b/java/res/xml/method.xml
index 67be24256046694f8291792acbcaae44796af300..7a6640bcc5a06d6fab56ccfc515ef83f75b83dd2 100644
--- a/java/res/xml/method.xml
+++ b/java/res/xml/method.xml
@@ -89,6 +89,7 @@
     (sr-Latn: Serbian/qwerty) # not yet implemented.
     sv: Swedish/nordic
     sw: Swahili/qwerty
+    (ta: Tamil/tamil) # This is a preliminary keyboard layout.
     th: Thai/thai
     tl: Tagalog/spanish
     tr: Turkish/qwerty
@@ -666,6 +667,16 @@
             android:imeSubtypeExtraValue="KeyboardLayoutSet=qwerty,AsciiCapable,EmojiCapable"
             android:isAsciiCapable="true"
     />
+    <!-- TODO: This tamil keyboard is a preliminary layout.
+               This isn't based on the final specification. -->
+    <subtype android:icon="@drawable/ic_ime_switcher_dark"
+            android:label="@string/subtype_generic"
+            android:subtypeId="0x67acea2a"
+            android:imeSubtypeLocale="ta_IN"
+            android:imeSubtypeMode="keyboard"
+            android:imeSubtypeExtraValue="KeyboardLayoutSet=tamil,EmojiCapable"
+            android:isAsciiCapable="false"
+    />
     <subtype android:icon="@drawable/ic_ime_switcher_dark"
             android:label="@string/subtype_generic"
             android:subtypeId="0x1f94d5d4"
diff --git a/java/res/xml/rowkeys_tamil1.xml b/java/res/xml/rowkeys_tamil1.xml
new file mode 100644
index 0000000000000000000000000000000000000000..4debd9e3e333a670b5ebba38454ac3b031b1be1b
--- /dev/null
+++ b/java/res/xml/rowkeys_tamil1.xml
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2014, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<merge xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin">
+    <!-- U+0B94: "à®”" TAMIL LETTER AU -->
+    <Key
+        latin:keySpec="&#x0B94;"
+        latin:keyHintLabel="1"
+        latin:additionalMoreKeys="1" />
+    <!-- U+0B90: "ஐ" TAMIL LETTER AI -->
+    <Key
+        latin:keySpec="&#x0B90;"
+        latin:keyHintLabel="2"
+        latin:additionalMoreKeys="2" />
+    <!-- U+0B86: "ஆ" TAMIL LETTER AA -->
+    <Key
+        latin:keySpec="&#x0B86;"
+        latin:keyHintLabel="3"
+        latin:additionalMoreKeys="3" />
+    <!-- U+0B88: "ஈ" TAMIL LETTER II -->
+    <Key
+        latin:keySpec="&#x0B88;"
+        latin:keyHintLabel="4"
+        latin:additionalMoreKeys="4" />
+    <!-- U+0B8A: "ஊ" TAMIL LETTER UU -->
+    <Key
+        latin:keySpec="&#x0B8A;"
+        latin:keyHintLabel="5"
+        latin:additionalMoreKeys="5" />
+    <!-- U+0BAE: "à®®" TAMIL LETTER MA -->
+    <Key
+        latin:keySpec="&#x0BAE;"
+        latin:keyHintLabel="6"
+        latin:additionalMoreKeys="6" />
+    <!-- U+0BA9: "ன" TAMIL LETTER NNNA -->
+    <Key
+        latin:keySpec="&#x0BA9;"
+        latin:keyHintLabel="7"
+        latin:additionalMoreKeys="7" />
+    <!-- U+0BA8: "ந" TAMIL LETTER NA -->
+    <Key
+        latin:keySpec="&#x0BA8;"
+        latin:keyHintLabel="8"
+        latin:additionalMoreKeys="8" />
+    <!-- U+0B99: "à®™" TAMIL LETTER NGA -->
+    <Key
+        latin:keySpec="&#x0B99;"
+        latin:keyHintLabel="9"
+        latin:additionalMoreKeys="9" />
+    <!-- U+0BA3: "ண" TAMIL LETTER NNA -->
+    <Key
+        latin:keySpec="&#x0BA3;"
+        latin:keyHintLabel="0"
+        latin:additionalMoreKeys="0" />
+    <!-- U+0B9E: "ஞ" TAMIL LETTER NYA -->
+    <Key latin:keySpec="&#x0B9E;" />
+</merge>
diff --git a/java/res/xml/rowkeys_tamil2.xml b/java/res/xml/rowkeys_tamil2.xml
new file mode 100644
index 0000000000000000000000000000000000000000..894825cb4534c6322d498e3d13332be7f49a2033
--- /dev/null
+++ b/java/res/xml/rowkeys_tamil2.xml
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2014, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<merge xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin">
+    <!-- U+0B93: "ஓ" TAMIL LETTER OO
+         U+0BD0: "ௐ" TAMIL OM -->
+    <Key
+        latin:keySpec="&#x0B93;"
+        latin:moreKeys="&#x0BD0;" />
+    <!-- U+0B8F: "ஏ" TAMIL LETTER EE -->
+    <Key latin:keySpec="&#x0B8F;" />
+    <!-- U+0B85: "à®…" TAMIL LETTER A
+         U+0B83: "ஃ" TAMIL SIGN VISARGA -->
+    <Key
+        latin:keySpec="&#x0B85;"
+        latin:moreKeys="&#x0B83;" />
+    <!-- U+0B87: "இ" TAMIL LETTER I -->
+    <Key latin:keySpec="&#x0B87;" />
+    <!-- U+0B89: "உ" TAMIL LETTER U -->
+    <Key latin:keySpec="&#x0B89;" />
+    <!-- U+0BB1: "à®±" TAMIL LETTER RRA -->
+    <Key latin:keySpec="&#x0BB1;" />
+    <!-- U+0BAA: "ப" TAMIL LETTER PA -->
+    <Key latin:keySpec="&#x0BAA;" />
+    <!-- U+0B95: "க" TAMIL LETTER KA
+         U+0BB9: "ஹ" TAMIL LETTER HA
+         U+0B95/U+0BCD/U+0BB7: "க்ஷ" TAMIL LETTER KA/TAMIL SIGN VIRAMA/TAMIL LETTER SSA -->
+    <Key
+        latin:keySpec="&#x0B95;"
+        latin:moreKeys="&#x0BB9;,&#x0B95;&#x0BCD;&#x0BB7;" />
+    <!-- U+0BA4: "த" TAMIL LETTER TA -->
+    <Key latin:keySpec="&#x0BA4;" />
+    <!-- U+0B9A: "ச" TAMIL LETTER CA
+         U+0BB8: "ஸ" TAMIL LETTER SA
+         U+0BB6/U+0BCD/U+0BB0/U+0BC0: "ஶ்ரீ" TAMIL LETTER SHA/TAMIL SIGN VIRAMA/TAMIL LETTER RA/TAMIL VOWEL SIGN II -->
+    <Key
+        latin:keySpec="&#x0B9A;"
+        latin:moreKeys="&#x0BB8;,&#x0BB6;&#x0BCD;&#x0BB0;&#x0BC0;" />
+    <!-- U+0B9F: "ட" TAMIL LETTER TTA -->
+    <Key latin:keySpec="&#x0B9F;" />
+</merge>
diff --git a/java/res/xml/rowkeys_tamil3.xml b/java/res/xml/rowkeys_tamil3.xml
new file mode 100644
index 0000000000000000000000000000000000000000..5386e61cfd3406172ab696b5232736ee0029c6d6
--- /dev/null
+++ b/java/res/xml/rowkeys_tamil3.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2014, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<merge xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin">
+    <!-- U+0B92: "à®’" TAMIL LETTER O -->
+    <Key latin:keySpec="&#x0B92;" />
+    <!-- U+0B8E: "எ" TAMIL LETTER E -->
+    <Key latin:keySpec="&#x0B8E;" />
+    <!-- U+0BCD: "்" TAMIL SIGN VIRAMA -->
+    <Key latin:keySpec="&#x0BCD;" />
+    <!-- U+0BB0: "à®°" TAMIL LETTER RA -->
+    <Key latin:keySpec="&#x0BB0;" />
+    <!-- U+0BB5: "வ" TAMIL LETTER VA -->
+    <Key latin:keySpec="&#x0BB5;" />
+    <!-- U+0BB4: "à®´ TAMIL LETTER LLLA -->
+    <Key latin:keySpec="&#x0BB4;" />
+    <!-- U+0BB2: "ல" TAMIL LETTER LA -->
+    <Key latin:keySpec="&#x0BB2;" />
+    <!-- U+0BB3: "ள" TAMIL LETTER LLA -->
+    <Key latin:keySpec="&#x0BB3;" />
+    <!-- U+0BAF: "ய" TAMIL LETTER YA -->
+    <Key latin:keySpec="&#x0BAF;" />
+    <!-- U+0BB7: "à®·" TAMIL LETTER SSA
+         U+0B9C: "ஜ" TAMIL LETTER JA -->
+    <Key
+        latin:keySpec="&#x0BB7;"
+        latin:moreKeys="&#x0B9C;" />
+</merge>
diff --git a/java/res/xml/rows_tamil.xml b/java/res/xml/rows_tamil.xml
new file mode 100644
index 0000000000000000000000000000000000000000..3aa2c8dc4b9333e316d9f8a6ddafdb03988e4ed1
--- /dev/null
+++ b/java/res/xml/rows_tamil.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2014, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<merge xmlns:latin="http://schemas.android.com/apk/res/com.android.inputmethod.latin">
+    <include latin:keyboardLayout="@xml/key_styles_common" />
+    <Row
+        latin:keyWidth="9.091%p"
+        latin:keyLabelFlags="fontNormal|autoXScale"
+    >
+        <include latin:keyboardLayout="@xml/rowkeys_tamil1" />
+    </Row>
+    <Row
+        latin:keyWidth="9.091%p"
+        latin:keyLabelFlags="fontNormal|autoXScale"
+    >
+        <include latin:keyboardLayout="@xml/rowkeys_tamil2" />
+    </Row>
+    <Row
+        latin:keyWidth="9.091%p"
+        latin:keyLabelFlags="fontNormal|autoXScale"
+    >
+        <include latin:keyboardLayout="@xml/rowkeys_tamil3" />
+        <Key
+            latin:keyStyle="deleteKeyStyle"
+            latin:keyWidth="fillRight" />
+    </Row>
+    <include latin:keyboardLayout="@xml/row_qwerty4" />
+</merge>
\ No newline at end of file
diff --git a/java/src/com/android/inputmethod/keyboard/internal/KeyboardTextsTable.java b/java/src/com/android/inputmethod/keyboard/internal/KeyboardTextsTable.java
index 6edc56c5583d3830b30ae66feecd4218e3e5c43c..2d063fd6762cb32ee93363288a1590d09c103ff8 100644
--- a/java/src/com/android/inputmethod/keyboard/internal/KeyboardTextsTable.java
+++ b/java/src/com/android/inputmethod/keyboard/internal/KeyboardTextsTable.java
@@ -88,7 +88,7 @@ public final class KeyboardTextsTable {
         /*   2:30 */ "morekeys_u",
         /*   3:29 */ "morekeys_e",
         /*   4:28 */ "morekeys_i",
-        /*   5:24 */ "keylabel_to_alpha",
+        /*   5:25 */ "keylabel_to_alpha",
         /*   6:23 */ "morekeys_c",
         /*   7:23 */ "double_quotes",
         /*   8:22 */ "morekeys_n",
@@ -97,7 +97,7 @@ public final class KeyboardTextsTable {
         /*  11:14 */ "morekeys_y",
         /*  12:13 */ "morekeys_d",
         /*  13:12 */ "morekeys_z",
-        /*  14:11 */ "keyspec_currency",
+        /*  14:12 */ "keyspec_currency",
         /*  15:10 */ "morekeys_t",
         /*  16:10 */ "morekeys_l",
         /*  17: 9 */ "morekeys_g",
@@ -3378,6 +3378,23 @@ public final class KeyboardTextsTable {
         /* morekeys_g */ "g\'",
     };
 
+    /* Locale ta_IN: Tamil (India) */
+    private static final String[] TEXTS_ta_IN = {
+        /* morekeys_a ~ */
+        null, null, null, null, null,
+        /* ~ morekeys_i */
+        // Label for "switch to alphabetic" key.
+        // U+0BA4: "த" TAMIL LETTER TA
+        // U+0BAE/U+0BBF: "மி" TAMIL LETTER MA/TAMIL VOWEL SIGN I
+        // U+0BB4/U+0BCD: "ழ்" TAMIL LETTER LLLA/TAMIL SIGN VIRAMA
+        /* keylabel_to_alpha */ "\u0BA4\u0BAE\u0BBF\u0BB4\u0BCD",
+        /* morekeys_c ~ */
+        null, null, null, null, null, null, null, null,
+        /* ~ morekeys_z */
+        // U+0BF9: "௹" TAMIL RUPEE SIGN
+        /* keyspec_currency */ "\u0BF9",
+    };
+
     /* Locale th: Thai */
     private static final String[] TEXTS_th = {
         /* morekeys_a ~ */
@@ -3871,6 +3888,7 @@ public final class KeyboardTextsTable {
         "sr"     , TEXTS_sr,    /*  11/ 94 Serbian */
         "sv"     , TEXTS_sv,    /*  21/ 54 Swedish */
         "sw"     , TEXTS_sw,    /*   9/ 18 Swahili */
+        "ta_IN"  , TEXTS_ta_IN, /*   2/ 15 Tamil (India) */
         "th"     , TEXTS_th,    /*   2/ 15 Thai */
         "tl"     , TEXTS_tl,    /*   7/  9 Tagalog */
         "tr"     , TEXTS_tr,    /*   7/ 18 Turkish */
diff --git a/tests/src/com/android/inputmethod/keyboard/KeyboardLayoutSetSubtypesCountTests.java b/tests/src/com/android/inputmethod/keyboard/KeyboardLayoutSetSubtypesCountTests.java
index 6ee6adbbae495dd4f4f020c5df42a059bc2701e2..67b87200f4f47b601742ab73167e754870ef7284 100644
--- a/tests/src/com/android/inputmethod/keyboard/KeyboardLayoutSetSubtypesCountTests.java
+++ b/tests/src/com/android/inputmethod/keyboard/KeyboardLayoutSetSubtypesCountTests.java
@@ -25,7 +25,7 @@ import java.util.ArrayList;
 
 @SmallTest
 public class KeyboardLayoutSetSubtypesCountTests extends KeyboardLayoutSetTestsBase {
-    private static final int NUMBER_OF_SUBTYPES = 73;
+    private static final int NUMBER_OF_SUBTYPES = 74;
     private static final int NUMBER_OF_ASCII_CAPABLE_SUBTYPES = 45;
     private static final int NUMBER_OF_PREDEFINED_ADDITIONAL_SUBTYPES = 2;
 
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/Tamil.java b/tests/src/com/android/inputmethod/keyboard/layout/Tamil.java
new file mode 100644
index 0000000000000000000000000000000000000000..792e7ea23ec68653b259c1ec90191bfac9676573
--- /dev/null
+++ b/tests/src/com/android/inputmethod/keyboard/layout/Tamil.java
@@ -0,0 +1,144 @@
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.inputmethod.keyboard.layout;
+
+import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
+import com.android.inputmethod.keyboard.layout.expected.ExpectedKeyboardBuilder;
+import com.android.inputmethod.latin.Constants;
+
+import java.util.Locale;
+
+/**
+ * The Tamil keyboard.
+ */
+public final class Tamil extends LayoutBase {
+    private static final String LAYOUT_NAME = "tamil";
+
+    public Tamil(final LayoutCustomizer customizer) {
+        super(customizer, Symbols.class, SymbolsShifted.class);
+    }
+
+    @Override
+    public String getName() { return LAYOUT_NAME; }
+
+    public static class TamilCustomizer extends LayoutCustomizer {
+        public TamilCustomizer(final Locale locale) { super(locale); }
+
+        @Override
+        public ExpectedKey getAlphabetKey() { return TAMIL_ALPHABET_KEY; }
+
+        @Override
+        public ExpectedKey getCurrencyKey() { return CURRENCY_RUPEE; }
+
+        @Override
+        public ExpectedKey[] getOtherCurrencyKeys() {
+            return SymbolsShifted.CURRENCIES_OTHER_GENERIC;
+        }
+        @Override
+        public ExpectedKey[] getLeftShiftKeys(final boolean isPhone) {
+            return EMPTY_KEYS;
+        }
+
+        // U+0BA4: "த" TAMIL LETTER TA
+        // U+0BAE/U+0BBF: "மி" TAMIL LETTER MA/TAMIL VOWEL SIGN I
+        // U+0BB4/U+0BCD: "ழ்" TAMIL LETTER LLLA/TAMIL SIGN VIRAMA
+        private static final ExpectedKey TAMIL_ALPHABET_KEY = key(
+                "\u0BA4\u0BAE\u0BBF\u0BB4\u0BCD", Constants.CODE_SWITCH_ALPHA_SYMBOL);
+
+        // U+0BF9: "௹" TAMIL RUPEE SIGN
+        private static final ExpectedKey CURRENCY_RUPEE = key("\u0BF9",
+                Symbols.CURRENCY_GENERIC_MORE_KEYS);
+    }
+
+    @Override
+    ExpectedKey[][] getCommonAlphabetLayout(boolean isPhone) { return ALPHABET_COMMON; }
+
+    @Override
+    ExpectedKey[][] getCommonAlphabetShiftLayout(boolean isPhone, final int elementId) {
+        return null;
+    }
+
+    private static final ExpectedKey[][] ALPHABET_COMMON = new ExpectedKeyboardBuilder()
+            .setKeysOfRow(1,
+                    // U+0B94: "à®”" TAMIL LETTER AU
+                    key("\u0B94", moreKey("1")),
+                    // U+0B90: "ஐ" TAMIL LETTER AI
+                    key("\u0B90", moreKey("2")),
+                    // U+0B86: "ஆ" TAMIL LETTER AA
+                    key("\u0B86", moreKey("3")),
+                    // U+0B88: "ஈ" TAMIL LETTER II
+                    key("\u0B88", moreKey("4")),
+                    // U+0B8A: "ஊ" TAMIL LETTER UU
+                    key("\u0B8A", moreKey("5")),
+                    // U+0BAE: "à®®" TAMIL LETTER MA
+                    key("\u0BAE", moreKey("6")),
+                    // U+0BA9: "ன" TAMIL LETTER NNNA
+                    key("\u0BA9", moreKey("7")),
+                    // U+0BA8: "ந" TAMIL LETTER NA
+                    key("\u0BA8", moreKey("8")),
+                    // U+0B99: "à®™" TAMIL LETTER NGA
+                    key("\u0B99", moreKey("9")),
+                    // U+0BA3: "ண" TAMIL LETTER NNA
+                    key("\u0BA3", moreKey("0")),
+                    // U+0B9E: "ஞ" TAMIL LETTER NYA
+                    "\u0B9E")
+            .setKeysOfRow(2,
+                    // U+0B93: "ஓ" TAMIL LETTER OO
+                    // U+0BD0: "ௐ" TAMIL OM
+                    key("\u0B93", moreKey("\u0BD0")),
+                    // U+0B8F: "ஏ" TAMIL LETTER EE
+                    "\u0B8F",
+                    // U+0B85: "à®…" TAMIL LETTER A
+                    // U+0B83: "ஃ" TAMIL SIGN VISARGA
+                    key("\u0B85", moreKey("\u0B83")),
+                    // U+0B87: "இ" TAMIL LETTER I
+                    // U+0B89: "உ" TAMIL LETTER U
+                    // U+0BB1: "à®±" TAMIL LETTER RRA
+                    // U+0BAA: "ப" TAMIL LETTER PA
+                    "\u0B87", "\u0B89", "\u0BB1", "\u0BAA",
+                    // U+0B95: "க" TAMIL LETTER KA
+                    // U+0BB9: "ஹ" TAMIL LETTER HA
+                    // U+0B95/U+0BCD/U+0BB7:
+                    //     "க்ஷ" TAMIL LETTER KA/TAMIL SIGN VIRAMA/TAMIL LETTER SSA
+                    key("\u0B95", joinMoreKeys("\u0BB9", "\u0B95\u0BCD\u0BB7")),
+                    // U+0BA4: "த" TAMIL LETTER TA
+                    "\u0BA4",
+                    // U+0B9A: "ச" TAMIL LETTER CA
+                    // U+0BB8: "ஸ" TAMIL LETTER SA
+                    // U+0BB6/U+0BCD/U+0BB0/U+0BC0:
+                    //     "ஶ்ரீ" TAMIL LETTER SHA/TAMIL SIGN VIRAMA/TAMIL LETTER RA
+                    //          /TAMIL VOWEL SIGN II
+                    key("\u0B9A", joinMoreKeys("\u0BB8", "\u0BB6\u0BCD\u0BB0\u0BC0")),
+                    // U+0B9F: "ட" TAMIL LETTER TTA
+                    "\u0B9F")
+            .setKeysOfRow(3,
+                    // U+0B92: "à®’" TAMIL LETTER O
+                    // U+0B8E: "எ" TAMIL LETTER E
+                    // U+0BCD: "்" TAMIL SIGN VIRAMA
+                    // U+0BB0: "à®°" TAMIL LETTER RA
+                    // U+0BB5: "வ" TAMIL LETTER VA
+                    // U+0BB4: "à®´ TAMIL LETTER LLLA
+                    // U+0BB2: "ல" TAMIL LETTER LA
+                    // U+0BB3: "ள" TAMIL LETTER LLA
+                    // U+0BAF: "ய" TAMIL LETTER YA
+                    "\u0B92", "\u0B8E", "\u0BCD", "\u0BB0", "\u0BB5", "\u0BB4", "\u0BB2", "\u0BB3",
+                    "\u0BAF",
+                    // U+0BB7: "à®·" TAMIL LETTER SSA
+                    // U+0B9C: "ஜ" TAMIL LETTER JA
+                    key("\u0BB7", moreKey("\u0B9C")))
+            .build();
+}
diff --git a/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsTamilIN.java b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsTamilIN.java
new file mode 100644
index 0000000000000000000000000000000000000000..5b3649d2b63f8eebf3036d25d20890484ef11cb1
--- /dev/null
+++ b/tests/src/com/android/inputmethod/keyboard/layout/tests/TestsTamilIN.java
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.inputmethod.keyboard.layout.tests;
+
+import android.test.suitebuilder.annotation.SmallTest;
+
+import com.android.inputmethod.keyboard.layout.LayoutBase;
+import com.android.inputmethod.keyboard.layout.Tamil;
+import com.android.inputmethod.keyboard.layout.Tamil.TamilCustomizer;
+
+import java.util.Locale;
+
+/**
+ * ta_IN: Tamil (India)/tamil
+ */
+@SmallTest
+public final class TestsTamilIN extends LayoutTestsBase {
+    private static final Locale LOCALE = new Locale("ta", "IN");
+    private static final LayoutBase LAYOUT = new Tamil(new TamilCustomizer(LOCALE));
+
+    @Override
+    LayoutBase getLayout() { return LAYOUT; }
+}
diff --git a/tools/make-keyboard-text/res/values-ta-rIN/donottranslate-more-keys.xml b/tools/make-keyboard-text/res/values-ta-rIN/donottranslate-more-keys.xml
new file mode 100644
index 0000000000000000000000000000000000000000..547c8e1322dd3502e8cd325c8426ac17969fbf40
--- /dev/null
+++ b/tools/make-keyboard-text/res/values-ta-rIN/donottranslate-more-keys.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2014, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- Label for "switch to alphabetic" key.
+         U+0BA4: "த" TAMIL LETTER TA
+         U+0BAE/U+0BBF: "மி" TAMIL LETTER MA/TAMIL VOWEL SIGN I
+         U+0BB4/U+0BCD: "ழ்" TAMIL LETTER LLLA/TAMIL SIGN VIRAMA -->
+    <string name="keylabel_to_alpha">&#x0BA4;&#x0BAE;&#x0BBF;&#x0BB4;&#x0BCD;</string>
+    <!-- U+0BF9: "௹" TAMIL RUPEE SIGN -->
+    <string name="keyspec_currency">&#x0BF9;</string>
+</resources>