CakePHP: Multilingual application using URL routes


Here is a simple tutorial on how to develop a multilingual cakephp application through URLs, After having as desired number of language translation files in /app/Locale we want to direct the application to direct the application to use each language through URL prefix like http://www.application.com/eng/pages/about/ and http://www.application.com/ara/articles/view/123 1- First add this route to the default … Continue reading CakePHP: Multilingual application using URL routes

Problem with Apache 2 on linux not reading .htaccess files


I had a problem with my apache2 configuration that it seems not reading .htaccess files at all, I tried many solutions but nothing worked until I found this question on stackoverflow I'm not convinced with the solution but it worked fine for me ------------------------------------------------------------------------------------------------- To get this working, I added the following to /etc/apache2/httpd.conf (which is a … Continue reading Problem with Apache 2 on linux not reading .htaccess files

How to detect client browser?


/****** Browser Detection ******/ function testCSS(prop) { return prop in document.documentElement.style; } var isOpera = !!(window.opera && window.opera.version); // Opera 8.0+ var isFirefox = testCSS('MozBoxSizing'); // FF 0.8+ var isSafari = Object.prototype.toString.call(window.HTMLElement).indexOf('Constructor') > 0; // At least Safari 3+: "[object HTMLElementConstructor]" var isChrome = !isSafari && testCSS('WebkitTransform'); // Chrome 1+ var isIE = /*@cc_on!@*/false || … Continue reading How to detect client browser?