I have a data string which contains 3 different language content enclosed in corresponding tags.
/[langStart-en] and //[langEnd-en] for English
/[langStart-ar] and //[langEnd-ar] for Arabic
/[langStart-fr] and //[langEnd-fr] for French
A language code will be passed as parameter through the url, say for
eg. if the language is English, the url will be
article.php?lang = EN,
for Arabic article.php?lang = AR and
for French article.php?lang = FR.
I want to detect the Language and remove the contents for other languages from the string.
Hope this make sense
I have a quick solution for you. Please check if it works.. You should be able to optimize the logic, but I hope this will help you to make it working.
Please check and let me know if you find any issues.