Re: [Koha] Adding languages to Advanced Search
Hi Rubén, we have the AdvancedSearchLanguages system preference to allow configuration of the languages shown in the pull down. You enter the language codes for the languages you want to show - so it's easy and adding a new language doesn't change existing installations. Katrin On 22.08.2018 15:38, Rubén Fernández Asensio wrote: Thanks Katrin! I think the "IGNORE" version isn't necessary, it may be related to the case of collision between Georgian and Kannada codes in the example you pointed to. I'll try running the SQL command in my own test server. Also, what code would it be to delete a language from the list? Given that there are 7000 languages in the world, if only 1000 are written, that's still unwieldly for a drop-down menu... That's why I'm unsure about submitting a bug report and having Esperanto added to the default interface. It should be easier to customise this though. Ruben El 22/08/18 a les 07:48, Katrin Fischer ha escrit: Hi Rubén, first and second look the same to me? It looks about right. I just ran the SQL in my test database and Esperanto showed up in the language pull down. Katrin On 20.08.2018 09:34, Rubén Fernández Asensio wrote: I'd rather file a bug, but adding Esperanto (and other languages) has already been proposed: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18493 Why is the status of that bug "Failed QA"? I suspect the only way of having that bug fixed and Esperanto added to Koha Advanced Search may be providing a solution myself... OK, let's say I type something like this: INSERT INTO language_subtag_registry( subtag, type, description, added) VALUES ( 'eo', 'language', 'Esperanto','2018-08-20'); INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) VALUES ( 'eo', 'epo'); INSERT INTO language_descriptions(subtag, type, lang, description) VALUES ( 'eo', 'language', 'eo', 'Esperanto'); INSERT INTO language_descriptions(subtag, type, lang, description) VALUES ( 'eo', 'language', 'en', 'Esperanto'); And this: INSERT IGNORE INTO language_subtag_registry( subtag, type, description, added) VALUES ( 'eo', 'language', 'Esperanto','2018-08-20'); INSERT IGNORE INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) VALUES ( 'eo', 'epo'); INSERT IGNORE INTO language_descriptions(subtag, type, lang, description) VALUES ( 'eo', 'language', 'eo', 'Esperanto'); INSERT IGNORE INTO language_descriptions(subtag, type, lang, description) VALUES ( 'eo', 'language', 'en', 'Esperanto'); What should I do next? El 20/08/18 a les 08:09, Katrin Fischer ha escrit: Example: INSERT IGNORE INTO language_descriptions(subtag, type, lang, description) VALUES ( 'ka', 'language', 'ka', 'ქართული'); For translations: INSERT IGNORE INTO language_descriptions(subtag, type, lang, description) VALUES ( 'ka', 'language', 'fr', 'Géorgien'); ... You could also file a bug on bugzilla about adding Esperanto to the list for new versions. Katrin ___ Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz https://lists.katipo.co.nz/mailman/listinfo/koha ___ Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz https://lists.katipo.co.nz/mailman/listinfo/koha ___ Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz https://lists.katipo.co.nz/mailman/listinfo/koha ___ Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz https://lists.katipo.co.nz/mailman/listinfo/koha
Re: [Koha] Adding languages to Advanced Search
Thanks Katrin! I think the "IGNORE" version isn't necessary, it may be related to the case of collision between Georgian and Kannada codes in the example you pointed to. I'll try running the SQL command in my own test server. Also, what code would it be to delete a language from the list? Given that there are 7000 languages in the world, if only 1000 are written, that's still unwieldly for a drop-down menu... That's why I'm unsure about submitting a bug report and having Esperanto added to the default interface. It should be easier to customise this though. Ruben El 22/08/18 a les 07:48, Katrin Fischer ha escrit: Hi Rubén, first and second look the same to me? It looks about right. I just ran the SQL in my test database and Esperanto showed up in the language pull down. Katrin On 20.08.2018 09:34, Rubén Fernández Asensio wrote: I'd rather file a bug, but adding Esperanto (and other languages) has already been proposed: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18493 Why is the status of that bug "Failed QA"? I suspect the only way of having that bug fixed and Esperanto added to Koha Advanced Search may be providing a solution myself... OK, let's say I type something like this: INSERT INTO language_subtag_registry( subtag, type, description, added) VALUES ( 'eo', 'language', 'Esperanto','2018-08-20'); INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) VALUES ( 'eo', 'epo'); INSERT INTO language_descriptions(subtag, type, lang, description) VALUES ( 'eo', 'language', 'eo', 'Esperanto'); INSERT INTO language_descriptions(subtag, type, lang, description) VALUES ( 'eo', 'language', 'en', 'Esperanto'); And this: INSERT IGNORE INTO language_subtag_registry( subtag, type, description, added) VALUES ( 'eo', 'language', 'Esperanto','2018-08-20'); INSERT IGNORE INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) VALUES ( 'eo', 'epo'); INSERT IGNORE INTO language_descriptions(subtag, type, lang, description) VALUES ( 'eo', 'language', 'eo', 'Esperanto'); INSERT IGNORE INTO language_descriptions(subtag, type, lang, description) VALUES ( 'eo', 'language', 'en', 'Esperanto'); What should I do next? El 20/08/18 a les 08:09, Katrin Fischer ha escrit: Example: INSERT IGNORE INTO language_descriptions(subtag, type, lang, description) VALUES ( 'ka', 'language', 'ka', 'ქართული'); For translations: INSERT IGNORE INTO language_descriptions(subtag, type, lang, description) VALUES ( 'ka', 'language', 'fr', 'Géorgien'); ... You could also file a bug on bugzilla about adding Esperanto to the list for new versions. Katrin ___ Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz https://lists.katipo.co.nz/mailman/listinfo/koha ___ Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz https://lists.katipo.co.nz/mailman/listinfo/koha ___ Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz https://lists.katipo.co.nz/mailman/listinfo/koha
Re: [Koha] Adding languages to Advanced Search
Hi Rubén, first and second look the same to me? It looks about right. I just ran the SQL in my test database and Esperanto showed up in the language pull down. Katrin On 20.08.2018 09:34, Rubén Fernández Asensio wrote: I'd rather file a bug, but adding Esperanto (and other languages) has already been proposed: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18493 Why is the status of that bug "Failed QA"? I suspect the only way of having that bug fixed and Esperanto added to Koha Advanced Search may be providing a solution myself... OK, let's say I type something like this: INSERT INTO language_subtag_registry( subtag, type, description, added) VALUES ( 'eo', 'language', 'Esperanto','2018-08-20'); INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) VALUES ( 'eo', 'epo'); INSERT INTO language_descriptions(subtag, type, lang, description) VALUES ( 'eo', 'language', 'eo', 'Esperanto'); INSERT INTO language_descriptions(subtag, type, lang, description) VALUES ( 'eo', 'language', 'en', 'Esperanto'); And this: INSERT IGNORE INTO language_subtag_registry( subtag, type, description, added) VALUES ( 'eo', 'language', 'Esperanto','2018-08-20'); INSERT IGNORE INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) VALUES ( 'eo', 'epo'); INSERT IGNORE INTO language_descriptions(subtag, type, lang, description) VALUES ( 'eo', 'language', 'eo', 'Esperanto'); INSERT IGNORE INTO language_descriptions(subtag, type, lang, description) VALUES ( 'eo', 'language', 'en', 'Esperanto'); What should I do next? El 20/08/18 a les 08:09, Katrin Fischer ha escrit: Example: INSERT IGNORE INTO language_descriptions(subtag, type, lang, description) VALUES ( 'ka', 'language', 'ka', 'ქართული'); For translations: INSERT IGNORE INTO language_descriptions(subtag, type, lang, description) VALUES ( 'ka', 'language', 'fr', 'Géorgien'); ... You could also file a bug on bugzilla about adding Esperanto to the list for new versions. Katrin ___ Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz https://lists.katipo.co.nz/mailman/listinfo/koha ___ Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz https://lists.katipo.co.nz/mailman/listinfo/koha
Re: [Koha] Adding languages to Advanced Search
I'd rather file a bug, but adding Esperanto (and other languages) has already been proposed: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18493 Why is the status of that bug "Failed QA"? I suspect the only way of having that bug fixed and Esperanto added to Koha Advanced Search may be providing a solution myself... OK, let's say I type something like this: INSERT INTO language_subtag_registry( subtag, type, description, added) VALUES ( 'eo', 'language', 'Esperanto','2018-08-20'); INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) VALUES ( 'eo', 'epo'); INSERT INTO language_descriptions(subtag, type, lang, description) VALUES ( 'eo', 'language', 'eo', 'Esperanto'); INSERT INTO language_descriptions(subtag, type, lang, description) VALUES ( 'eo', 'language', 'en', 'Esperanto'); And this: INSERT IGNORE INTO language_subtag_registry( subtag, type, description, added) VALUES ( 'eo', 'language', 'Esperanto','2018-08-20'); INSERT IGNORE INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) VALUES ( 'eo', 'epo'); INSERT IGNORE INTO language_descriptions(subtag, type, lang, description) VALUES ( 'eo', 'language', 'eo', 'Esperanto'); INSERT IGNORE INTO language_descriptions(subtag, type, lang, description) VALUES ( 'eo', 'language', 'en', 'Esperanto'); What should I do next? El 20/08/18 a les 08:09, Katrin Fischer ha escrit: Example: INSERT IGNORE INTO language_descriptions(subtag, type, lang, description) VALUES ( 'ka', 'language', 'ka', 'ქართული'); For translations: INSERT IGNORE INTO language_descriptions(subtag, type, lang, description) VALUES ( 'ka', 'language', 'fr', 'Géorgien'); ... You could also file a bug on bugzilla about adding Esperanto to the list for new versions. Katrin ___ Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz https://lists.katipo.co.nz/mailman/listinfo/koha
Re: [Koha] Adding languages to Advanced Search
Hi Rubén, the patch was to show the SQL that is needed in order to add a new language, as the list is created from data in the database. Here is an example: Example: INSERT IGNORE INTO language_descriptions(subtag, type, lang, description) VALUES ( 'ka', 'language', 'ka', 'ქართული'); For translations: INSERT IGNORE INTO language_descriptions(subtag, type, lang, description) VALUES ( 'ka', 'language', 'fr', 'Géorgien'); ... You could also file a bug on bugzilla about adding Esperanto to the list for new versions. Katrin On 20.08.2018 07:58, Rubén Fernández Asensio wrote: Thanks, Katrin, but I'm not a programmer! I know nothing about jQuery or patches. Do you mean I must recompile the entire Koha from sources? Can't it be done just by editing a few configuration files? El 19/08/18 a les 21:42, Katrin Fischer ha escrit: Hi Rubén, you can add new entries to the pull down list using jQuery or you can add your new language to the database. The language list is created using data from the db, including the translations. I've found an old bug for you that adds a new language as an example: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14030 Hope that helps, Katrin On 18.08.2018 21:21, Rubén Fernández Asensio wrote: Hello again! I'm still trying to customize the Advanced Search. Now I need to add a language to the language search field. For some reason, it doesn't show Esperanto ("epo" according to ISO-639-2). Taking a look at file /usr/share/koha/opac/htdocs/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt, which seems to govern Advanced Search interface, I find this: Language Language: No limit [% FOREACH search_languages_loo IN search_languages_loop %] [% IF ( search_languages_loo.selected ) %] [% search_languages_loo.language_description %] [% ELSE %] [% search_languages_loo.language_description %] [% END %] [% END %] So, what should I do to add a language and its description to the list, or at least to take a look at the built-in list "search_languages_loop"? Also, is there any way of writing code to select "any language but X"? Rubén ___ Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz https://lists.katipo.co.nz/mailman/listinfo/koha ___ Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz https://lists.katipo.co.nz/mailman/listinfo/koha ___ Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz https://lists.katipo.co.nz/mailman/listinfo/koha ___ Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz https://lists.katipo.co.nz/mailman/listinfo/koha
Re: [Koha] Adding languages to Advanced Search
Hi Ruben, You will not have to recompile Koha from source. However your objective cannot be achieved merely with configuration. The language is not there to be configured, at present. You've done well to get as far as you have, but to proceed you will probably need technical support. If you do not have that inhouse, you might find help from this directory: https://koha-community.org/support/paid-support/ I hope this helps, Bob Calyx On 20/08/18 15:58, Rubén Fernández Asensio wrote: Thanks, Katrin, but I'm not a programmer! I know nothing about jQuery or patches. Do you mean I must recompile the entire Koha from sources? Can't it be done just by editing a few configuration files? El 19/08/18 a les 21:42, Katrin Fischer ha escrit: Hi Rubén, you can add new entries to the pull down list using jQuery or you can add your new language to the database. The language list is created using data from the db, including the translations. I've found an old bug for you that adds a new language as an example: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14030 Hope that helps, Katrin On 18.08.2018 21:21, Rubén Fernández Asensio wrote: Hello again! I'm still trying to customize the Advanced Search. Now I need to add a language to the language search field. For some reason, it doesn't show Esperanto ("epo" according to ISO-639-2). Taking a look at file /usr/share/koha/opac/htdocs/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt, which seems to govern Advanced Search interface, I find this: Language Language: No limit [% FOREACH search_languages_loo IN search_languages_loop %] [% IF ( search_languages_loo.selected ) %] [% search_languages_loo.language_description %] [% ELSE %] [% search_languages_loo.language_description %] [% END %] [% END %] So, what should I do to add a language and its description to the list, or at least to take a look at the built-in list "search_languages_loop"? Also, is there any way of writing code to select "any language but X"? ___ Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz https://lists.katipo.co.nz/mailman/listinfo/koha
Re: [Koha] Adding languages to Advanced Search
Thanks, Katrin, but I'm not a programmer! I know nothing about jQuery or patches. Do you mean I must recompile the entire Koha from sources? Can't it be done just by editing a few configuration files? El 19/08/18 a les 21:42, Katrin Fischer ha escrit: Hi Rubén, you can add new entries to the pull down list using jQuery or you can add your new language to the database. The language list is created using data from the db, including the translations. I've found an old bug for you that adds a new language as an example: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14030 Hope that helps, Katrin On 18.08.2018 21:21, Rubén Fernández Asensio wrote: Hello again! I'm still trying to customize the Advanced Search. Now I need to add a language to the language search field. For some reason, it doesn't show Esperanto ("epo" according to ISO-639-2). Taking a look at file /usr/share/koha/opac/htdocs/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt, which seems to govern Advanced Search interface, I find this: Language Language: No limit [% FOREACH search_languages_loo IN search_languages_loop %] [% IF ( search_languages_loo.selected ) %] [% search_languages_loo.language_description %] [% ELSE %] [% search_languages_loo.language_description %] [% END %] [% END %] So, what should I do to add a language and its description to the list, or at least to take a look at the built-in list "search_languages_loop"? Also, is there any way of writing code to select "any language but X"? Rubén ___ Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz https://lists.katipo.co.nz/mailman/listinfo/koha ___ Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz https://lists.katipo.co.nz/mailman/listinfo/koha ___ Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz https://lists.katipo.co.nz/mailman/listinfo/koha
Re: [Koha] Adding languages to Advanced Search
Hi Rubén, you can add new entries to the pull down list using jQuery or you can add your new language to the database. The language list is created using data from the db, including the translations. I've found an old bug for you that adds a new language as an example: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14030 Hope that helps, Katrin On 18.08.2018 21:21, Rubén Fernández Asensio wrote: Hello again! I'm still trying to customize the Advanced Search. Now I need to add a language to the language search field. For some reason, it doesn't show Esperanto ("epo" according to ISO-639-2). Taking a look at file /usr/share/koha/opac/htdocs/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt, which seems to govern Advanced Search interface, I find this: Language Language: No limit [% FOREACH search_languages_loo IN search_languages_loop %] [% IF ( search_languages_loo.selected ) %] [% search_languages_loo.language_description %] [% ELSE %] [% search_languages_loo.language_description %] [% END %] [% END %] So, what should I do to add a language and its description to the list, or at least to take a look at the built-in list "search_languages_loop"? Also, is there any way of writing code to select "any language but X"? Rubén ___ Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz https://lists.katipo.co.nz/mailman/listinfo/koha ___ Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz https://lists.katipo.co.nz/mailman/listinfo/koha