[Gambas-user] How to make strings translatable

Matti math.eber at ...221...
Mon Jul 26 22:44:14 CEST 2010


Thanks!
Now I understand it.
Matti


Am 26.07.2010 22:31, schrieb Benoît Minisini:
>> 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,
> 




More information about the User mailing list