<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    check which translation contains missed strings and install it with
    translators also, i just greped translations folder myself to find
    this <span style="font-family:monospace,monospace">sailfishsilica-qt5.<br>
    </span><br>
    <div class="moz-cite-prefix">24.04.2015 21:25, Dmitriy Purgin пишет:<br>
    </div>
    <blockquote
cite="mid:CA+y33ySxfK809ko-F_=WYoUzRWEfMLnGcZT0gL6hU=2YNh014Q@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>
          <div>Thanks, didn't look at the
            QCoreApplication::installTranslator().<br>
            <br>
          </div>
          <div>I used the sample piece you provided as follows (mind
            dash as prefix):<br>
            <br>
            <span style="font-family:monospace,monospace">translator.load(locale,
              "sailfishsilica-qt5", "-", "/usr/share/translations");</span><br>
          </div>
          <div><br>
          </div>
          Anyway, it seems to do only part of the job, which is strange
          considering it contains all the strings needed. E.g. I get
          days of week translated, but months aren't, as well as remorse
          "in %1 seconds" text.<br>
          <br>
        </div>
        <div>Since startup time is not crucial for me at the moment I'll
          check on that whole invoker stuff some time later. Thanks for
          your help!<br>
        </div>
        <div><br>
        </div>
        Cheers<br>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">2015-04-24 21:37 GMT+06:00 Andrey
          Kozhevnikov <span dir="ltr"><<a moz-do-not-send="true"
              href="mailto:coderusinbox@gmail.com" target="_blank">coderusinbox@gmail.com</a>></span>:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div bgcolor="#FFFFFF" text="#000000"> So, you install
              multiple translators, not load multiple times, and it will
              work.<br>
              <br>
              <div>24.04.2015 20:23, Dmitriy Purgin пишет:<br>
              </div>
              <div>
                <div class="h5">
                  <blockquote type="cite">
                    <div dir="ltr">
                      <div>
                        <div>
                          <div>
                            <div>Hi Andrey,<br>
                              <br>
                            </div>
                            thanks for suggestion. Unfortunately,
                            according to Qt documentation for
                            QTranslator::load():<br>
                            <br>
                            > The previous contents of this
                            translator object are discarded.<br>
                            <br>
                          </div>
                          So you load either sailfishsilica-qt5 or
                          strings for your application. <br>
                          <br>
                        </div>
                        Regards<br>
                      </div>
                      Dmitriy<br>
                      <div>
                        <div>
                          <div>
                            <div><br>
                            </div>
                          </div>
                        </div>
                      </div>
                    </div>
                    <div class="gmail_extra"><br>
                      <div class="gmail_quote">2015-04-23 11:01
                        GMT+06:00 Andrey Kozhevnikov <span dir="ltr"><<a
                            moz-do-not-send="true"
                            href="mailto:coderusinbox@gmail.com"
                            target="_blank">coderusinbox@gmail.com</a>></span>:<br>
                        <blockquote class="gmail_quote" style="margin:0
                          0 0 .8ex;border-left:1px #ccc
                          solid;padding-left:1ex">
                          <div bgcolor="#FFFFFF" text="#000000"> This is
                            my solution for you:<br>
                            <br>
                            <br>
                            <tt>    QLocale locale("fi_FI");</tt><tt><br>
                            </tt><tt>    QLocale::setDefault(locale);</tt><tt><br>
                            </tt><tt>    translator.load(locale,
                              "sailfishsilica-qt5", "",
                              "/usr/share/translations", "");</tt><br>
                            <br>
                            <div>23.04.2015 08:55, Dmitriy Purgin пишет:<br>
                            </div>
                            <div>
                              <div>
                                <blockquote type="cite">
                                  <div dir="ltr">
                                    <div>
                                      <div>
                                        <div>Hi,<br>
                                          <br>
                                        </div>
                                        thanks for reply. <br>
                                        <br>
                                      </div>
                                      I do install custom translations
                                      with
                                      QApplication::installTranslator()
                                      and it does work on Sailfish but
                                      as I mentioned before formatting
                                      facilities and system messages
                                      stay in OS language. <br>
                                      <br>
                                    </div>
                                    Regards<br>
                                  </div>
                                  <div class="gmail_extra"><br>
                                    <div class="gmail_quote">2015-04-23
                                      0:07 GMT+06:00 Ove Kåven <span
                                        dir="ltr"><<a
                                          moz-do-not-send="true"
                                          href="mailto:ovek@arcticnet.no"
                                          target="_blank">ovek@arcticnet.no</a>></span>:<br>
                                      <blockquote class="gmail_quote"
                                        style="margin:0 0 0
                                        .8ex;border-left:1px #ccc
                                        solid;padding-left:1ex"><span>Den
                                          22. april 2015 18:56, skrev
                                          Dmitriy Purgin:<br>
                                          <blockquote
                                            class="gmail_quote"
                                            style="margin:0 0 0
                                            .8ex;border-left:1px #ccc
                                            solid;padding-left:1ex"> $
                                            LANG=ru_RU invoker
                                            --type=silica-qt5 appbin<br>
                                            <br>
                                            does not  change the app
                                            locale, it behaves as if
                                            there were no<br>
                                            LANG=ru_RU at all. So does
                                            QLocale::setDefault().<br>
                                          </blockquote>
                                          <br>
                                        </span> I think setting
                                        environment variables and
                                        calling QLocale::setDefault only
                                        works if Qt has not yet been
                                        initialized. Since the invoker
                                        has already initialized Qt,
                                        changing the default locale is
                                        probably impossible.<br>
                                        <br>
                                        It seems possible to force Qt to
                                        use different translations,
                                        though, with
                                        QApplication::installTranslator.
                                        Just load the necessary Russian
                                        translations and install them,
                                        and Qt will use them. There's an
                                        example on <a
                                          moz-do-not-send="true"
                                          href="http://wiki.qt.io/How_to_create_a_multi_language_application"
                                          target="_blank">http://wiki.qt.io/How_to_create_a_multi_language_application</a>,
                                        but not sure how it would work
                                        on Sailfish...
                                        <div>
                                          <div><br>
                                            <br>
