peterkahl/continent-names-multilingual

Converts continent code to full name in many languages.

v1.5 2018-06-28 04:34 UTC

README

Downloads Download per Month License If this project has business value for you then don't hesitate to support me with a small donation.

Converts continent code to full name in 17 languages (and/or script variations).

  • Arabic (عربى)
  • Czech (čeština)
  • German (Deutsch)
  • Danish (dansk)
  • English
  • Spanish (Español)
  • French (français)
  • Hebrew (עִברִית)
  • Italian (italiano)
  • Japanese (日本語)
  • Dutch (Nederlands)
  • Portuguese (Português)
  • Russian (русский)
  • Slovak (slovenčina)
  • Chinese simplified (中文简体)
  • Chinese traditional (中文繁體)
  • Welsh (Cymraeg)

Usage

use peterkahl\Continent\Continent;

# These are examples of COUNTRY CODE >>> CONTINENT CODE
echo Continent::Country2ContinentCode('cn');     # AS (China is in Asia)
echo Continent::Country2ContinentCode('HU');     # EU (Hungary is in Europe)

# These are examples of CONTINENT CODE >>> CONTINENT NAME
echo Continent::getContinentName('as', 'he');    # אַסְיָה
echo Continent::getContinentName('EU', 'ru');    # Европа
echo Continent::getContinentName('af', 'zh-tw'); # 非洲
echo Continent::getContinentName('sa', 'cy');    # Sydamerika