CakePHP: Internationalizing a web application - Design and Examples? - cakephp

I have a web application built using CakePHP framework and now I am in the process of internationalizing it. I started with the base set-up as outlined in the below article -
http://puskin.in/blog/2010/08/cakephp-manage-multiple-language-in-application/
and also add little bit of customization based on my previous question -
CakePHP: Internationalizing Web Application
To completely internationalize my web app, I would need to translate my drop-down/look-up content as well, like - categories, favorites, countries, bucket list etc.
What is the best way to design my tables and CakePHP samples? Can someone explain with a simple example and classes? Links or articles?
Lets say we have something like -
A user can create multiple posts, and each post has a category [science article, match article] etc in the drop-down and same we need to internationalize drop-down as well.

Two hints:
Read the manual of cakephp.
Look into the code of a available application (maybe croogo)

My open source project is translated.
It call CandyCane. A port of Redmine into CakePHP.
I also imported translation files from Redmine, so CandyCane supports numbers of languages from the beginning.
https://github.com/yandod/candycane
It might be helpful for you.

Related

In Drupal should I use content-types or database abstraction layer?

I posted a question on the Drupal forum about whether I should build my database in Drupal using content-types or the database abstraction layer and schema module: [here][1]
Any advice would be greatly appreciated.
[1]: https://drupal.stackexchange.com/questions/98020/should-i-use-content-types-or-database-abstraction-layer
I'd recommend using content types.
For a PHP coder, sometimes using the Drupal User Interface to build things feels non-intuitive, but in the long run you're going to benefit a lot from doing things "the drupal way.
Once you reverse engineer your need into a content type and all it's associated fields, install the modules that provide those field types and set things up, you'll start to see the benefits.
Validation on all the data-entry froms will already be done for you.
Multiple display modes are available for your data (email addresses can be shown with or without mailto: links, images can be shown using any of Drupal's image styles)
Integration with other Drupal modules already exists, and will be supported (almost anything built with fields is available to views)
By writing your own schema you'll need to handle all these things yourself (and more), and not just once, but you'll need to maintain all that custom code over time.
Learn to leverage the community and all the great work that's been done already, you'll save yourself time in the long run :)
What i see you are going to have shop site.
You may tray this:
https://drupal.org/project/commerce_kickstart
, i've found it usefull once. It's drupal distribution with nice themed shop rady to use straight forward.
And of course do it with content type + views + entity reference modules.
Here is a link to a comment that answers the question I asked. It backs up what arpitr outlined in their answer on the orignal post on the drupal forum, whose answer is also in agreement with jenlampton's suggestion above.
https://drupal.org/comment/7848011#comment-7848011
I will implement my system using node entities until the need arises to build a custom entity (if it ever does).
The top answer in this forum give a good way to evaluate whether to use nodes or custom build an entity:
https://drupal.stackexchange.com/questions/22586/when-is-it-appropriate-to-create-an-entity-versus-just-adding-a-new-content-type

Joomla or cakePHP for designing application without limitation?

I've only touched the top of the iceberg of Joomla and cakePHP. There is so much to learn. But on top of learning I want to build something useful as well.
Joomla is the easiest to set up and is very agile if I wanted to get things up and running with concepts that are already in use out there. That is, I can install different components and extensions that are developed by other uses. The problem here is that I'm limited to other people's imagination and vision. What if I wanted something specific and no components or extension meets my needs, I would need to build my own. Which brings me to the question: -
Should I learn how to develop custom components/extensions in Joomla, or learn cakePHP to truly be capable of engineering my own application to suit all my needs?
Here is the application that I want to build through my learning - an integration of all of the below component each able to interact with one another:
A blog
A forum
A user participating recipe book
User calendar
Image gallery
Yes there is alot that I want to do, but it's all in the name of learning. I really want to be able to have an application which has an integration of all the above components which works smoothly together. For example, when a user submits a recipe or a blog this is written to their Calendar. Another example, user will be able to share their recipe/image gallery within their blog, without the reader having to navigate away. Another example, images can be tagged with recipe or ingredients of the recipe.
I'm starting on a clean slate, so I'm really looking for some opinion on which one I should stick to to achieve what I want to do. And which one will have a steeper learning curve?
For a forum, you could use Kunena.
Image Gallery, Blog and User Calendar should be easy enough to find.
As for the Recipe Book, if you are willing to purchase an extension then the ZOO app by Yootheme might be an idea, or you could allow users to submit standard Joomla articles and use a comments component such as JComment

display a calendar function on lots of different websites