_______________________________________________<br>
                                            SailfishOS.org Devel mailing
                                            list<br>
                                            To unsubscribe, please send
                                            a mail to <a
                                              moz-do-not-send="true"
                                              href="mailto:devel-unsubscribe@lists.sailfishos.org"
                                              target="_blank">devel-unsubscribe@lists.sailfishos.org</a><br>
                                          </div>
                                        </div>
                                      </blockquote>
                                    </div>
                                    <br>
                                  </div>
                                  <br>
                                  <fieldset></fieldset>
                                  <br>
                                  <pre>_______________________________________________
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to <a moz-do-not-send="true" href="mailto:devel-unsubscribe@lists.sailfishos.org" target="_blank">devel-unsubscribe@lists.sailfishos.org</a></pre>
                                </blockquote>
                                <br>
                              </div>
                            </div>
                          </div>
                          <br>
_______________________________________________<br>
                          SailfishOS.org Devel mailing list<br>
                          To unsubscribe, please send a mail to <a
                            moz-do-not-send="true"
                            href="mailto:devel-unsubscribe@lists.sailfishos.org"
                            target="_blank">devel-unsubscribe@lists.sailfishos.org</a><br>
                        </blockquote>
                      </div>
                      <br>
                    </div>
                    <br>
                    <fieldset></fieldset>
                    <br>
                    <pre>_______________________________________________
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to <a moz-do-not-send="true" href="mailto:devel-unsubscribe@lists.sailfishos.org" target="_blank">devel-unsubscribe@lists.sailfishos.org</a></pre>
                  </blockquote>
                  <br>
                </div>
              </div>
            </div>
            <br>
            _______________________________________________<br>
            SailfishOS.org Devel mailing list<br>
            To unsubscribe, please send a mail to <a
              moz-do-not-send="true"
              href="mailto:devel-unsubscribe@lists.sailfishos.org">devel-unsubscribe@lists.sailfishos.org</a><br>
          </blockquote>
        </div>
        <br>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to <a class="moz-txt-link-abbreviated" href="mailto:devel-unsubscribe@lists.sailfishos.org">devel-unsubscribe@lists.sailfishos.org</a></pre>
    </blockquote>
    <br>
  </body>
</html>