From 593d7037c581b2274f43735f36b88a488e0ba067 Mon Sep 17 00:00:00 2001 From: olivierm Date: Wed, 2 Mar 2011 14:38:30 +0100 Subject: [PATCH 1/2] Slight change in strings (now guess better whether 'likes' are plural or singular) --- view/fr/strings.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/view/fr/strings.php b/view/fr/strings.php index 09fa91f308..9115af7706 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'; From 852091757166ffe0115ceade5af10154a2485286 Mon Sep 17 00:00:00 2001 From: olivierm Date: Tue, 8 Mar 2011 14:41:04 +0100 Subject: [PATCH 2/2] Autodetect browser language (should we make this optional?) --- index.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/index.php b/index.php index bbd2c81cd6..24466a85ac 100644 --- a/index.php +++ b/index.php @@ -31,10 +31,17 @@ $install = ((file_exists('.htconfig.php')) ? false : true); * * 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);