i have already succesfully translated some quotes via my translation function __(); and now I want to echo only one of those quotes at random. All quotes are separated in this string with a special character like a |
Sofar I only have this. What code could should go below this tackle my random echo?
$quotes =
__("IF YOU MAKE EVERYTHING BOLD, NOTHING IS BOLD") . "|" .
__("Quality of design is an indicator of credibility") . "|" .
__("People ignore design, that ignores people");
(An important restriction: it is essential that the quotes be exactly closed with __(" and "); sothat they can be checked and translated.) __($variable) doest not work with current clean up scripts that I have bought so these won’t work.
You’re already calling
__()on each of your quotes individually, why not save all the extra translating and do something like:Edit: To satisfy your other requirement, that the call to
__()must immediately surround each string, you could do this:The big downside here is that you’re now looking up a translation for every string in that array, even though only one is printed, but that’s the same situation you had in the “one big string” solution.