Translations:Help:Extension:ParserFunctions/2373/en

You can also use a parameter as the test string in your $2 statement. You need to ensure you add the $1 (pipe symbol) after the name of the variable.