Koha/catalogue
Mathieu Saby 8718629c5c Bug 8954: Make languages list in advanced search translatable (revision 1)
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.
2012-11-20 14:39:56 -05:00
..
cardview.pl Bug 4330 : Adding some copyright BibLibre statements 2011-03-21 10:57:20 +13:00
detail.pl Bug 8175 - check logs error or displays incorrectly in details.pl 2012-10-12 21:25:45 +02:00
detailprint.pl Bug 6050 Make calls to GetItemsInfo consistent 2011-06-14 14:12:02 +12:00
export.pl Bug 7345: Enable exporting records sans private fields 2012-02-13 11:32:18 +01:00
getitem-ajax.pl Bug 7175: Allow to choose which items to receive 2012-05-21 17:46:07 +02:00
image.pl Bug 8255: allow local cover images to be cached 2012-06-25 18:12:29 +02:00
imageviewer.pl Bug 4321: clean C4::Biblio::GetBiblio and uses 2012-09-18 12:11:54 +02:00
ISBDdetail.pl Bug 5729 - Add CoinS to intranet 2011-12-27 18:37:20 +01:00
issuehistory.pl Bug 4321: clean C4::Biblio::GetBiblio and uses 2012-09-18 12:11:54 +02:00
labeledMARCdetail.pl Bug 5791 - Robust handling of deleted/non-existent biblios and authority records 2011-04-20 12:03:59 +12:00
MARCdetail.pl Bug 8481: Items table is showing in opac-MARCdetail.pl but not in MARCdetail.pl 2012-10-05 17:40:22 +02:00
moredetail.pl Bug 5339: Invoices management improvement 2012-09-18 22:42:15 +02:00
search.pl Bug 8954: Make languages list in advanced search translatable (revision 1) 2012-11-20 14:39:56 -05:00
showmarc.pl Bug 8872: Changes for intranet showmarc 2012-11-06 07:29:07 -05:00
updateitem.pl Bug 6296: allow users to be authenticated by SSL client certs 2012-03-19 17:02:44 +01:00