aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-03-13 19:13:40 -0700
committerFriendika <info@friendika.com>2011-03-13 19:13:40 -0700
commit0d161c6ef60e4bcfe36f0a9b1e090955156a162a (patch)
tree74802f5e90971dc5bb813df9f1b7e8081298a198
parentaebf9bb4d6bf2cf3e86378a369f2d51996f4f6a6 (diff)
parent852091757166ffe0115ceade5af10154a2485286 (diff)
downloadvolse-hubzilla-0d161c6ef60e4bcfe36f0a9b1e090955156a162a.tar.gz
volse-hubzilla-0d161c6ef60e4bcfe36f0a9b1e090955156a162a.tar.bz2
volse-hubzilla-0d161c6ef60e4bcfe36f0a9b1e090955156a162a.zip
Merge branch 'omigeot-master'
-rw-r--r--index.php9
-rw-r--r--view/fr/strings.php12
2 files changed, 14 insertions, 7 deletions
diff --git a/index.php b/index.php
index cc17119b6..ab722df2a 100644
--- 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);
diff --git a/view/fr/strings.php b/view/fr/strings.php
index 423645c86..d177c07b8 100644
--- a/view/fr/strings.php
+++ b/view/fr/strings.php
@@ -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';