Multi Language Country List

Developer

outline4

3rd Party (Commercial)


EE Version Support

  • ExpressionEngine 2

Compatibility

If an item is crossed out, it might be untested, not applicable or incompatible. Contact the developer to be sure.

  • Updater
  • Multi Site Manager
  • Stand Alone Entry Form
  • Low Variables
  • Content Elements
  • Better Workflow
  • Matrix
  • Grid
  • Webservice
  • Publisher

Requirements

  • jQuery for the Control Panel

Add-On Type(s)

Plugin

Tags

Multi Language Country List is a plugin that lets you output a list of countries in the language you choose. It comes with 7 predefined languages (default, english, french, german, italian, russian, spanish) and you can easily add your own. You can use it as a select drop-down, unordered list, just display one country or anything else you'd like.

If you want to add your own language, it’s as easy as creating a new folder within the language folder and reference it via the language parameter.

Parameters:

     
  • language: language folder name. Like ‘english’, ‘french’, ‘german’, ‘italian’, ‘russian’, ‘spanish’ etc. Defualt value: ‘default’
  •  
  • type: It may be either “alpha2” or “alpha3”. If you give “alpha2” then other parameter like show, hide and selected should have alpha2 values. If you give “alpha3” then other parameter like show, hide and selected should have alpha3 values. Default value: ‘alpha2’
  •  
  • show: alpha code separated with pipe operator(”|”). The values of this parameter will depend on type parameter. Means you have to provide same alpha type code which provided into “type” parameter. It’s case in-sensitive.
  •  
  • hide: alpha code separated with pipe operator(”|”). The values of this parameter will depend on type parameter. Means you have to provide same alpha type code which provided into “type” parameter. It’s case in-sensitive.
  •  
  • orderby: one of parameter can paased: alpha2, alpha3, country and file. Please Note: If you are giving orderby parameter as file then countries will be sorted as according to language file. Default value: ‘file’
  •  
  • sort: either desc or asc

Variables:

     
  • {country_count}: country count. Starting at 1.
  •  
  • {country_total_results}: the total number of counties.
  •  
  • {country_alpha2}: country alpha2 code in upper case.
  •  
  • {country_alpha3}: country alpha3 code in upper case.
  •  
  • {country_name}: name of the country.
  •  
  • {iso_number}: country ISO number

Examples

Example 1:

     <label for="country_code">Your country</label>
     <select name="country_code" id="country_code">
         <option value="">Please choose your country</option>
         {exp:country_list:countries language="german"}
             <option value="{country_alpha2}"{if "{country_code}" == "{country_alpha2}"} selected="selected"{/if}>{country_name}</option>
         {/exp:country_list:countries}    	
     </select>

Example 2:

     <label for="country_code">Your country</label>
     <select name="country_code" id="country_code">
         <option value="">Please choose your country</option>
         {exp:country_list:countries type="alpha2" orderby="alpha2" sort="asc" show="gb|us|in" hide="in" language="german"}
             <option value="{country_alpha2}"{if "{country_code}" == "{country_alpha2}"} selected="selected"{/if}>{country_name}</option>
         {/exp:country_list:countries}
     </select>

Example 3:

     <ul>
         {exp:country_list:countries type="alpha2" orderby="alpha2" sort="asc" show="gb|us|in" hide="in" language="german"}
             <li>{country_name}</li>
         {/exp:country_list:countries}
     </ul>

Example 4:

     {exp:country_list:countries type="alpha2" show="{member_country_code}" language="{language}"}{country_name}{/exp:country_list:countries}

Known Limitation

     
  • only one plugin per template.
  •  
  • requires UTF-8.
  •  
  • “orderby” it not working for non-latin characters.
  •  
  • countries may be called differently.

Version History

     
  • 1.0.2 - initial release

This entry was created October 11, 2012, 8:57 am.
This entry was last updated February 10, 2013, 12:44 pm.

Disclaimer: Information about ExpressionEngine add-ons is provided as a service to you, the user, and every member of the ExpressionEngine community. devot:ee is not responsible if you hose, mangle, wreck, or otherwise destroy your EE website by installing an add-on that you found out about at this site, regardless of its rating, Favorites status, commercial or free status, or general popularity. Caveat EEmptor!

Returns: devot:ee has a 30-day return policy on all commercial add-ons sold through devot-ee.com. If you need to return an add-on, do not go to the developer or the developer's site, but rather visit our returns page at https://devot-ee.com/returns to initiate your return. If you have questions, email support@devot-ee.com.

There are no reviews for this add-on yet.

What are you waiting for? Rate it and review it!