Preventing Warning Message from Cakephp
Message: Deprecated: Assigning the return value of new by reference is deprecated in...
Solution: Modify cake/libs/configure.php
< ?php
if (isset($config['debug'])) {
if ($_this->debug) {
error_reporting(E_ALL);
// add below contents
if (error_reporting() > 6143) {
error_reporting(E_ALL & ~E_DEPRECATED);
}
?>
2009年11月24日 星期二
2009年10月6日 星期二
My notes of jquery-translate usage
Effects:
Automatic distinguish between Simp Chinese and Trad Chinese then translate to desired language. Few steps to enable localization functionality.
Requirement:
#1. jquery Library. get from here.
#2. jquery-translate. get from here.
Procedures:
#1. Include all necessary JS file.
#2. Make sure all require JS file store in inc folder correctly.
#3. Content of wraper.trans.js
var lang = window.navigator.userLanguage || window.navigator.language ;
var autolang=lang.toLowerCase();
var trans2CN = (autolang == "zh-cn") ? true : false;
trans2CN = true;
$(document).ready(function() {
if(trans2CN){
document.navagation.src='/images/pic.gif';
$('body').translate('zh-CN');
}
});
Requirement:
#1. jquery Library. get from here.
#2. jquery-translate. get from here.
Procedures:
#1. Include all necessary JS file.
#2. Make sure all require JS file store in inc folder correctly.
#3. Content of wraper.trans.js
var lang = window.navigator.userLanguage || window.navigator.language ;
var autolang=lang.toLowerCase();
var trans2CN = (autolang == "zh-cn") ? true : false;
trans2CN = true;
$(document).ready(function() {
if(trans2CN){
document.navagation.src='/images/pic.gif';
$('body').translate('zh-CN');
}
});
訂閱:
文章 (Atom)