I've got this javascript string:
"<!--:fr-->Photos<!--:--><!--:en-->Pictures<!--:-->"
And I need to parse it to get every "language" in distinct strings. The ideal would be to have a function like:
function getText(text, lang){
// get and return the string of the language "lang" inside the multilang string "text"
}
That I can call like that:
var frenchText = getText("<!--:fr-->Photos<!--:--><!--:en-->Pictures<!--:-->","fr");
// and would return:
// frenchText = Photos
If anyone know a good way to do that, probably with a regexp that would be FANTASTIC!!!