#89 Respect browser settings for language

closed-fixed
None
5
2005-05-09
2003-07-02
Anonymous
No

I wanted the following order to set language:
1) Use users preferences if language is set there
2) Use the browsers language settings
3) Use the default language from config.php

The problem is that it just doesn't work with SM 1.4.0.

The attached patch fixes this for me. Obviously it's
not the correct way but it works fine.

Discussion

  • Tomas Kuliavas

    Tomas Kuliavas - 2003-12-26
    • assigned_to: nobody --> tokul
     
  • Thijs Kinkhorst

    Thijs Kinkhorst - 2005-04-06

    Logged In: YES
    user_id=285765

    Have you looked at this Tomas?

     
  • Tomas Kuliavas

    Tomas Kuliavas - 2005-04-07

    Logged In: YES
    user_id=225877

    Patch is not correct. It only enforces $do_search=true
    option in set_up_language() function. When user selects
    default language, instead of getting squirrelmail default
    language, he gets first language that is listed in his/her
    browser preferences.

    same thing can be accomplished by setting default value of
    $do_search to true.

    In order to solve it correctly, we have to make decision
    about default language that should be used in login page and
    language that should be used when user does not have
    language preferences.

    Currectly SquirrelMail defaults to
    $squirrelmail_default_language.

     
  • Tomas Kuliavas

    Tomas Kuliavas - 2005-04-08

    implementation of devel branch

     
  • Tomas Kuliavas

    Tomas Kuliavas - 2005-04-08

    Logged In: YES
    user_id=225877

    Patch was implemented differently. If default squirrelmail
    language is set to empty string, it forces detection of
    preferred translation.

    Behaviour of squirrelmail is documented in doc/i18n.txt and
    comments of set_up_language() function in functions/i18n.php

     
  • Tomas Kuliavas

    Tomas Kuliavas - 2005-04-08
    • labels: 310312 -->
     
  • Tomas Kuliavas

    Tomas Kuliavas - 2005-05-09
    • status: open --> closed-fixed
     
  • Tomas Kuliavas

    Tomas Kuliavas - 2005-05-09

    Logged In: YES
    user_id=225877

    Implemented in 1.4.5cvs. functions/i18n.php v.1.129.2.36

    If default SquirrelMail language is set to empty string,
    interface detects preferred language from
    HTTP_ACCEPT_LANGUAGE header. Currently only first preferred
    language is used.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks