Load the localization files

Print

This is probably the trickiest part. The names of the countries are localized, but using the component from within another component does require you to manually load the language files of the former component.

Since Krizalys Countries has its translation files located in its own language folder, here is a code snippet you can place in your view, before calling display(), to achieve this:

Print

  1. $language = JFactory::getLanguage();
  2. $tag = $language->getTag();
  3. $extension = 'com_krizalys_countries';
  4. $language->load($extension, JPATH_ADMINISTRATOR . '/components/' . $extension, $tag, true);