]> git.mxchange.org Git - friendica.git/commitdiff
Merge branch 'omigeot-master'
authorFriendika <info@friendika.com>
Mon, 14 Mar 2011 02:13:40 +0000 (19:13 -0700)
committerFriendika <info@friendika.com>
Mon, 14 Mar 2011 02:13:40 +0000 (19:13 -0700)
index.php
view/fr/strings.php

index cc17119b62c6c48f92e5b6dc57b483595261d7cf..ab722df2aa3533ff5a99058473213ee771a6281e 100644 (file)
--- a/index.php
+++ b/index.php
@@ -31,10 +31,17 @@ $install = ((file_exists('.htconfig.php') && filesize('.htconfig.php')) ? false
  *
  * Get the language setting directly from system variables, bypassing get_config()
  * as database may not yet be configured.
+ * 
+ * If possible, we use the value from the browser.
  *
  */
 
-$lang = ((isset($a->config['system']['language'])) ? $a->config['system']['language'] : 'en');
+if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
+       $langs = preg_split("/[,-]/",$_SERVER['HTTP_ACCEPT_LANGUAGE'],2);
+       $lang = $langs[0];
+} else {
+       $lang = ((isset($a->config['system']['language'])) ? $a->config['system']['language'] : 'en');
+}
        
 load_translation_table($lang);
 
index 423645c86262b905feae626792b5cbdfc1e8efab..d177c07b8996cf197d1215c1409f604848a5236f 100644 (file)
@@ -16,14 +16,14 @@ $a->strings['last'] = 'last';
 $a->strings['next'] = 'next';
 $a->strings[' likes this.'] = ' aime ça.';
 $a->strings[' doesn\'t like this.'] = ' n\'aime pas ça.';
-$a->strings['people'] = 'personne(s)';
-$a->strings['like this.'] = 'aime(nt) ça.';
-$a->strings['don\'t like this.'] = 'n\'aime(nt) pas ça.';
+$a->strings['people'] = 'personnes';
+$a->strings['like this.'] = 'aiment ça.';
+$a->strings['don\'t like this.'] = 'n\'aiment pas ça.';
 $a->strings['and'] = 'et';
 $a->strings[', and '] = ', et ';
-$a->strings[' other people'] = ' autre(s) personne(s)';
-$a->strings[' like this.'] = ' aime(nt) ça.';
-$a->strings[' don\'t like this.'] = ' n\'aime(nt) pas ça.';
+$a->strings[' other people'] = ' autres personnes';
+$a->strings[' like this.'] = ' aiment ça.';
+$a->strings[' don\'t like this.'] = ' n\'aiment pas ça.';
 $a->strings['No contacts'] = 'Aucun contact';
 $a->strings['Contacts'] = 'Contacts';
 $a->strings['View Contacts'] = 'Voir les contacts';