vue-lang-code-flags

Vue component which shows the flag of the country from which the language comes from
38,986 12
Install
npm install vue-lang-code-flags
Latest Version:1.0.13
License:ISC
Last Updated:Nov 18, 2023
Links: GitHub  ·  npm
Maintainer: qwici

Flags by language codes

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

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:

  • in main.js you can mount it as a global Vue component:
import Vue from 'vue';
import LangFlag from 'vue-lang-code-flags';

Vue.component('lang-flag', LangFlag);
  • in a specific component (e.g.: Component.vue):
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

Property Description Type Value
iso ISO 639-1 identifier of the language String one of the values defined here

Optional properties

Property Description Type Default
squared Squared flag Boolean true
title Title String null

Available Flags

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

Language Code
Arabic ar
Armenian am
Azerbaijani az
Belarusian be
Bengali bn
Bulgarian bg
Chinese zh
Catalan ca
Czech cs
English en
Estonian et
French fr
German de
Hausa ha
Hindi hi
Hungarian hu
Italian it
Japanese ja
Javanese jv
Khmer km
Korean ko
Latvian lv
Malay ms
Marathi mr
Persian fa
Polish pl
Portuguese pt
Romanian ro
Russian ru
Spanish es
Swahili sw
Tamil ta
Telugu te
Thai th
Turkish tr
Uzbek uz
Vietnamese vi

Contributing

Please follow the guidelines here.

Related Packages

vue-country-flags

Vue country flags

4,083
@growthbunker/vueflags

One easy-to-use flag component for Vue.js with all ISO 3166-1 countries.

41,021 119
flags-dropdown-vue

World Flag Dropdown Vue

6,796 6
@placetopay/flagicons-vue

Vue icon flag components based on flagpack icons

6,998 1
@tabler/flags-vue

Country flags as Vue 3 components.

743 46

Version History

Version Released License
1.0.13 ISC
1.0.7 ISC
1.0.6 ISC
1.0.5 ISC
1.0.4 ISC