Version at: 06/04/2013, 14:17 vs. version at: 06/04/2013, 14:37
11# How to request a new language to be added
22
33**1)** Contact [Trang](/user/profile/TRANG) (by [email](mailto:team@tatoeba.org) or [private message](/private_messages/write/TRANG)) and indicate in the title the language(s) that you would like us to add.
44
55**IMPORTANT:** We cannot add your language if it does not have an [ISO 639-3](http://en.wikipedia.org/wiki/ISO_639-3) code. At this point we already have a lot of languages to deal with, and it's a bit too complicated to deal with languages that are not "officially" recognized.
66
77**2)** In your email, tell us what icon we can use for each requested language. It does not necessarily have to be the flag of a country. We just want a picture that people can easily associate to the language. If you don't have any specific image, give Pharamp some ideas of what she could use to represent the language (a color, a symbol, an animal). Give all the ideas you have so that we can invent a nice icon for the language. Keep in mind that our icons are only 30x20 pixels.
88
99You do not have create the icon yourself. For graphical consistency, it's better that we do it. Simply send us (or link us) an image from which we will create the icon.
1010
1111**3)** Translate 5 sentences into your language(s). Don't worry if the language detection fails. For instance it's possible that the language is detected as Hungarian, but you are not adding a sentence in Hungarian. This is not a problem. If it happens, you can click on the language icon, and select "other language" in the list that appears (it's the first option). Then later, you will be able to set the correct language once it's added in Tatoeba.
1212
1313**4)** Create a public list and name it with the name of your language. Add your 5 translations into that list. Feel free to translate more than 5 sentences, but always add them into the list, so that we can easily find them!
1414
1515**5)** Don't hesitate to ask us if you don't know how to do something!
1616
1717**IMPORTANT:** We will only add your language(s) if you have done all of this. And please forgive us if we take forever despite your going through all these steps.
18
19# Procedure for developers
20
21Source: https://www.assembla.com/spaces/tatoeba2/wiki/Adding_a_language_in_Tatoeba
22
23## In the source code
24
25app/model/sentence.php
26Add the language ISO code in the $validate array. Languages that are not part of this array are not allowed.
27
28app/controllers/components/google_language_api.php
29Add the corresponding case in the google2TatoebaCode() method, if Google supports the detection for the language. See the Language enum.
30
31app/views/helpers/languages.php
32Add the language ISO code and the name in the languagesArray() method.
33
34app/webroot/img/
35Add an icon for the new language. Dimensions 30 x 20. Format png. Modify luminosity so that it looks a bit more pale than the original and add a 1 pixel border on right and bottom (color #dcdcdc).
36
37docs/generate_sphinx_conf.php
38Add the language ISO code and name in the $languages array. Also add the ISO code in the $cjkLanguages array if the languages uses Chinese, Japanese or Korean characters.
39
40
41## In your local Tatoeba
42
43* Connect to mysql and select the database.
44* If you haven't done it yet, run the following script: docs/database/scripts/add_new_language.sql. It will create a procedure to easily add a new language and do the necessary updates in the database.
45* CALL add_new_language(iso_code, list_id, tag_name);
46* Read the comments in add_new_language.sql to have examples of the procedure.
47* Test that the language detection works (or can work) by adding a sentence with 'auto-detect'. There should be on Tatoeba a list of sentences in the language in question (named after the language in question).
48* Test that you can change the language of a sentence into the language in question.
49* Check that the count displays properly in the languages stats.
50* If it's all fine, commit and refer to the ticket #225 in your comment (=> re #225) and indicate the languages that were added.
51
52
53## On the dev
54
55* Go to the 'dev' repertory.
56* svn up
57* Connect to the mysql database of the dev version.
58* CALL add_new_language(iso_code, list_id, tag_name);
59* Test the same things you have tested in local.
60
61
62## On the prod
63
64* If everything is fine with the dev, go the the 'prod' repertory.
65* htop
66* Check that the load is below 2.
67* svn up
68* Connect to the mysql database of the prod version.
69* CALL add_new_language(iso_code, list_id, tag_name);
70* exit
71* Check that the sentences that were in the list and tags have now the appropriate icon.
72* Check that the language appears in the languages stats.
73* cp /usr/local/etc/sphinx.conf /usr/local/etc/sphinx.conf.old
74* php generate_sphinx_conf.php > /usr/local/etc/sphinx.conf
75* Change the necessary things in the new config file (user, password, database and port). Look at the old conf file for reference.
76* indexer --all --rotate & disown
77
1878
1979# Pending requests
2080
2181## Cornish
2282* Requested by: [Sisial](http://tatoeba.org/user/profile/Sisial), [Gulliver](http://tatoeba.org/user/profile/Gulliver)
2383* ISO code: cor
2484* icon: http://www.stratton-gardens.co.uk/flag.jpg
2585* list: http://tatoeba.org/sentences_lists/show/1199
2686
2787## Azerbaijani
2888* Requested by: [LanguageExpert](http://tatoeba.org/user/profile/LanguageExpert), [Imp](http://tatoeba.org/user/profile/Imp)
2989* ISO code: ?
3090* icon: http://en.wikipedia.org/wiki/File:Flag_of_Azerbaijan.svg
3191* list: 1897911, 1897912, 1897913, 499687, 499684
3292
3393## Khmer
3494* Requested by: [LanguageExpert](http://tatoeba.org/user/profile/LanguageExpert)
3595* ISO code: khm
3696* icon: http://www.senojflags.com/images/country-flag-icons/Cambodia-Flag.png
3797* list: 1897914, 1897915, 1897916, 1897917, 1897918, http://tatoeba.org/eng/sentences_lists/show/765
3898
3999## Haitian Creole
40100* Requested by: [LanguageExpert](http://tatoeba.org/user/profile/LanguageExpert)
41101* ISO code: ?
42102* icon: ?
43103* list: 1897919, 1897920, 1897921, 1897923, 1387888
44104
45105## Lao
46106* Requested by: [LanguageExpert](http://tatoeba.org/user/profile/LanguageExpert)
47107* ISO code: ?
48108* icon: ?
49109* list: 1897933, 1897940, 1897943, 1897946, 1897951
50110
51111## Sinhala
52112* Requested by: [honolulu](http://tatoeba.org/user/profile/honolulu)
53113* ISO code: sin
54114* icon: Use Sri Lankan national flag, as this is the most frequently associated icon with this language.
55115* list: ?
56116
57117## Sango
58118* Requested by: [ambroise](http://tatoeba.org/user/profile/ambroise)
59119* ISO code: sag
60120* icon: http://www.pays-monde.fr/continent-afrique-1/drapeau-national-republique-centrafricaine-41.html
61121* list: ?
62122
63123## Turkmen
64124* Requested by: [Imp](http://tatoeba.org/user/profile/Imp)
65125* ISO code: tuk
66126* icon: http://en.wikipedia.org/wiki/File:Flag_of_Turkmenistan.svg
67127* list: ?
68128
69129## Tajik
70130* Requested by: [Imp](http://tatoeba.org/user/profile/Imp)
71131* ISO code: tgk
72132* icon: http://en.wikipedia.org/wiki/File:Flag_of_Tajikistan.svg
73133* list: ?
diff view generated by jsdifflib

Version at: 06/04/2013, 14:17

# How to request a new language to be added

**1)** Contact [Trang](/user/profile/TRANG) (by [email](mailto:team@tatoeba.org) or [private message](/private_messages/write/TRANG)) and indicate in the title the language(s) that you would like us to add.

**IMPORTANT:** We cannot add your language if it does not have an [ISO 639-3](http://en.wikipedia.org/wiki/ISO_639-3) code. At this point we already have a lot of languages to deal with, and it's a bit too complicated to deal with languages that are not "officially" recognized.

**2)** In your email, tell us what icon we can use for each requested language. It does not necessarily have to be the flag of a country. We just want a picture that people can easily associate to the language. If you don't have any specific image, give Pharamp some ideas of what she could use to represent the language (a color, a symbol, an animal). Give all the ideas you have so that we can invent a nice icon for the language. Keep in mind that our icons are only 30x20 pixels.

You do not have create the icon yourself. For graphical consistency, it's better that we do it. Simply send us (or link us) an image from which we will create the icon.

**3)** Translate 5 sentences into your language(s). Don't worry if the language detection fails. For instance it's possible that the language is detected as Hungarian, but you are not adding a sentence in Hungarian. This is not a problem. If it happens, you can click on the language icon, and select "other language" in the list that appears (it's the first option). Then later, you will be able to set the correct language once it's added in Tatoeba.

**4)** Create a public list and name it with the name of your language. Add your 5 translations into that list. Feel free to translate more than 5 sentences, but always add them into the list, so that we can easily find them!

**5)** Don't hesitate to ask us if you don't know how to do something!

**IMPORTANT:** We will only add your language(s) if you have done all of this. And please forgive us if we take forever despite your going through all these steps.

# Pending requests

## Cornish
* Requested by: [Sisial](http://tatoeba.org/user/profile/Sisial), [Gulliver](http://tatoeba.org/user/profile/Gulliver)
* ISO code: cor
* icon: http://www.stratton-gardens.co.uk/flag.jpg
* list: http://tatoeba.org/sentences_lists/show/1199

## Azerbaijani
* Requested by: [LanguageExpert](http://tatoeba.org/user/profile/LanguageExpert), [Imp](http://tatoeba.org/user/profile/Imp)
* ISO code: ?
* icon: http://en.wikipedia.org/wiki/File:Flag_of_Azerbaijan.svg
* list: 1897911, 1897912, 1897913, 499687, 499684

## Khmer
* Requested by: [LanguageExpert](http://tatoeba.org/user/profile/LanguageExpert)
* ISO code: khm
* icon: http://www.senojflags.com/images/country-flag-icons/Cambodia-Flag.png
* list: 1897914, 1897915, 1897916, 1897917, 1897918, http://tatoeba.org/eng/sentences_lists/show/765

## Haitian Creole
* Requested by: [LanguageExpert](http://tatoeba.org/user/profile/LanguageExpert)
* ISO code: ?
* icon: ?
* list: 1897919, 1897920, 1897921, 1897923, 1387888

## Lao
* Requested by: [LanguageExpert](http://tatoeba.org/user/profile/LanguageExpert)
* ISO code: ?
* icon: ?
* list: 1897933, 1897940, 1897943, 1897946, 1897951

## Sinhala
* Requested by: [honolulu](http://tatoeba.org/user/profile/honolulu)
* ISO code: sin
* icon: Use Sri Lankan national flag, as this is the most frequently associated icon with this language.
* list: ?

## Sango
* Requested by: [ambroise](http://tatoeba.org/user/profile/ambroise)
* ISO code: sag
* icon: http://www.pays-monde.fr/continent-afrique-1/drapeau-national-republique-centrafricaine-41.html
* list: ?

## Turkmen 
* Requested by: [Imp](http://tatoeba.org/user/profile/Imp)
* ISO code: tuk
* icon: http://en.wikipedia.org/wiki/File:Flag_of_Turkmenistan.svg
* list: ?

## Tajik
* Requested by: [Imp](http://tatoeba.org/user/profile/Imp)
* ISO code: tgk
* icon: http://en.wikipedia.org/wiki/File:Flag_of_Tajikistan.svg
* list: ?

version at: 06/04/2013, 14:37

# How to request a new language to be added

**1)** Contact [Trang](/user/profile/TRANG) (by [email](mailto:team@tatoeba.org) or [private message](/private_messages/write/TRANG)) and indicate in the title the language(s) that you would like us to add.

**IMPORTANT:** We cannot add your language if it does not have an [ISO 639-3](http://en.wikipedia.org/wiki/ISO_639-3) code. At this point we already have a lot of languages to deal with, and it's a bit too complicated to deal with languages that are not "officially" recognized.

**2)** In your email, tell us what icon we can use for each requested language. It does not necessarily have to be the flag of a country. We just want a picture that people can easily associate to the language. If you don't have any specific image, give Pharamp some ideas of what she could use to represent the language (a color, a symbol, an animal). Give all the ideas you have so that we can invent a nice icon for the language. Keep in mind that our icons are only 30x20 pixels.

You do not have create the icon yourself. For graphical consistency, it's better that we do it. Simply send us (or link us) an image from which we will create the icon.

**3)** Translate 5 sentences into your language(s). Don't worry if the language detection fails. For instance it's possible that the language is detected as Hungarian, but you are not adding a sentence in Hungarian. This is not a problem. If it happens, you can click on the language icon, and select "other language" in the list that appears (it's the first option). Then later, you will be able to set the correct language once it's added in Tatoeba.

**4)** Create a public list and name it with the name of your language. Add your 5 translations into that list. Feel free to translate more than 5 sentences, but always add them into the list, so that we can easily find them!

**5)** Don't hesitate to ask us if you don't know how to do something!

**IMPORTANT:** We will only add your language(s) if you have done all of this. And please forgive us if we take forever despite your going through all these steps.

# Procedure for developers

Source: https://www.assembla.com/spaces/tatoeba2/wiki/Adding_a_language_in_Tatoeba

## In the source code

app/model/sentence.php
Add the language ISO code in the $validate array. Languages that are not part of this array are not allowed.

app/controllers/components/google_language_api.php
Add the corresponding case in the google2TatoebaCode() method, if Google supports the detection for the language. See the Language enum.

app/views/helpers/languages.php
Add the language ISO code and the name in the languagesArray() method.

app/webroot/img/
Add an icon for the new language. Dimensions 30 x 20. Format png. Modify luminosity so that it looks a bit more pale than the original and add a 1 pixel border on right and bottom (color #dcdcdc).

docs/generate_sphinx_conf.php
Add the language ISO code and name in the $languages array. Also add the ISO code in the $cjkLanguages array if the languages uses Chinese, Japanese or Korean characters.

 
## In your local Tatoeba

* Connect to mysql and select the database.
* If you haven't done it yet, run the following script: docs/database/scripts/add_new_language.sql. It will create a procedure to easily add a new language and do the necessary updates in the database.
* CALL add_new_language(iso_code, list_id, tag_name);
* Read the comments in add_new_language.sql to have examples of the procedure.
* Test that the language detection works (or can work) by adding a sentence with 'auto-detect'. There should be on Tatoeba a list of sentences in the language in question (named after the language in question).
* Test that you can change the language of a sentence into the language in question.
* Check that the count displays properly in the languages stats.
* If it's all fine, commit and refer to the ticket #225 in your comment (=> re #225) and indicate the languages that were added.

 
## On the dev

* Go to the 'dev' repertory.
* svn up
* Connect to the mysql database of the dev version.
* CALL add_new_language(iso_code, list_id, tag_name);
* Test the same things you have tested in local. 

 
## On the prod

* If everything is fine with the dev, go the the 'prod' repertory.
* htop
* Check that the load is below 2.
* svn up
* Connect to the mysql database of the prod version.
* CALL add_new_language(iso_code, list_id, tag_name);
* exit
* Check that the sentences that were in the list and tags have now the appropriate icon.
* Check that the language appears in the languages stats.
* cp /usr/local/etc/sphinx.conf /usr/local/etc/sphinx.conf.old
* php generate_sphinx_conf.php > /usr/local/etc/sphinx.conf
* Change the necessary things in the new config file (user, password, database and port). Look at the old conf file for reference.
* indexer --all --rotate & disown


# Pending requests

## Cornish
* Requested by: [Sisial](http://tatoeba.org/user/profile/Sisial), [Gulliver](http://tatoeba.org/user/profile/Gulliver)
* ISO code: cor
* icon: http://www.stratton-gardens.co.uk/flag.jpg
* list: http://tatoeba.org/sentences_lists/show/1199

## Azerbaijani
* Requested by: [LanguageExpert](http://tatoeba.org/user/profile/LanguageExpert), [Imp](http://tatoeba.org/user/profile/Imp)
* ISO code: ?
* icon: http://en.wikipedia.org/wiki/File:Flag_of_Azerbaijan.svg
* list: 1897911, 1897912, 1897913, 499687, 499684

## Khmer
* Requested by: [LanguageExpert](http://tatoeba.org/user/profile/LanguageExpert)
* ISO code: khm
* icon: http://www.senojflags.com/images/country-flag-icons/Cambodia-Flag.png
* list: 1897914, 1897915, 1897916, 1897917, 1897918, http://tatoeba.org/eng/sentences_lists/show/765

## Haitian Creole
* Requested by: [LanguageExpert](http://tatoeba.org/user/profile/LanguageExpert)
* ISO code: ?
* icon: ?
* list: 1897919, 1897920, 1897921, 1897923, 1387888

## Lao
* Requested by: [LanguageExpert](http://tatoeba.org/user/profile/LanguageExpert)
* ISO code: ?
* icon: ?
* list: 1897933, 1897940, 1897943, 1897946, 1897951

## Sinhala
* Requested by: [honolulu](http://tatoeba.org/user/profile/honolulu)
* ISO code: sin
* icon: Use Sri Lankan national flag, as this is the most frequently associated icon with this language.
* list: ?

## Sango
* Requested by: [ambroise](http://tatoeba.org/user/profile/ambroise)
* ISO code: sag
* icon: http://www.pays-monde.fr/continent-afrique-1/drapeau-national-republique-centrafricaine-41.html
* list: ?

## Turkmen 
* Requested by: [Imp](http://tatoeba.org/user/profile/Imp)
* ISO code: tuk
* icon: http://en.wikipedia.org/wiki/File:Flag_of_Turkmenistan.svg
* list: ?

## Tajik
* Requested by: [Imp](http://tatoeba.org/user/profile/Imp)
* ISO code: tgk
* icon: http://en.wikipedia.org/wiki/File:Flag_of_Tajikistan.svg
* list: ?

Note

The lines in green are the lines that have been added in the new version. The lines in red are those that have been removed.