Home

Awesome

Flags by language codes

Vue component which shows the flag of the country from which the language comes from

<p align="center"> <img src="https://img.shields.io/badge/vue%202.x-compatible-green.svg" alt="Vue.js 2 compatible"> <a href="https://www.npmjs.com/package/vue-lang-code-flags"><img src="https://img.shields.io/badge/npm-1.0.8-blue.svg" alt="Version"></a> <a href="https://www.npmjs.com/package/vue-lang-code-flags"><img src="https://img.shields.io/badge/license-MIT-green.svg" alt="License"></a> </p>

How to install

Get the package from NPM:

npm install vue-lang-code-flags --save
or
yarn add vue-lang-code-flags --save

How to use

Register LangFlag component in your app. You can use two approaches:

import Vue from 'vue';
import LangFlag from 'vue-lang-code-flags';

Vue.component('lang-flag', LangFlag);
import LangFlag from 'vue-lang-code-flags';

new Vue({
  components: {
    LangFlag,
  },
});

Then, after the proper mounting, in your template you can call it like this:

<lang-flag iso="en" />
<lang-flag iso="ja" :squared="false" />
<lang-flag iso="zh" title="Some title" />

API

Mandatory properties

PropertyDescriptionTypeValue
isoISO 639-1 identifier of the languageStringone of the values defined here

Optional properties

PropertyDescriptionTypeDefault
squaredSquared flagBooleantrue
titleTitleStringnull

Available Flags

Here follows the list of the currently available flags. They are identified using the ISO 639-1 standard.

LanguageCode
Arabicar
Armenianam
Azerbaijaniaz
Belarusianbe
Bengalibn
Bulgarianbg
Chinesezh
Catalanca
Czechcs
Dutchnl
Englishen
Estonianet
Frenchfr
Germande
Greekel
Hausaha
Hindihi
Hungarianhu
Indonesianid
Italianit
Japaneseja
Javanesejv
Khmerkm
Koreanko
Latvianlv
Malayms
Marathimr
Dutchnl
Persianfa
Polishpl
Portuguesept
Romanianro
Russianru
Spanishes
Swahilisw
Tamilta
Telugute
Thaith
Turkishtr
Uzbekuz
Vietnamesevi

Contributing

Please follow the guidelines here.