You are missing our premiere tool bar navigation system! Register and use it for FREE!

NukeCops  
•  Home •  Downloads •  Gallery •  Your Account •  Forums • 
Readme First
- Readme First! -

Read and follow the rules, otherwise your posts will be closed
Modules
· Home
· FAQ
· Buy a Theme
· Advertising
· AvantGo
· Bookmarks
· Columbia
· Community
· Donations
· Downloads
· Feedback
· Forums
· PHP-Nuke HOWTO
· Private Messages
· Search
· Statistics
· Stories Archive
· Submit News
· Surveys
· Theme Gallery
· Top
· Topics
· Your Account
Who's Online
There are currently, 435 guest(s) and 0 member(s) that are online.

You are Anonymous user. You can register for free by clicking here
Changing block title base on language
PHP-Nukethainuke writes "Easy way to change the title name of block base on the language people select.
If a user use english the title to be in english, if the user choose thai the title in thai.
Here is the quickly way !!!

Open the file mainfile.php
in function blocks($side) {
...
Search:
$title = $row[title];
Replace with:
$title = translate($row[title]);
...
}

And your language file (language/lang-XXX.php)
in function translate($phrase) {
...
Add your title name of block in your language etc.
case "Languages": $tmp = "ภาษา"; break;
case "Who's Online": $tmp = "ผู้ใช้งานขณะนี้"; break;
case "Modules": $tmp = "เมนูหลัก"; break;
case "Survey": $tmp = "แบบสำรวจ"; break;
case "Login": $tmp = "เข้าระบบ"; break;
case "Search": $tmp = "ค้นหา"; break;
case "Information": $tmp = "แหล่งข้อมูล"; break;
case "Old Articles": $tmp = "บทความที่ผ่านมา"; break;
case "Big Story of Today": $tmp = "เรื่องใหญ่ประจำวัน"; break;
...
} "
Posted on Tuesday, December 16 @ 10:28:18 CET by Zhen-Xjell
 
Related Links
· More about PHP-Nuke
· News by Zhen-Xjell


Most read story about PHP-Nuke:
PHP-Nuke new development direction (part 2)

Article Rating
Average Score: 5
Votes: 4


Please take a second and vote for this article:

Excellent
Very Good
Good
Regular
Bad


Options

 Printer Friendly Page  Printer Friendly Page

 Send to a Friend  Send to a Friend

Threshold
The comments are owned by the poster. We aren't responsible for their content.

No Comments Allowed for Anonymous, please register

Re: Changing block title base on language (Score: 1)
by Q on Tuesday, December 16 @ 19:47:46 CET
(User Info | Send a Message) http://3GuysHosting.com
Hey, great idea!!!
I also adapted it to work with the Block-Modules so the main menu can change also...
Thanks again,
Mike


Powered by TOGETHER TEAM srl ITALY http://www.togetherteam.it - DONDELEO E-COMMERCE http://www.DonDeLeo.com - TUTTISU E-COMMERCE http://www.tuttisu.it
Web site engine's code is Copyright © 2002 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Page Generation: 0.221 Seconds - 178 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::