first of all, please excuse my ignorance, this is an exploratory question, rather than a specific programming program that needs solving.
I have a number of clients that have unique websites, none of which I was involved in developing. I would like them to be able to display a calendar of common events, but which would also contain events unique to them.
Is it possible using something like Server Side Includes to be able to give them a few lines of code which they could insert into their website (on any particular page) which might display a calendar type display, which their users can then interact with?
I guess I am looking for something similar to a Google calendar but I do not want to use a Google calendar. The key thing would be that they would only need to insert the few lines of code on one of their webpages; they wouldn't have to install any software on their servers.
Any suggestions?
Thanks
Damien
There are are all sorts of web calendars that will allow you to include them on a web page (typically using javascript, not SSI). Some are targeted at specific platforms (ie, Wordpress) and some are more generic.
Try searching "web calendar widget" for examples.
You'd have to put some amount of content on their site. If you can do that, you can include some javascript that will load more javascript from the server side that can do the bulk of the calendaring work for you.
You wouldn't be able to just drop a few files on the server and have them work, you'd need some way to link to them by changing the existing content on at least one of the pages.
I may be misunderstanding your question though.
If you are looking for specific recommendations on web calendar widgets, Arshaw's fullcalendar is my favorite to date.
It displays a great calendar that can be easily styled with css or jquery ui themeroller and is very programmable. The website has great documentation and examples as well.
Per using it on different sites, it supports that easily.
Note, I'm not affiliated with that calendar at all, just a satisfied customer.

Blogging with CakePhp

I have a cakePhp application built, and now I'm creating a simple blog based on our activities (much like blog.stackoverflow.com).
What blogging plugins / software are most commonly used with CakePhp? Wordpress? lilblogs?
Just a few pointers in the right direction would be helpful.
You can install Wordpress, then if you want create CakePHP models which map to the Wordpress tables, then bake out the controllers etc if you really wanted to. I've done this a few times, as an easy way to get CakePHP to render recent wordpress articles.
Have a read about Models in the book, which will tell you how to build a custom model. http://book.cakephp.org/view/66/Models
There are a lot of applications specific to cakephp but you really should know about the resources that are available for free when you get into this venture.
Try these 10 Essential Blogging Tools for Every Blogger Should Use.

Which is the easier CMS to integrate with CakePHP?

I was trying develop a website with Cakephp and Joomla... But lately I've been founding a lot of barriers that create difficulties implementing things that would have been a lot easier if I only developped using one of the components.
So, in your point of view (as someone with more experience than me), is it worth to integrate CakePhp with a CMS?
If yes, what do you think its the best and easier CMS to integrate with?
Or use Croogo (http://croogo.org/)
A CakePHP CMS. I like Croogo's implementation more than Wildflower and the admin UI looks a bit similar to Wordpress.
From my point of view i wouldn't try. I think there would be a lot of crossover functionality and a lot of conflict. Either use Cake and write a CMS and the other elements you want or pick a CMS and develop the other elements you want as add-ins/plugins.
Joomla, Drupal, Xaraya, Expression-engine etc are all extensible so pick the one that is the best fit and has the ability to be extended or maybe already has plugins you require.
Another option would be to use Joomla as the CMS and Cake for the other element you want, keep them as separate entities but skin then identically and make the navigation seamless. In this case about the only thing you would need to integrate would be state.
There are some out there already that are on Cake from the ground up. Wildflower for example
http://wf.klevo.sk/
I have a cakephp site that is running wordpress in it's public_html/blog folder and it is doing great.
They are basically two separate sites, with two separate backend but it is fairly easy to create a model for the wordpress database if you want to pull in any data (eg. posts, pages, comments) and use it in the cakephp site.
As far a integrating the two I don't think it is a good idea if it needs to be a seamless experience for the backend users, most frontend users won't notice the difference because you can use the same style sheet and images.
If you want any more about my experiences with the combination let me know!
Cakeui is a rip of Croogo. Infinitas CMS could be what you're looking for if you want a full blown application or check this site for a list of good CakePHP Cms
As the developer of Croogo, I will be biased and recommend you to check it out at http://croogo.org. It comes with a web based installer too and you should be up and running in minutes.
Another CakePHP based CMS is Infinitas which has more features (including shopping cart). Both are based on the latest version of the framework (1.3 at the moment) and are actively developed.
I wrote a lot of CMS type apps with Cake and was thinking along the same lines. I've tried Joomla, Drupal and Wordpress but still had a dirty feeling in my mouth that I was failing by using Cake just for the sake of it or vice versa.
The most important common denominator, in my experience, is the back-end. It is re-used most often, but gets the least input.
Now I have built my own CMS with CakePHP. The intention is to 'opensource' it, but it's not quite ready yet.
I don't think it is worth the headache trying to combine, then maintain Cake and a 3rd party CMS. Save your best modules and components and build your own. The blog tutorial will give you a good head start and you can cherrypick what you like from other sources, rewriting it to suit your ideals. The benefit is you will then know the CMS inside out and have it working just the way you want. You'll learn a lot along the way as well.

Resources