Re: [Vala] string format with numbered parameters



Hi,

2018-05-20 17:39 GMT+01:00 rastersoft <raster rastersoft com>:
Hi all:

I want to know if it is possible to use "numbered parameters" to format an
string. I mean: let's say I have this translatable string:

var str = _("The disk %s, with size %s, is ready").printf(disk_uid,
disk_size);

But imagine that in language XXX it is more correct to put first the disk
size, and after the disk identifier. Is it possible to "number" the
parameters, to say "put here the second string" and "put here the first
string", to allow translators to swap the parameters in the string?

You don't need to do anything, the translators can translate the above
string as "xxx xxxx %2$s xx xxxx xxx xxx %1$s" to have things appear
in the correct order.

HTH,

Abderrahim


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]