developing cakephp multilingual website (language management)

On my previous “developing cakephp multilingual website” article I as advising you to do a management for languages db table for site administrator, It seems a lot of readers do not understand what will be the management I am asking to write. Sorry for that, Now I am attaching a zip file to show what to do with “do a management for languages db table for site administrator”, It has 2 screenshot, 1 controller, 1 model of language table and view files for a sample.

There are a lot of extra codes on view files which is required for my projects, You just advised to follow the steps or structures.

Merry Christmas to all

Download Attachment

my ongoing project dropncms.com

I know how to code a website using wordpress, joomla, phpfox, dzoic handshakes, oscommerce, zencart, creloaded, magento and also some other cms. Hopefully very soon I am going to add another one dropncake. May be you are ready to ask what it is? Just wait for a few days, I will let you know what is dropncake. For a brief definition up to now, I can say, “dropncake is a cakephp php framework based Content Management System, which will be released under dropncms!”

Yes, we are going to release it’s version 1.0.0 beta under dropncms very soon. At dropndot we are working hard to finish the project as soon as possible. Hopefully by December 2011 first week we can release it. So, Keep in touch for a cool and yummy cake!

developing cakephp multilingual website

To develop any multilingual website (Translated database content only) using cakephp framework all basic steps are discussed below. If you want fully multilingual website with translated button text or label text then go forward with Internationalizing your application
To manage multiple language translated content for any specific models specific field cakephp has a core behavior named TranslateBehavior.
Suppose we want a website with multiple number of language support and site administrator can add/edit/delete any language and front-end user can choose any language to visit the website.
Here are the list of steps given below.
Step 1: Create a db language table

CREATE TABLE `languages` (
  `id` int(11) NOT NULL auto_increment,
  `title` varchar(120) NOT NULL,
  `flag` varchar(100) default NULL,
  `code_2_digit` varchar(2) NOT NULL,
  `code_4_digit` varchar(6) NOT NULL,
  `created` datetime NOT NULL,
  `modified` datetime NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

now do a management for languages db table for site administrator
Read More

article title to url slug with cakephp

If you are using cakephp framework for your web application development. Sometimes you need to create SEO friendly url slug from your article / post / page / news etc title.

If a article title is “Article title to url slug with cakephp” then your SEO friendly url slug supposed to be “article-title-to-url-slug-with-cakephp”

To create this kinds of url slug from a string you can use cakephp core utility class Inflector, The Inflector takes a string and manipulate it to handle some common words variations.

To make slug from string using Inflector you can use below written code in your controller:

< ?php

$str = 'Article title to url slug with cakephp';

// Converting string into slug with separator 
$str = Inflector::slug($str,'-');

$str = strtolower($str); //article-title-to-url-slug-with-cakephp

?>

For your multiple use you can create a common method on your application controller like
Read More

dropnwish, a facebook wishlist application

If you have a list of wishes which you want to share with your friends or other facebook user then you are quietly invited on dropnwish facebook application to use it. This application is very easy to use for it’s nice usability. Using this application you can browse all of your friends and other facebook users wishes who are on dropnwish and you can find what kinds a wish would be from different peoples wishes.

it’s developed under dropnot limited recently by me. currently it’s on version 1.0 beta with listing add/edit/delete management, listing sharing on facebook, listing discussion, facebook like management etc. within next few day there will be another version with some cool features also. so keep in touch!
Read More