i18n() issue

David Faure faure at kde.org
Mon Dec 8 18:11:17 GMT 2003

On Monday 08 December 2003 19:01, Rob Kaper wrote:
> I have a new string (in a branch, don't worry) which gives me some problems
> with i18n():
> i18n("Join %1's %2 Game").arg( player->name() ).arg( game->name() )
> If the player name contains "%1", this will result in nonsense like "Join
> Monopoly's %2 Game" instead of "Join Rob's Monopoly Game". I'm not willing
> to concatenate the string together myself, as this can cause problems with
> word order in translations.

i18n("Join %1's %2 Game").arg( player->name(), game->name() )
This requires Qt-3.1 I think (or 3.2?).

David FAURE, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).

More information about the kde-core-devel mailing list