Syntax | translate <pStringID>, [<pPluralisation>], [<pFormattingArray>], [<pContextArray>], [<pDefaultText>], [<pLocaleID>]
|
Example | on mouseUp
answer translate("Due in %n days", -2)
end mouseUp
on mouseUp
local tFormattingArray
put "John" into tFormattingArray["name"]
put translate("Welcome %{name}", tFormattingArray)
end mouseUp
on mouseUp
local tFormattingArray, tContextArray
put "John" into tFormattingArray["name"]
put "male" into tContextArray["gender"]
put translate("%{name} updated their profile", tFormattingArray, tContextArray)
put "Jane" into tFormattingArray["name"]
put "female" into tContextArray["gender"]
put translate("%{name} updated their profile", tFormattingArray, tContextArray)
end mouseUp
on mouseUp
local tFormattingArray, tContextArray
put "John" into tFormattingArray["name"]
put "Buck's Night" into tFormattingArray["album"]
put "male" into tContextArray["gender"]
put translate("%{name} uploaded %n photos to their %{album} album", 1, tFormattingArray, tContextArray)
put "Jane" into tFormattingArray["name"]
put "Hen's Night" into tFormattingArray["album"]
put "female" into tContextArray["gender"]
put translate("%{name} uploaded %n photos to their %{album} album", 4, tFormattingArray, tContextArray)
end mouseUp
|