About language picker

This jQuery plugin allows you to add a language picker to easily display a list of languages in your Bootstrap form. This language picker can be used along with our select jQuery plugin. There is also an option to display the country flags.

Examples

Example for loading the list of languages and selecting a default language

<select class="form-control bfh-languages" data-language="en"></select>

Example for loading the list of languages with country names

<select class="form-control bfh-languages" data-language="en_US" data-available="en_US,fr_CA,es_MX">
</select>

Example for loading the list of languages and flags using Bootstrap Form Helpers' Select Box

<div class="bfh-selectbox bfh-languages" data-language="en_US" data-available="en_US,fr_CA,es_MX" data-flags="true">
</div>

Example for displaying the language name and flag from language code

<span class="bfh-languages" data-language="en_US" data-flags="true"></span>

Available languages

  • English (US)

Options

Option Description
language Two letters country code. Can also append _ with two letters country code to display country code or flag. To select a language. Required when blank is set to false. Default: ''
available Comma separated list of two letters language code. Can also append _ with two letters country code to display country code or flag. To restrict the list of languages. Default: ''
flags Boolean. To show the country flags. Default: false
blank Boolean. To show a blank option. Default: true

If using our select jQuery plugin, refer to this documentation for a list of additional options.

Methods

If using our select jQuery plugin, refer to this documentation for a list of methods.

Events

If using our select jQuery plugin, refer to this documentation for a list of events.