News Feed
Sections




News Archive
feed this:

Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

SitePoint PHP Blog:
Implementing Multi-Language Support
April 16, 2014 @ 12:18:39

The SitePoint PHP blog has a new post from Jacek Barecki talking about a few ways you can include multi-language support in your PHP applications. There's not much in the way of actual code here, but there are links to some other tools that can help get the job done.

Setting up a multilingual site may be a good way to attract new customers to your business or gain more participants in your project. Translating a simple site with a few static pages probably won't probably be complicated, but more complex PHP web applications may require a lot of work when launching multiple language support. In this article I'll present different types of content that need to be taken under consideration when internationalizing a site.

He breaks it down into five different types of content that you might want to translate:

  • Multi-language Static Content
  • Database content
  • User submitted content
  • Resources (images, videos, etc)
  • Other types of content

He wraps it up with a few recommendations including making a checklist of the things you want to translate to figure out what tools you need to use.

0 comments voice your opinion now!
multilanguage support implementation content type

Link: http://www.sitepoint.com/implementing-multi-language-support/

PHPMaster.com:
Multi-Language Support in CodeIgniter
April 04, 2013 @ 12:52:02

New on PHPMaster.com there's a tutorial by Rakhitha Nimesh about using the multi-language support to CodeIgniter applications. This functionality is included as a default part of the framework using internal language files.

Multi-language support, also known as internationalization, is a key feature of modern web applications. Most of the full-stack PHP frameworks come with multi-language support which enables us to dynamically present our application's interface in different languages without duplicating the existing source code for each language. Today we're going to discuss how we can enable multiple languages using CodeIgniter as well as a few tricks to customize the core functionality.

He shows where in the configuration to set the default language and where you'll need to put the language files so CodeIgniter can find them. Sample code shows how to load in the language files and how to pass certain values out to the view for display. He also includes an example of using CodeIgniter's own hooks system to call the language file load via a "LanguageLoader" class after the controller instance is created.

0 comments voice your opinion now!
codeigniter tutorial multilanguage language file

Link: http://phpmaster.com/multi-language-support-in-codeigniter/

CodeForest.net:
Multilanguage support in Zend Framework
September 06, 2011 @ 12:27:40

In a new post over on CodeForest.net there's a guide from Zvonko Biskup about using the multi-language support in the Zend Framework, specifically implementing gettext support.

We can not imagine a modern web application without a multi language support. I will show you how easy it is to setup usage of multiple languages in Zend Framework and how to setup some basic language routes (handy for SEO stuff). The Zend Framework offers many ways for you to store your translated strings. It could be an array, a CSV or XML file or you could use gettext which we will be using today.

He introduces the topic by answering the question "why gettext?" with two reasons - the simplicity of editing the gettext files and the fact that Apache caches the resulting ".mo" files. He includes the code to set up a Zend_Translate object in your bootstrap and calling the "translate()" method in your views to handle the hard work. He briefly touches on using PoEdit to work with the gettext files and how to drop those into your ZF application's structure to make them available. Finally, he sets up some automatic routing you can easily use to switch languages based on something like a cookie or session value.

0 comments voice your opinion now!
multilanguage zendframework gettext poedit tutorial


Robert Basic's Blog:
A hack for Zend Framework's translated route segments
April 15, 2011 @ 09:17:40

Robert Basic has put together a new post to his blog about a hack he's found for the Zend Framework translated route segments when a "gotcha" popped up when he was trying to use them in a multi-language website.

The web site's default locale, language, is English. If the user has no locale in the session/cookie, she, or he, will get the English version of the web site. [...] But! If the user's first visit is on the http://example.com/vesti URL ("vesti" is "news" in Serbian), the router can't route that because it depends on the locale and the default locale is English and not Serbian, thus directing the user to the 404 page.

To get around this issue he created a front controller plugin that fires in the postDispatch hook to change the locale manually if the current request's isn't found to be English. It then redirects the user to the correct location for the new language and things proceed normally.

0 comments voice your opinion now!
zendframework hack multilanguage route segment issue


Community News:
Komodo IDE 4.0 Released
January 24, 2007 @ 09:45:00

As mentioned by both Sean Coates and the International PHP Magazine, ActiveState has release the latest version of their popular development environment - Komodo IDE 4.0.

Komodo IDE 4.0 is the first unified workspace for end-to-end development of dynamic web applications. A rich feature set for client-side Ajax languages such as CSS, HTML, JavaScript and XML, coupled with advanced support for dynamic languages such as Perl, PHP, Python, Ruby and Tcl, enables developers to quickly and easily create robust web apps.

Komodo is all about simplicity and helping you write your code. This includes features like a multi-language editor, integrating sharing abilities, the ability to create Firefox-like extensions to add to other applications, and full customization settings to make your worspace your own.

Find out more about the software on Komodo's page or just head over and buy this latest version for a discounted rate of $245 USD. There's also a trial copy you can download and check out before spending the cash.

0 comments voice your opinion now!
komodo release multilanguage editor ide sharing extension komodo release multilanguage editor ide sharing extension



Community Events





Don't see your event here?
Let us know!


deployment tips package interview community opinion series install release language zendserver framework introduction podcast update library laravel list symfony api

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework