http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8954
mathieu saby <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #13127|0 |1 is obsolete| | --- Comment #8 from mathieu saby <[email protected]> --- Created attachment 13332 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=13332&action=edit [PATCH] Bug 8954: Make languages list in advanced search translatable (revision 1) In fact, RFC4646 codes could sometimes contain 3 letters (for example, "tet" for Tetun, a language into which Koha is translated...). So I think the best is to use regex_lang_subtags function, defined in C4/Languages.pm. Description of this new patch : 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). Mathieu Saby Rennes 2 University -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
