]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/language.php
Merge branch '0.9.x' into schema
[quix0rs-gnu-social.git] / lib / language.php
index cd6498d30b5d108677080a4b1494efa7e54d9a90..561a4ddb82184b4f4fd0a2b2e4ad2d0fc201d9e7 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * Laconica, the distributed open-source microblogging tool
+ * StatusNet, the distributed open-source microblogging tool
  *
  * utility functions for i18n
  *
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  * @category I18n
- * @package  Laconica
+ * @package  StatusNet
  * @author   Matthew Gregg <matthew.gregg@gmail.com>
  * @author   Ciaran Gultnieks <ciaran@ciarang.com>
- * @author   Evan Prodromou <evan@controlyourself.ca>
+ * @author   Evan Prodromou <evan@status.net>
  * @license  http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
- * @link     http://laconi.ca/
+ * @link     http://status.net/
  */
 
-if (!defined('LACONICA')) {
+if (!defined('STATUSNET') && !defined('LACONICA')) {
     exit(1);
 }
 
@@ -53,7 +53,7 @@ function client_prefered_language($httplang)
         if (!empty($httplang[2][$i])) {
             // if no q default to 1.0
             $client_langs[$httplang[2][$i]] =
-              ($httplang[6][$i]? (float) $httplang[6][$i] : 1.0);
+              ($httplang[6][$i]? (float) $httplang[6][$i] : 1.0 - ($i*0.01));
         }
         if (!empty($httplang[3][$i]) && empty($client_langs[$httplang[3][$i]])) {
             // if a catchall default 0.01 lower
@@ -108,7 +108,7 @@ function get_all_languages() {
                'el'      => array('q' => 0.1, 'lang' => 'el',    'name' => 'Greek', 'direction' => 'ltr'),
                'en-us'   => array('q' => 1, 'lang' => 'en_US', 'name' => 'English (US)', 'direction' => 'ltr'),
                'en-gb'   => array('q' => 1, 'lang' => 'en_GB', 'name' => 'English (British)', 'direction' => 'ltr'),
-               'en'      => array('q' => 1, 'lang' => 'en',    'name' => 'English', 'direction' => 'ltr'),
+               'en'      => array('q' => 1, 'lang' => 'en_US',    'name' => 'English (US)', 'direction' => 'ltr'),
                'es'      => array('q' => 1, 'lang' => 'es',    'name' => 'Spanish', 'direction' => 'ltr'),
                'fi'      => array('q' => 1, 'lang' => 'fi', 'name' => 'Finnish', 'direction' => 'ltr'),
                'fr-fr'   => array('q' => 1, 'lang' => 'fr_FR', 'name' => 'French', 'direction' => 'ltr'),