Demo

Probiere ClanSphere aus und teste daran herum. Demo


Antworten: 5
Seite [1]
DooM


Beginner




Beiträge: 4
# Thema - 23.11.2012 um 00:46 Uhr
Hello,
How to make the links in index.htm page multilingual?
I mean there is predefined links in English, I want to make the links switch language when user choose another language.

for example:
<li><a href="{url:news_recent}">News</a></li>
I want to make the 'News' word change according to user defined language.

How can I do it?

Does this system being maintained? I didn't saw any new version since that last release...

Thanks!
Inaktiv
Deaktiviert

Supporter
Supporter



Beiträge: 1287
# Antwort: 1 - 23.11.2012 um 10:42 Uhr
The system is maintained, but not developing in a further version.

I answered you concerning your topic in the other thread.


Inaktiv
|
jelivco


Beginner




Beiträge: 1
# Antwort: 2 - 05.01.2014 um 08:38 Uhr
hello Schalla
can you copy and paster this topic link?


Inaktiv
|
ev0lution


Geekboy





Beiträge: 1102
# Antwort: 3 - 05.01.2014 um 10:20 Uhr
05.01.2014 um 08:38 Uhr - jelivco:
hello Schalla
can you copy and paster this topic link?


http://csphere.eu/index/board/thread/where/17399


------------------


Inaktiv
|
testerjoe


Wannabe poster




Beiträge: 23
# Antwort: 4 - 06.01.2014 um 16:43 Uhr
here, but on your own risk..

changes in cachegen.php
 
1.
2.
3.
1. / 2. / ... 
 function cs_cache_template($filename) {

  global 
$cs_main;


change to >>
 
1.
2.
3.
1. / 2. / ... 
 function cs_cache_template($filename) {

  global 
$cs_main$cs_lang;


and
 
1.
1. / 2. / ... 
   $tpl_data preg_replace_callback('={url(?:_([\w]*?))?:([\w]*?)(?:_([\w]*?)((?::(?:(?:[\S]*?{[\S]*?}[\S]*?)*?|[\S]*?))*?))?}=i''cs_templateurl'$tpl_data);


change to >>
 
1.
2.
1. / 2. / ... 
   $tpl_data preg_replace_callback('={url(?:_([\w]*?))?:([\w]*?)(?:_([\w]*?)((?::(?:(?:[\S]*?{[\S]*?}[\S]*?)*?|[\S]*?))*?))?}=i''cs_templateurl'$tpl_data);
  
$tpl_data preg_replace_callback("={lang:([\S]*?)}=i"'cs_templatelang'$tpl_data);


now you can use in index.htm:
 
1.
1. / 2. / ... 
 <li><a href="{url:joinus_new}" id="navlink">{lang:joinus}</a></li>


here an lang-switcher:
 
1.
2.
3.
4.
1. / 2. / ... 
 <div id="banner">
            <
div id="enlink"><a href="{url:news_recent:lang=English}" title="to english side"><span id="langlink"></span></a></div>
            <
div id="delink"><a href="{url:news_recent:lang=German}" title="zur deutsch Seite"><span id="langlink"></span></a></div>
        </
div>


the lang-variables have to defined in: "lang/English/system/main.php" eq "lang/German/system/main.php"


Inaktiv
|
Jam2 ClanSphere Team


Highlander





Beiträge: 3291
# Antwort: 5 - 09.01.2014 um 12:48 Uhr
Did anybody can give me response if the codepaste is working?

(I want to add the post to my linklist.)


------------------
Gruß/ Best regards
Jam2

Nützliche Forumbeiträge/Codepastes: (Useful comments in our board / codepastes)
Template Switch for index.php
Board Navlist last posts

Edi: könnte man denn auch hier eine erweiterung einfügen?
Jam2: das web ist wie toyota.....
Edi: hö ?
Jam2: nichts ist unmöglich!


Inaktiv
|
Antworten: 5
Seite [1]


Sie müssen sich registrieren, um zu antworten.