Topic: Hard Cover Tutorial #1: Making language dependent Terms of services
Starting with this topic I decided to share my own experience in customizing vldPersonals.
And as you already know the name of tutorials will be Hard Cover (don't ask me why : )
First tutorial is about customizing TOS pages considering different languages in your site. First of all I added new string to lang.core.php let's call it "lang":
"lang" =>
"en" , //add to english language file
and
"lang" =>
"ru" , //add to russian language file
and so on depending on your languages.
Those are very useful strings and we’ll use them often. Now let’s create terms of services using our CPanel. And naming them (label field) you need to use such approach: en_tos, ru_tos.
Now in footer.tpl in your templates folder instead of:
<a href="{virtual_path}{ifelse:system_enable_fancy_urls,"1","p/tos.html","index.php?m=pages&p=tos"}">Terms of service</a>
You have to use:
<a href="{virtual_path}"index.php?m=pages&p={lang:"core" ,"lang"}_tos">Terms of service</a>
Thus clicking this link user will be surprised a little, watching terms of service in it's own language.
As the homework: do "Terms of service" (in link) translation yourself if you think you need it.
Sincerely yours,
Radioactive
Last edited by radioact (2007-06-21 23:41:35)