[Koha-bugs] [Bug 9735] Choose language using URL parameters in any page
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Thu May 30 08:53:07 CEST 2013
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9735
--- Comment #4 from Chris Cormack <chris at bigballofwax.co.nz> ---
Created attachment 18490
-->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=18490&action=edit
Bug 9735 - Let the language be selected through URL parameters
Passing language=<valid_language_code> as a parameter in any Koha's URL can be
used to set the desired language.
This patch touches
- C4::Templates
- C4::Auth
Adds a new method getlanguagecookie that does exactly that, for use in
get_template_and_user.
Also modifies getlanguage so it checks (a) if there's a 'language' parameter in
the CGI object and (b) checks if its valid and enabled for the desired
interface.
To test:
* Without the patch
- access any koha page
- add ?language=code to the end of the URL (change code for a valid language
code
it needs to be installed using perl translate install code, and enabled
either for
the staff or opac interface, depending where are you testing)
- Nothing happens with the language parameter
* With the patch
- access any koha page
- add ?language=code (the same as before) and hit enter
- the language should be changed to the one you chose
- if you browse through some links, you will see
koha 'remembers' the language you passed as a parameter
(i.e. the language cookie has been updated).
Regards
To+
Sponsored-by: Universidad Nacional de Córdoba
Signed-off-by: Brendan <brendan at bywatersolutions.com>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel at gmail.com>
Comment: Works very well. No errors.
Signed-off-by: Chris Cormack <chrisc at catalyst.net.nz>
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list