D22069: Localize long number strings

Karl Ove Hufthammer noreply at phabricator.kde.org
Thu Oct 24 17:32:49 BST 2019


huftis added a comment.


  In D22069#553527 <https://phabricator.kde.org/D22069#553527>, @huftis wrote:
  
  > For non-localised formatting of numbers, use QString::number() instead of QLocale::toString(), as detailed in https://api.kde.org/frameworks/ki18n/html/prg_guide.html#subs_notes.
  
  
  I think I used the wrong link there. This one is more up to date and useful: https://techbase.kde.org/Development/Tutorials/Localization/i18n_Semantics
  
  The relevant quote is:
  
    <numid>
    By default, numbers supplied as arguments to i18n calls are formatted into localized form. If the number is supposed to be a numeric identifier instead, like a port number, use this tag to signal numeric-id environment.
    i18nc("@info:progress",
          "Connecting to <numid>%1</numid>...", portNo);

REPOSITORY
  R249 KI18n

REVISION DETAIL
  https://phabricator.kde.org/D22069

To: ngraham, #localization, #frameworks, broulik, aacid
Cc: flherne, dfaure, aacid, huftis, safaalfulaij, mikeroyal, aspotashev, ilic, kde-frameworks-devel, broulik, LeGast00n, GB_2, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20191024/0097b287/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list