[Gambas-user] How to make strings translatable
Benoît Minisini
gambas at ...1...
Mon Jul 26 22:31:13 CEST 2010
> Hi List,
>
> I don't understand this:
> If I have a string like
> IF Message.Warning("The file " & aFiles[i] & " will be deleted.", "OK",
> "Cancel") = 2 THEN RETURN
> How should I mark it to be translated?
> If I use
> IF Message.Warning(("The file ") & aFiles[i] & (" will be deleted."), "OK",
> ("Cancel")) = 2 THEN RETURN
> there are two strings to be translated, and the togetherness is lost.
>
> Thanks
> Matti
>
You *must* use the Subst() function, and write:
If Message.Warning(Subst(("The file &1 will be deleted."), aFiles[i]),
("OK"), ("Cancel")) = 2 Then Return
Because the grammar changes with the language.
Regards,
--
Benoît Minisini
More information about the User
mailing list