8718629c5c
In opac-search.pl and search.pl, this patch moves the $lang variable from the end to the begining of the script, and use it as a parameter for getAllLanguages. In Languages.pm, getAllLanguages function is modified : - if no parameter is passed to the function, it returns english languages names - if a $lang parameter conforming to RFC4646 syntax is passed : -- the function returns languages names translated in $lang if possible -- if a language name is not translated in $lang in database, the function returns english language name To test, set your opac and staff interface in english and in other languages and check search.pl and opac-search.pl : - If language names in your languages_description table are translated in the same language you use for your GUI, the language names in dropdown list will be translated in this language (+native name). - If your GUI is in english, or in a language into whitch languages names are not translated in languages_description, the dropdown list will stay in english (+native name). Signed-off-by: Marc Veron <veron@veron.ch> Patch behaves as expected. With Opac language set to French I got all languages with French language name. With German (de-DE), I got only a few with German language names (and all other with English ones), this was due to missing entries for de-DE in table language_descriptions. This behaviour is consistent with the description above. Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Tested language list in OPAC and staff advanced search is translated properly after applying the patch. Checked that language switcher still works like it should. Signed-off-by: Paul Poulain <paul.poulain@biblibre.com> Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com> Fixed typo in POD. |
||
---|---|---|
.. | ||
errors | ||
rss | ||
sco | ||
svc | ||
changelanguage.pl | ||
ilsdi.pl | ||
maintenance.pl | ||
oai.pl | ||
opac-account.pl | ||
opac-addbybiblionumber.pl | ||
opac-alert-subscribe.pl | ||
opac-authorities-home.pl | ||
opac-authoritiesdetail.pl | ||
opac-basket.pl | ||
opac-browser.pl | ||
opac-changelanguage.pl | ||
opac-detail.pl | ||
opac-downloadcart.pl | ||
opac-downloadshelf.pl | ||
opac-export.pl | ||
opac-ics.pl | ||
opac-image.pl | ||
opac-imageviewer.pl | ||
opac-ISBDdetail.pl | ||
opac-main.pl | ||
opac-MARCdetail.pl | ||
opac-messaging.pl | ||
opac-modrequest-suspend.pl | ||
opac-modrequest.pl | ||
opac-mymessages.pl | ||
opac-passwd.pl | ||
opac-patron-image.pl | ||
opac-privacy.pl | ||
opac-ratings-ajax.pl | ||
opac-ratings.pl | ||
opac-readingrecord.pl | ||
opac-renew.pl | ||
opac-reserve.pl | ||
opac-review.pl | ||
opac-search-history.pl | ||
opac-search.pl | ||
opac-sendbasket.pl | ||
opac-sendshelf.pl | ||
opac-serial-issues.pl | ||
opac-shelves.pl | ||
opac-showmarc.pl | ||
opac-showreviews.pl | ||
opac-suggestions.pl | ||
opac-tags.pl | ||
opac-tags_subject.pl | ||
opac-topissues.pl | ||
opac-user.pl | ||
opac-userdetails.pl | ||
opac-userupdate.pl | ||
search.pl | ||
unapi |