<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p><font size="-1">Hi Roger,</font></p>
    <p><font size="-1">strings in Koha are either stored in the database
        (authorised values, item type descriptions, MARC field and
        subfield descriptions, etc.) or are part of the templates.<br>
      </font></p>
    <p><font size="-1">Strings in the templates are translated via the
        po files you have already seen. They are updated pre-release
        using the translation scripts - no manual editing is required. I
        think on the packages it works with: sudo koha-translate -u
        <langcode>. Or in koha-shell: cd misc translator, perl
        translate update <langcode>. TT variables will be
        automatically replaced by %s. For JavaScript there is a special
        syntax you can use that has the same effect.<br>
      </font></p>
    <p><font size="-1">You can find additional information about the
        translation process on the wiki: <br>
      </font></p>
    <p><font size="-1"><a class="moz-txt-link-freetext" href="https://wiki.koha-community.org/wiki/Translating_Koha">https://wiki.koha-community.org/wiki/Translating_Koha</a><br>
<a class="moz-txt-link-freetext" href="https://wiki.koha-community.org/wiki/Installation_of_additional_languages_for_OPAC_and_INTRANET_staff_client">https://wiki.koha-community.org/wiki/Installation_of_additional_languages_for_OPAC_and_INTRANET_staff_client</a></font></p>
    <p><font size="-1">There are also some coding guidelines concerning
        translation:</font></p>
    <p><font size="-1"><a class="moz-txt-link-freetext" href="https://wiki.koha-community.org/wiki/Coding_Guidelines">https://wiki.koha-community.org/wiki/Coding_Guidelines</a><br>
      </font></p>
    <p><font size="-1">As you have written the $type parameter is
        currently not used. The different fines and fees are
        differentiated in the database by their accounttype in
        accountlines. The code is translated into a description in the
        templates, which means there can be a translation for every
        installed language.</font></p>
    <p><font size="-1">Hope this helps,</font></p>
    <p><font size="-1">Katrin<br>
      </font></p>
    <font size="-1"></font>
    <div class="moz-cite-prefix"><font size="-1">On 18.11.2016 16:12,
        Roger Grossmann wrote:</font><br>
    </div>
    <blockquote
      cite="mid:16CC5887-3414-4B4C-96FD-B408FDE39655@lmscloud.de"
      type="cite">
      <pre wrap="">Hi all,

as a Koha development newbie I am having a few questions especially with localization. 
I am developing enhancements which I plan to bring in to the community hopefully soon. Your answers will help to make progress with it.

1st question
----------------
After looking at much Koha code I did not find a solution to build server side localized strings to persist localized text in the database. 
What do you recommend to use here?

Background: 
As you know, fines and fees are a sensitive area. Borrowers like to know exactly why they are charged and for what exactly. 
Lets assume, you want to store good localized name for the type of an overdue fine. 
It was for instance planned for function "UpdateFine" in C4::Overdues but the parameter $type is never filled as originally planned.
If an additional type name would be passed here, it needed to be a localized string since borrowers want to read the charge reason in their language.
As this is just an example for the use of a localized server text, the question is, whether there is already an approach to manage localised server side texts.
Ideally, server side texts would support parameter replacement that is not dependent of the position in the text as for instance with %s using sprintf.

2nd question
-----------------
I want to build some new UI functionality. The procedure how to do that with templates in english first is clear to me.
As I am German, I would like to build during development a first German version of the template as well and would like to extend the related German .po file.
How can I add the texts for a specific language in my development environment? 
Is there a way to extract the new texts of templates and add them to an existing .po file with a script and use poedit to translate them?
How do you do that?

Thanks in advance for your help.

Best regards,
Roger


--
Roger Großmann
LMSCloud GmbH
Konrad-Zuse-Platz 8 - D-81829 München
t +49 (0)89 207042-620  m +49 (0)171-2194775 f +49 (0)89 207042-623
e <a class="moz-txt-link-abbreviated" href="mailto:roger.grossmann@lmscloud.de">roger.grossmann@lmscloud.de</a>
w <a class="moz-txt-link-abbreviated" href="http://www.lmscloud.de">www.lmscloud.de</a>

_______________________________________________
Koha-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Koha-devel@lists.koha-community.org">Koha-devel@lists.koha-community.org</a>
<a class="moz-txt-link-freetext" href="http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel">http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel</a>
website : <a class="moz-txt-link-freetext" href="http://www.koha-community.org/">http://www.koha-community.org/</a>
git : <a class="moz-txt-link-freetext" href="http://git.koha-community.org/">http://git.koha-community.org/</a>
bugs : <a class="moz-txt-link-freetext" href="http://bugs.koha-community.org/">http://bugs.koha-community.org/</a></pre>
    </blockquote>
    <br>
  </body>
</html>