[Koha] Adding languages to Advanced Search

Katrin Fischer katrin.fischer.83 at web.de
Mon Aug 20 18:09:49 NZST 2018


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:
>>>
>>> <fieldset>
>>>   <legend>Language</legend>
>>>     <!-- LANGUAGE LIMIT -->
>>>       <p>
>>>      <label for="language-limit">Language: </label>
>>>          <select id="language-limit" name="limit">
>>>              <option value="">No limit</option>
>>>                    [% FOREACH search_languages_loo IN 
>>> search_languages_loop %] [% IF ( search_languages_loo.selected ) %]
>>>                 <option value="ln,rtrn:[% 
>>> search_languages_loo.iso639_2_code %]" selected="selected">[% 
>>> search_languages_loo.language_description %]</option>
>>>                                                 [% ELSE %]
>>>                 <option value="ln,rtrn:[% 
>>> search_languages_loo.iso639_2_code %]">[% 
>>> search_languages_loo.language_description %]</option>
>>>                      [% END %]
>>>                                             [% END %]
>>>           </select>
>>>        </p>
>>>      <!-- /LANGUAGE LIMIT -->
>>> </fieldset>
>>>
>>> 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 at lists.katipo.co.nz
>>> https://lists.katipo.co.nz/mailman/listinfo/koha
>>
>> _______________________________________________
>> Koha mailing list  http://koha-community.org
>> Koha at lists.katipo.co.nz
>> https://lists.katipo.co.nz/mailman/listinfo/koha
> _______________________________________________
> Koha mailing list  http://koha-community.org
> Koha at lists.katipo.co.nz
> https://lists.katipo.co.nz/mailman/listinfo/koha



More information about the Koha mailing list