new locale and language switch

In order to create a new locale and enable a dual language switch, is it correct to do the following?

1) use something like poedit to create the locale, then store it in app/locale (perhaps also in pawtucket github so it is available for everyone?)

2) edit the php header file in pawtucket/themes/default/views/pageFormat adding something like (I found this in the forum - not sure exactly where in pageFooter.php it should be placed):

<li class="lang-en <?php print ($g_ui_locale == 'en_US') ? 'active' : ''; ?>"><?php print caChangeLocaleLink($this->request, 'en_US', '<span>English</span>', 'myClass', ['hreflang' => 'en', 'title' => 'English']); ?></li>

<li class="lang-it <?php print ($g_ui_locale == 'it_IT') ? 'active' : ''; ?>"><?php print caChangeLocaleLink($this->request, 'it_IT', '<span>Italian</span>', 'myClass', ['hreflang' => 'it', 'title' => 'Italian']); ?></li>

Comments

Sign In or Register to comment.