Socket
Socket
Sign inDemoInstall

jquery.language

Package Overview
Dependencies
3
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    jquery.language

A simple, lightweight jQuery plugin for handling languages


Version published
Weekly downloads
1
Maintainers
1
Created
Weekly downloads
 

Readme

Source

jquery.language Build Status Code Climate

This plugin helps managing browser languages. It looks for a url param or the navigator language and stores the language in a cookie.

Usage

javascript

$.language({
  active: 'auto',
  fallback: 'de',
  available: ['en', 'de']
});

console.log($.language()); //prints de or en

$.language('de') //sets the language

coffee script

$.language
  active: 'auto'
  fallback: 'de'
  available: [
    'en'
    'de'
  ]

console.log $.language() #prints de or en

$.language 'de' #sets the language

Dependencies

Parameter

active

auto - default, means try to detect from url param, cookie, navigator or use fallback
or a available language

fallback

language that is used if no language could be detected

available

array of allowed languages, default is ['en']

urlParam

name of the url param to watch for, default is 'language'

cookieName

name of the cookie for language storing, default is 'language'

Contributing

Check out the Contributing Guidelines

Authors

Tom Hanoldt

Keywords

FAQs

Last updated on 28 May 2015

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc