<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="https://build2be.com"  xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>build2be/com/e - i18n</title>
 <link>https://build2be.com/category/i18n</link>
 <description></description>
 <language>en</language>
<item>
 <title>Langcodes and plural forms</title>
 <link>https://build2be.com/content/langcodes-and-plural-forms</link>
 <description>&lt;div class=&quot;field field-name-body field-type-text-with-summary field-label-hidden&quot;&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;We all know Drupal and Symfony do have multilingual support (i18n, l10n, pluralization). But do they match? Or do they equally well? How does one test this? This is what I did.

I wanted to add &lt;a href=&quot;https://github.com/symfony/symfony/pull/4412&quot;&gt;tests&lt;/a&gt; for Symfonfy&#039;s PluralizationRules as there were none and I wanted to have support for PluralForms loading Drupals *.po files clean and simple. How hard can it be?!?

These tests should cover:
&lt;ol&gt;&lt;li&gt;
Langcodes. Are all known language codes available (or easy to add)?
&lt;/li&gt;&lt;li&gt;
Parsing Gettext PluralForm rules like&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description>
 <pubDate>Sat, 26 May 2012 14:25:36 +0000</pubDate>
 <dc:creator>clemens</dc:creator>
 <guid isPermaLink="false">130 at https://build2be.com</guid>
 <comments>https://build2be.com/content/langcodes-and-plural-forms#comments</comments>
</item>
<item>
 <title>nationalise your site with enlisted variables</title>
 <link>https://build2be.com/content/nationalise-your-site-enlisted-variables</link>
 <description>&lt;div class=&quot;field field-name-body field-type-text-with-summary field-label-hidden&quot;&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;p&gt;With drupal we can enable the locale module and install the i18n module to internationalise and translate our site we can make our hands dirty by visiting the &lt;a href=&quot;http://build2be.com/admin/build/translate/search&quot;&gt;http://build2be.com/admin/build/translate/search&lt;/a&gt;. &lt;/p&gt;
&lt;p&gt;Still our work is not finished yet. We have to dive into &lt;em&gt;settings.php&lt;/em&gt; to translate more strings of our site.&lt;/p&gt;
&lt;p&gt;Taken from &lt;a href=&quot;http://drupal.org/node/275705#comment-1058360&quot;&gt;http://drupal.org/node/275705#comment-1058360&lt;/a&gt; and using &lt;a href=&quot;http://drupal.org/projects/drush_sm&quot;&gt;http://drupal.org/projects/drush_sm&lt;/a&gt; we learn we may choose from a lot of variables.&lt;/p&gt;
&lt;p&gt;By running the following command we can start cherry picking our variables enlisted to translate. We could off course run an SQL statement but that would spoil the fun.&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;drush sm list variables | less&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;
After deciding what variables we need we can export these variable values to send over to a translator by running&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;drush sm export variables - site_name site_slogan site_mission site_footer anonymous | less&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;
Next step is changing settings.php like this&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;$conf = array(
&amp;nbsp; &#039;i18n&#039; =&amp;gt; array(
&amp;nbsp;&amp;nbsp;&amp;nbsp; &#039;site_name&#039;,
&amp;nbsp;&amp;nbsp;&amp;nbsp; &#039;site_slogan&#039;,
&amp;nbsp;&amp;nbsp;&amp;nbsp; &#039;site_mission&#039;,
&amp;nbsp;&amp;nbsp;&amp;nbsp; &#039;site_footer&#039;,
&amp;nbsp;&amp;nbsp;&amp;nbsp; &#039;anonymous&#039;,
&amp;nbsp;&amp;nbsp;&amp;nbsp; &#039;user_mail_password_reset_subject&#039;,
&amp;nbsp; ),&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;
followed by uncommenting the line just after &#039;reverse_proxy_addresses&#039;&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;#&amp;nbsp;&amp;nbsp; &#039;reverse_proxy_addresses&#039; =&amp;gt; array(&#039;a.b.c.d&#039;, ...),
);&lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Not we told the i18n module to localise some of our site variables.&lt;/p&gt;
&lt;p&gt;It would be great to run &lt;code&gt;drush sm import variables&lt;/code&gt; for uploading our translated variables but unfortunately it doesn&#039;t work like that. The i18n module uses it&#039;s own tables for performance reason.&lt;/p&gt;
&lt;p&gt;So we end with navigating to the appropriate language dependent pages and see &lt;strong&gt;&#039;This is a multilingual variable&#039;&lt;/strong&gt; next to our form fields on pages like&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;Site Information
&lt;ol&gt;&lt;li&gt;&lt;a href=&quot;http://build2be.com/admin/settings/site-information&quot;&gt;http://build2be.com/admin/settings/site-information&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://build2be.com/nl/admin/settings/site-information&quot;&gt;http://build2be.com/nl/admin/settings/site-information&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://build2be.com/fr/admin/settings/site-information&quot;&gt;http://build2be.com/fr/admin/settings/site-information&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/li&gt;
&lt;li&gt;User Information
&lt;ol&gt;&lt;li&gt;&lt;a href=&quot;http://build2be.com/admin/user/settings&quot;&gt;http://build2be.com/admin/user/settings&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://build2be.com/nl/admin/user/settings&quot;&gt;http://build2be.com/nl/admin/user/settings&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://build2be.com/fr/admin/user/settings&quot;&gt;http://build2be.com/fr/admin/user/settings&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/li&gt;
&lt;li&gt;etc depending on what variables you added to &lt;em&gt;i18n_variables&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;Happy (inter)nationalise your site.&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;field field-name-taxonomy-vocabulary-4 field-type-taxonomy-term-reference field-label-above&quot;&gt;&lt;div class=&quot;field-label&quot;&gt;free form:&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;a href=&quot;/category/drush&quot;&gt;drush&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;field-item odd&quot;&gt;&lt;a href=&quot;/category/drushsm&quot;&gt;drush_sm&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;a href=&quot;/category/i18n&quot;&gt;i18n&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;field-item odd&quot;&gt;&lt;a href=&quot;/category/l10n&quot;&gt;l10n&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;a href=&quot;/category/planet-drupal&quot;&gt;planet drupal&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description>
 <pubDate>Fri, 13 Nov 2009 09:27:48 +0000</pubDate>
 <dc:creator>clemens</dc:creator>
 <guid isPermaLink="false">100 at https://build2be.com</guid>
 <comments>https://build2be.com/content/nationalise-your-site-enlisted-variables#comments</comments>
</item>
<item>
 <title>From _en_ into a translatable _en_</title>
 <link>https://build2be.com/content/en-translatable-en</link>
 <description>&lt;div class=&quot;field field-name-body field-type-text-with-summary field-label-hidden&quot;&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt;&lt;p&gt;On a multi language site it is desirable to translate the drupal English into the customers Englich likings.&lt;/p&gt;
&lt;p&gt;Steps taken&lt;/p&gt;
&lt;ol&gt;&lt;li&gt;Goto /admin/settings/language/add
&lt;ol&gt;&lt;li&gt;Add a custom languages with language prefix &lt;strong&gt;en&lt;/strong&gt;, name &lt;strong&gt;en-ours&lt;/strong&gt;, english &lt;strong&gt;English @ Our place&lt;/strong&gt; and native &lt;strong&gt;English @ Our Place&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Make your new language the default.&lt;/li&gt;
&lt;li&gt;Disable drupal&#039;s en&lt;/li&gt;
&lt;li&gt;Change the name &lt;strong&gt;en-ours&lt;/strong&gt; into &lt;strong&gt;en&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description>
 <pubDate>Mon, 25 May 2009 09:17:11 +0000</pubDate>
 <dc:creator>clemens</dc:creator>
 <guid isPermaLink="false">78 at https://build2be.com</guid>
 <comments>https://build2be.com/content/en-translatable-en#comments</comments>
</item>
</channel>
</rss>
