Skip to content
Commits on Apr 28, 2011
  1. Modified the compatible-language logic to be more IE-friendly

    IE does not allow for language-only values in the preferred languages.
    In order for things to work as expected, I modified the logic to act 
    as if each language designation includes a language-only value as well,
    as is recommended by the W3C here:
    http://www.w3.org/International/questions/qa-lang-priorities#langtagdetail
    
    This change breaks compliance with RFC 2616, but I like the results better.
    committed Apr 27, 2011
Commits on Apr 21, 2011
  1. Updated regex to allow for more language codes including numeric regions

    Even though it is not RFC 2616 compliant, some browsers (e.g. Google Chrome) 
    send HTTP_ACCEPT_LANGUAGE headers that include numeric regions like
    those in BCP 47.
    committed Apr 21, 2011
Commits on Mar 17, 2011
  1. @tomhughes

    Make compatible_language_from follow the RFC 2616 selection algorithm

    The change in commit 92b276c is wrong
    because it reverses the previous change to obey the RFC 2616 algorithm.
    
    Specifically RFC 2616 says that a request for en-GB will only match
    with en-GB or something that starts with en-GB and it will not match
    against en with no suffix.
    
    The test failures were because the test was wrong, not because the
    code was wrong. This commit restores the previous code and fixes the
    tests.
    tomhughes committed Mar 17, 2011
Commits on Jun 29, 2010
  1. @DerGuteMoritz @iain

    Ignore whitespace before and after commas

    E.g. the example given under http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.4 has a space after the comma
    DerGuteMoritz committed with iain Jun 25, 2010
  2. @iain

    * fixed code so that tests are green again

    * added symbol support for available languages
    Norman/Thies committed with iain Jun 25, 2010
Commits on May 24, 2010
  1. @iain

    ActionController doesn't exists anymore in rails 3

    Damien Mathieu committed with iain Apr 15, 2010
  2. @tomhughes @iain
  3. @tomhughes @iain

    Make compatible_language_from follow the RFC 2616 selection algorithm

    We need to look for the longest matching prefix rather than just the
    first language with the same basic language code, otherwise if we have
    both zh-CN and zh-TW available then we may select the wrong one as we
    will return he first one we see that starts with zh even if the user
    had said they preferred a specific variant.
    tomhughes committed with iain May 24, 2010
Commits on Feb 25, 2010
  1. @iain
  2. @iain

    Version bump to 1.0.1

    iain committed Feb 25, 2010
  3. @iain

    Fix tests

    iain committed Feb 25, 2010
Commits on Feb 24, 2010
  1. @frisoft
Commits on Jan 5, 2010
  1. @iain

    Remove dead code

    iain committed Jan 5, 2010
  2. @iain

    Add gemspec

    iain committed Jan 5, 2010
  3. @iain

    Preparing to release as a gem

    iain committed Jan 5, 2010
  4. @iain

    Version bump to 1.0.0

    iain committed Jan 5, 2010
  5. @iain

    Version bump to 0.0.0

    iain committed Jan 5, 2010
Commits on Jun 4, 2009
  1. @iain

    typo in README fixed

    iain committed Jun 4, 2009
Commits on Mar 12, 2009
  1. Fix backward compatibility

    Iain Hecker committed Mar 12, 2009
  2. Return the first of user compatible locales.

    Added some more RDoc stuff.
    Iain Hecker committed Mar 12, 2009
  3. @iain

    Make it Rails 2.3 complient

    iain committed Mar 12, 2009
  4. @iain

    Fixed ugly whitespace problems and dead code.

    Signed-off-by: Iain Hecker <iain@iain.nl>
    Andres Jaan Tack committed with iain Jan 28, 2009
  5. @iain

    Enabled use of the plugin in test environments.

    Test environments use TestRequest objects, not CgiRequest objects. Luckily, both descend from AbstractRequest, so I moved the include.
    
    Signed-off-by: Iain Hecker <iain@iain.nl>
    Andres Jaan Tack committed with iain Jan 28, 2009
Commits on Jan 25, 2009
  1. @iain

    Modified methods to not assume strings for input in arrays.

    The code at http://zargony.com/2009/01/09/selecting-the-locale-for-a-request collects the available translations from config/locales and stores them as symbols, which I think is perfectly reasonable. The changes here allow the two to work together.
    
    Signed-off-by: Iain Hecker <iain@iain.nl>
    Andres Jaan Tack committed with iain Jan 23, 2009
Commits on Dec 23, 2008
  1. updated docs

    Signed-off-by: Iain Hecker <github@iain.nl>
    Jason committed with Iain Hecker Nov 5, 2008
  2. added support for languages with different countries

    Signed-off-by: Iain Hecker <github@iain.nl>
    Jason committed with Iain Hecker Nov 5, 2008
  3. remove vim temp file

    Aitor Garay-Romero committed Dec 23, 2008
  4. minor typo in documentation

    Aitor Garay-Romero committed Dec 23, 2008
Commits on Aug 3, 2008
  1. @iain
Commits on Aug 2, 2008
  1. @iain

    updated README

    iain committed Aug 3, 2008
  2. @iain
Commits on Jul 30, 2008
  1. first commit

    Iain Hecker committed Jul 31, 2008
Something went wrong with that request. Please try again.