summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--settings/languageCodes.php147
-rw-r--r--settings/personal.php11
-rw-r--r--settings/templates/personal.php2
3 files changed, 156 insertions, 4 deletions
diff --git a/settings/languageCodes.php b/settings/languageCodes.php
new file mode 100644
index 00000000000..6e15b58aa7a
--- /dev/null
+++ b/settings/languageCodes.php
@@ -0,0 +1,147 @@
+<?php return array(
+'ab'=>'Abkhazian',
+'aa'=>'Afar',
+'af'=>'Afrikaans',
+'sq'=>'Albanian',
+'am'=>'Amharic',
+'ar'=>'Arabic',
+'hy'=>'Armenian',
+'as'=>'Assamese',
+'ay'=>'Aymara',
+'az'=>'Azerbaijani',
+'ba'=>'Bashkir',
+'eu'=>'Basque',
+'bn'=>'Bengali (Bangla)',
+'dz'=>'Bhutani',
+'bh'=>'Bihari',
+'bi'=>'Bislama',
+'br'=>'Breton',
+'bg'=>'Bulgarian',
+'my'=>'Burmese',
+'be'=>'Byelorussian (Belarusian)',
+'km'=>'Cambodian',
+'ca'=>'Catalan',
+'zh'=>'Chinese (Simplified)',
+'zh'=>'Chinese (Traditional)',
+'co'=>'Corsican',
+'hr'=>'Croatian',
+'cs'=>'Czech',
+'da'=>'Danish',
+'nl'=>'Dutch',
+'en'=>'English',
+'eo'=>'Esperanto',
+'et'=>'Estonian',
+'fo'=>'Faeroese',
+'fa'=>'Farsi',
+'fj'=>'Fiji',
+'fi'=>'Finnish',
+'nl-be'=>'Flemish',
+'fr'=>'French',
+'fy'=>'Frisian',
+'gl'=>'Galician',
+'gd'=>'Gaelic (Scottish)',
+'gv'=>'Gaelic (Manx)',
+'ka'=>'Georgian',
+'de'=>'German',
+'el'=>'Greek',
+'kl'=>'Greenlandic',
+'gn'=>'Guarani',
+'gu'=>'Gujarati',
+'ha'=>'Hausa',
+'he'=>'Hebrew',
+'iw'=>'Hebrew',
+'hi'=>'Hindi',
+'hu'=>'Hungarian',
+'is'=>'Icelandic',
+'id'=>'Indonesian',
+'in'=>'Indonesian',
+'ia'=>'Interlingua',
+'ie'=>'Interlingue',
+'iu'=>'Inuktitut',
+'ik'=>'Inupiak',
+'ga'=>'Irish',
+'it'=>'Italian',
+'ja'=>'Japanese',
+'jv'=>'Javanese',
+'kn'=>'Kannada',
+'ks'=>'Kashmiri',
+'kk'=>'Kazakh',
+'rw'=>'Kinyarwanda (Ruanda)',
+'ky'=>'Kirghiz',
+'rn'=>'Kirundi (Rundi)',
+'ko'=>'Korean',
+'ku'=>'Kurdish',
+'lo'=>'Laothian',
+'la'=>'Latin',
+'lv'=>'Latvian (Lettish)',
+'li'=>'Limburgish ( Limburger)',
+'ln'=>'Lingala',
+'lt'=>'Lithuanian',
+'mk'=>'Macedonian',
+'mg'=>'Malagasy',
+'ms'=>'Malay',
+'ml'=>'Malayalam',
+'mt'=>'Maltese',
+'mi'=>'Maori',
+'mr'=>'Marathi',
+'mo'=>'Moldavian',
+'mn'=>'Mongolian',
+'na'=>'Nauru',
+'ne'=>'Nepali',
+'no'=>'Norwegian',
+'oc'=>'Occitan',
+'or'=>'Oriya',
+'om'=>'Oromo (Afan, Galla)',
+'ps'=>'Pashto (Pushto)',
+'pl'=>'Polish',
+'pt'=>'Portuguese',
+'pa'=>'Punjabi',
+'qu'=>'Quechua',
+'rm'=>'Rhaeto-Romance',
+'ro'=>'Romanian',
+'ru'=>'Russian',
+'sm'=>'Samoan',
+'sg'=>'Sangro',
+'sa'=>'Sanskrit',
+'sr'=>'Serbian',
+'sh'=>'Serbo-Croatian',
+'st'=>'Sesotho',
+'tn'=>'Setswana',
+'sn'=>'Shona',
+'sd'=>'Sindhi',
+'si'=>'Sinhalese',
+'ss'=>'Siswati',
+'sk'=>'Slovak',
+'sl'=>'Slovenian',
+'so'=>'Somali',
+'es'=>'Spanish',
+'su'=>'Sundanese',
+'sw'=>'Swahili (Kiswahili)',
+'sv'=>'Swedish',
+'tl'=>'Tagalog',
+'tg'=>'Tajik',
+'ta'=>'Tamil',
+'tt'=>'Tatar',
+'te'=>'Telugu',
+'th'=>'Thai',
+'bo'=>'Tibetan',
+'ti'=>'Tigrinya',
+'to'=>'Tonga',
+'ts'=>'Tsonga',
+'tr'=>'Turkish',
+'tk'=>'Turkmen',
+'tw'=>'Twi',
+'ug'=>'Uighur',
+'uk'=>'Ukrainian',
+'ur'=>'Urdu',
+'uz'=>'Uzbek',
+'vi'=>'Vietnamese',
+'vo'=>'Volapük',
+'cy'=>'Welsh',
+'wo'=>'Wolof',
+'xh'=>'Xhosa',
+'yi'=>'Yiddish',
+'ji'=>'Yiddish',
+'yo'=>'Yoruba',
+'zu'=>'Zulu',
+); \ No newline at end of file
diff --git a/settings/personal.php b/settings/personal.php
index d2c29019ca5..a31042bb53f 100644
--- a/settings/personal.php
+++ b/settings/personal.php
@@ -18,10 +18,15 @@ $total=$free+$used;
$relative=round(($used/$total)*100);
$lang=OC_Preferences::getValue( OC_User::getUser(), 'core', 'lang', 'en' );
-$languages=OC_L10N::findAvailableLanguages();
+$languageCodes=OC_L10N::findAvailableLanguages();
//put the current language in the front
-unset($languages[array_search($lang,$languages)]);
-array_unshift($languages,$lang);
+unset($languageCodes[array_search($lang,$languageCodes)]);
+array_unshift($languageCodes,$lang);
+$languageNames=include 'languageCodes.php';
+$languages=array();
+foreach($languageCodes as $lang){
+ $languages[]=array('code'=>$lang,'name'=>$languageNames[$lang]);
+}
// Return template
$tmpl = new OC_Template( "settings", "personal", "user");
diff --git a/settings/templates/personal.php b/settings/templates/personal.php
index 021d03ba6da..8a6439f9722 100644
--- a/settings/templates/personal.php
+++ b/settings/templates/personal.php
@@ -18,7 +18,7 @@
<strong><label for="languageinput"><?php echo $l->t('Language');?></label></strong>
<select id="languageinput" name='lang'>
<?php foreach($_['languages'] as $language):?>
- <option value="<?php echo $language;?>"><?php echo $language;?></option>
+ <option value="<?php echo $language['code'];?>"><?php echo $language['name'];?></option>
<?php endforeach;?>
</select>
<a href="https://www.transifex.net/projects/p/owncloud/"><?php echo $l->t('Help translating');?></a>