Giter Site home page Giter Site logo

qwici / vue-lang-code-flags Goto Github PK

View Code? Open in Web Editor NEW
12.0 3.0 15.0 39 KB

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

License: MIT License

Vue 53.12% JavaScript 41.66% TypeScript 5.22%
vue-components flags vuejs2

vue-lang-code-flags's Introduction

Flags by language codes

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

Vue.js 2 compatible Version License

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
Dutch nl
English en
Estonian et
French fr
German de
Greek el
Hausa ha
Hindi hi
Hungarian hu
Indonesian id
Italian it
Japanese ja
Javanese jv
Khmer km
Korean ko
Latvian lv
Malay ms
Marathi mr
Dutch nl
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.

vue-lang-code-flags's People

Contributors

albertovincenzi avatar dasawanaka avatar donhekus avatar itsrafsanjani avatar mheers avatar parsher avatar qwici avatar renovate-bot avatar renovate[bot] avatar saniales avatar sergiormb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

vue-lang-code-flags's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

This repository currently has no open or pending branches.

Detected dependencies

github-actions
.github/workflows/publish-package.yml
npm
package.json
  • flag-icons ^7.0.0

  • Check this box to trigger a request for Renovate to run again on this repository

"squared" property type is not correctly evaluated

Following the explanations of "README.md":

<lang-flag iso="ca" squared=false title="a title..." />

I rececived this message on console:

[Vue warn]: Invalid prop: type check failed for prop "squared". Expected Boolean, got String with value "false".

Missing USA flag

the United states flag (which is quite common) is missing, please add it

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.