[Bug 7514] New: Direct URL to OPAC in specified language
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7514 Bug #: 7514 Summary: Direct URL to OPAC in specified language Classification: Unclassified Change sponsored?: --- Product: Koha Version: rel_3_4 Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P5 - low Component: I18N/L10N AssignedTo: frederic@tamil.fr ReportedBy: katrin.fischer@bsz-bw.de QAContact: koha.sekjal@gmail.com At the moment we are using browser detection and cookies to detect the right language to show to the user. It would be good if you could craft an URL to circumvent browser detection and open the OPAC in the specified language directly. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7514 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Direct URL to OPAC in |Choose OPAC language with |specified language |URL parameter -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7514 Frère Sébastien Marie <semarie-koha@latrappe.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |semarie-koha@latrappe.fr --- Comment #1 from Frère Sébastien Marie <semarie-koha@latrappe.fr> 2012-02-09 09:44:37 UTC --- Currently, it exists 'changelanguage.pl' which use 'language' parameter for set the language cookie, and redirect to REFERER. See: http://opac/cgi-bin/koha/changelanguage.pl?language=fr-FR Or: koha-git-tree/opac/changelanguage.pl So perhaps just need to use a 'url' parameter for redirect, and if no parameter, fallback to referer... (or if no referer, go to http://opac/) -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7514 --- Comment #2 from Frédéric Demians <frederic@tamil.fr> 2012-02-09 10:05:02 UTC --- (In reply to comment #1)
Currently, it exists 'changelanguage.pl' which use 'language' parameter for set the language cookie, and redirect to REFERER.
Exactly what I was saying on IRC... patch coming. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7514 --- Comment #3 from Frédéric Demians <frederic@tamil.fr> 2012-02-09 10:05:24 UTC --- Created attachment 7523 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=7523 Proposed patch -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7514 --- Comment #4 from Katrin Fischer <katrin.fischer@bsz-bw.de> 2012-02-09 10:20:23 UTC --- Wow - that was fast. Thank you Frédéric and Frère Sébastien Marie! Only so I get it right for testing later: Will this change only affect http://opac/cgi-bin/koha/changelanguage.pl?language=fr-FR or should the parameter work for any page after applying the patch? -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7514 Frère Sébastien Marie <semarie-koha@latrappe.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|rel_3_4 |master --- Comment #5 from Frère Sébastien Marie <semarie-koha@latrappe.fr> 2012-02-09 10:28:46 UTC --- (In reply to comment #4)
Only so I get it right for testing later: Will this change only affect http://opac/cgi-bin/koha/changelanguage.pl?language=fr-FR or should the parameter work for any page after applying the patch?
The patch of Frederic permit to use the "changelanguage.pl" script directly (without need of referer [setted when called from a link to "changelanguage.pl" for example]) So after called "http://opac/cgi-bin/koha/changelanguage.pl?language=fr-FR" in your browser, the cookie is setted for the rest of the session to fr-FR language. As cookie check is done before browser language detection, the use of this url permit to circumvent the browser default language. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7514 --- Comment #6 from Frédéric Demians <frederic@tamil.fr> 2012-02-09 10:52:47 UTC --- Yes. It means that when linking to the OPAC from the outside, the library CMS for example, if you want to bypass language selection via browser language ordered choices, you don't link to: http://myopac but: http://myopac/cgi-bin/koha/changelanguage.pl?language=fr-FR After that, you don't have/can't append 'language' parameter to any OPAC page. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7514 --- Comment #7 from Katrin Fischer <katrin.fischer@bsz-bw.de> 2012-02-09 11:01:23 UTC --- Thanks for the explanations - I will test asap. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7514 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #7523|0 |1 is obsolete| | --- Comment #8 from Katrin Fischer <katrin.fischer@bsz-bw.de> 2012-02-12 19:39:01 UTC --- Created attachment 7590 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=7590 Bug 7514 Choose OPAC language with URL parameter Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Tested: - with and without cookie set - different language codes http://.../cgi-bin/koha/opac-changelanguage.pl?language=de-DE will directly open the German OPAC. http://.../cgi-bin/koha/opac-changelanguage.pl?language=en will directly open the English OPAC. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7514 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #7590|0 |1 is obsolete| | --- Comment #9 from Katrin Fischer <katrin.fischer@bsz-bw.de> 2012-02-12 19:39:44 UTC --- Created attachment 7591 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=7591 [SIGNED-OFF] Bug 7514 Choose OPAC language with URL parameter Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Tested: - with and without cookie set - different language codes http://.../cgi-bin/koha/opac-changelanguage.pl?language=de-DE will directly open the German OPAC. http://.../cgi-bin/koha/opac-changelanguage.pl?language=en will directly open the English OPAC. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7514 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7514 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7514 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA CC| |jonathan.druart@biblibre.co | |m --- Comment #10 from Jonathan Druart <jonathan.druart@biblibre.com> 2012-02-15 15:49:38 UTC --- Marked as Passed QA. Nothing to say, simple patch. Initialize $url variable to '/' if it is not set. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7514 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |paul.poulain@biblibre.com Version|master |rel_3_6 -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7514 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable --- Comment #11 from Jared Camins-Esakov <jcamins@cpbibliography.com> --- This fix was included in the 3.6.x branch prior to 3.6.4. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org