<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Tue, 18 Jun 2013 20:26:22 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[PHPMaster.com: Localizing PHP Applications "The Right Way", Part 5]]></title>
      <guid>http://www.phpdeveloper.org/news/17172</guid>
      <link>http://www.phpdeveloper.org/news/17172</link>
      <description><![CDATA[<p>
PHPMaster.com has posted the <a href="phpmaster.com/localizing-php-applications-5">fifth part</a> of their "Localizing PHP Applications 'The Right Way'" series, this time with a focus on extracting data from the .pot template files to define in your PHP. (This is the final part of the series.)
</p>
<blockquote>
In <a href="http://phpmaster.com/localizing-php-applications-4">Part 4</a> you learned how to use gettext for one of the most complex aspects of localization a developer can face, plural forms. In this, the final part of the five-part series, I'll teach you how you to automate part of the localization process by extracting msgids and generating a PO template file (.pot) from your application's PHP code.
</blockquote>
<p>
They show how to use the xgettext command-line tool to pull out strings from your source and automatically make them into a domain template. They help you set up three sample PHP files and run the xgettext command on them to pull out messages defined in the text of the files to set up keys in the template. Screenshots are included showing how to use Poedit to use these templates for your new translations.
</p>]]></description>
      <pubDate>Fri, 25 Nov 2011 14:58:09 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPMaster.com: Localizing PHP Applications "The Right Way", Part 4]]></title>
      <guid>http://www.phpdeveloper.org/news/17153</guid>
      <link>http://www.phpdeveloper.org/news/17153</link>
      <description><![CDATA[<p>
In the <a href="http://phpmaster.com/localizing-php-applications-4/">latest installment</a> of their "Localizing PHP Applications 'The Right Way'" tutorial series (part four), they show off a feature of <a href="http://php.net/gettext">gettext</a> that makes it simpler to deal with singular versus plural versions of your translations.
</p>
<blockquote>
In <a href="http://phpmaster.com/localizing-php-applications-3">Part 3</a> you learned some of the more important aspects of real-world localizing your application, such as using a default fallback locale and separating messages into multiple domain files depending on their usage. In this part I'll show you what is arguably the most powerful feature of gettext - handling plural forms. The plural forms feature of gettext you enable you to localize your application perfectly and professionally.
</blockquote>
<p>
The simple example they give is the difference between things like "1 file" versus "2 files". English is simpler than some other languages but gettext has special handling you can add to your translation files to help. A rule placed at the top of your file defines where to start the singular vs plural switch. 
</p>]]></description>
      <pubDate>Mon, 21 Nov 2011 10:58:31 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPMaster.com: Localizing PHP Applications "The Right Way", Part 3]]></title>
      <guid>http://www.phpdeveloper.org/news/17122</guid>
      <link>http://www.phpdeveloper.org/news/17122</link>
      <description><![CDATA[<p>
PHPMaster.com has posted its third part of its "Localizing PHP Applications 'The Right Way'" series. In <a href="http://phpmaster.com/localizing-php-applications-3/">this third part</a> you'll learn more about locales and message domain switching.
</p>
<blockquote>
In <a href="http://phpmaster.com/localizing-php-applications-2">Part 2</a> you gained more insight into using the gettext library by learning the most important functions of the extension. In this part you'll learn how to best use a fallback locale, switch between locales, and override the currently selected message domain.
</blockquote>
<p>
They show you how to set up the directory structure to handle a fallback locale, a choice to use when the system can't determine which to use. By using a default, you also avoid having the system translate from the default language to...the default language (like "English" to "English"). Included are also the code bits you'll need to switch between locales (just using a different domain) and using the <a href="http://php.net/dgettext">dgettext</a> function to specify a different domain than the selected one.
</p>]]></description>
      <pubDate>Mon, 14 Nov 2011 08:38:48 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPMaster.com: Localizing PHP Applications "The Right Way", Part 2]]></title>
      <guid>http://www.phpdeveloper.org/news/17076</guid>
      <link>http://www.phpdeveloper.org/news/17076</link>
      <description><![CDATA[<p>
PHPMaster.com has posted the <a href="http://phpmaster.com/localizing-php-applications-2">second part</a> of their series about localizing PHP applications "the right way" (hint: it uses <a href="http://php.net/gettext">gettext</a>).
</p>
<blockquote>
Welcome back to this series of articles which teach you how to localize your PHP applications using gettext and its PHP extension. In <a href="http://phpmaster.com/localizing-php-applications-1">Part 1</a> you took your first steps towards towards this by installing gettext and Poedit, creating a translation file, and writing a Hello World script. In this part you'll lean about each of the function used in the script, and dive more into the gettext library and its usage.
</blockquote>
<p>
The explain some of the naming conventions gettext uses for things (like "domains" and "codeset") as well as the shorthand "_()" you can use to retrieve translated values. There's also a look at supporting multiple locales via multiple directories of .po and .mo files.
</p>]]></description>
      <pubDate>Wed, 02 Nov 2011 15:05:03 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPMaster.com: Localizing PHP Applications "The Right Way", Part 1]]></title>
      <guid>http://www.phpdeveloper.org/news/17059</guid>
      <link>http://www.phpdeveloper.org/news/17059</link>
      <description><![CDATA[<p>
PHPMaster.com has a new tutorial sharing what they call the <a href="http://phpmaster.com/localizing-php-applications-1">right way for localizing PHP applications</a> with the help of PHP's <a href="http://php.net/gettext">gettext</a> functionality.
</p>
<blockquote>
Localizing software applications in general used to be a cumbersome and error-prone task resulting in a lot of messy code. Some developers even use different versions of code for the same application but for different locales, which makes managing the codebase practically impossible. Enter gettext, the wonderful open-source tool that will make your life easier by allowing you to concentrate on your code. Localization becomes a matter of writing separate translation files for the target language, which can easily be done by a translator using Poedit.
</blockquote>
<p>
They help you get your environment set up - PHP and a href="http://poedit.net/">Poedit</a>, a gettext catalog editor - for both linux- and Windows-based OSes. They walk you through the creation of a simple project and a few basic "hello world" tokens. Using the files is as easy as setting the correct locale and default domain for your application. Then output is just a basic echo away.
</p>]]></description>
      <pubDate>Mon, 31 Oct 2011 08:38:25 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[WebReference.com: Create a Localized Web Page with PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/15318</guid>
      <link>http://www.phpdeveloper.org/news/15318</link>
      <description><![CDATA[<p>
On WebReference.com there's <a href="http://www.webreference.com/programming/php/localization/">a new tutorial posted</a> about localizing your website by defining a character set to use for your content.
</p>
<blockquote>
The process of making your applications/websites usable in many different locales is called internationalization, While customizing your code for different locales is called localization. Localization is the process of making your applications or websites local to where it is being viewed. For example, you can make a website more local to a particular place by converting its text to the predominate language of that location and by displaying the local time (e.g. German for people living in Germany or French for people living in France).
</blockquote>
<p>
They show how to define constants that can be used in your application for the character set and language encoding. They use two major encodings - UTF-8 and ISO-8859-1 - in their examples of showing a sample "welcome" message in different languages. There's also a simple page to show you how to switch between languages if you'd like to give your visitors the option.
</p>]]></description>
      <pubDate>Thu, 21 Oct 2010 13:21:23 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPBuilder.com: Localizing a Web Page for Different Languages]]></title>
      <guid>http://www.phpdeveloper.org/news/6482</guid>
      <link>http://www.phpdeveloper.org/news/6482</link>
      <description><![CDATA[<p>
PHPBuilder.com excerpts once again from the Sams Publishing book "PHP 5 in Practice" today with <a href="http://www.phpbuilder.com/columns/white-eisenhamer20060915.php3">this new tutorial</a> showing a method for localizing web pages for different languages.
</p>
<blockquote>
Internationalization and localization of a web page is simply the act of setting it up to be able to handle displaying in multiple languages and adding those different languages in. There are many different ways in which to do this. One of the simplest is to just make sure that all your strings that you ever output are stored as variables or constants in an included file. That way, you can make multiple copies of that file,each with different language versions written into them. Just include the appropriate file for the language that you want to display.
</blockquote>
<p>
They <a href="http://www.phpbuilder.com/columns/white-eisenhamer20060915.php3">show the creation</a> of the different language PHP files that will be included and the master "language.php" that works with the under's input to switch to the correct language (and set a cookie to save the preference).
</p>]]></description>
      <pubDate>Wed, 11 Oct 2006 15:36:00 -0500</pubDate>
    </item>
  </channel>
</rss>
