KDE4 proposal: Paths in i18n strings

Chusslove Illich caslav.ilic at gmx.net
Wed Jul 5 18:09:27 BST 2006

> [: Frans Englich :]
> Where something will end up isn't necessarily determined at compile
> time, but is a dynamic thing. It all depends on where messages will be
> redirected. [...]
> [...] I don't suggest that any widgets should be changed in anyway.
> (What makes you think that would be required?)

So, what then decides at runtime on formatting to be used?

Or perhaps I better clarify the other point:

> I would with interest see why my suggestion of adding a QString
> operator to KLocalizedString combined with letting i18n return
> KLocalizedString, doesn't hold.

Presently this can be done, that's what ki18n* functions are for:

KLocalizedString kstr = ki18n("Blah %1 blah %2").subs(arg1).subs(arg2);

One then needs to use toString() to get a QString:


The only thing missing is implicit conversion, since some people think it's 
evil. And there is no "compact" call to return KLocalizedString, because 
KLocalizedString's were not planned to proliferate around.

Chusslove Illich (Часлав Илић)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20060705/06bce34d/attachment.sig>

More information about the kde-core-devel mailing list