Hi everyone,
I am developing a website with different languages; user can change the language based on his preferences.
The text with different languages are stored in SQL database: English, Indonesian.
So far so good, until I stumble upon the following text:
"Click here to view the details"
where the "Click here" is a link.
I store the sentence in DB as the following:
en:
<a href="%LINK%">Click here</a> to view the details.
id:
<a href="%LINK%">Klik di sini</a> untuk melihat detail.
and then I apply str_replace to change the %LINK% to the link to display.
Is there a better way to do this?
What is the best Yii practice for this?
Please advise.
Thanks in advance.
Regards,
Ron