Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/iwatakeshi/gengojs-cookie-locale
A front end cookie locale setter for those who use gengojs
https://github.com/iwatakeshi/gengojs-cookie-locale
Last synced: 6 days ago
JSON representation
A front end cookie locale setter for those who use gengojs
- Host: GitHub
- URL: https://github.com/iwatakeshi/gengojs-cookie-locale
- Owner: iwatakeshi
- License: mit
- Created: 2014-12-22T22:41:36.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2014-12-23T00:43:08.000Z (about 10 years ago)
- Last Synced: 2024-03-18T01:11:03.671Z (10 months ago)
- Language: JavaScript
- Size: 402 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
gengojs-cookie-locale
=====================A front end cookie locale setter for those who use gengojs
This library requires:
* JQuery
* jquery-cookie###Usage
```html
$(document).ready(function () {
var gengo = gcl();
$('.en-us, .ja').click(function () {
gengo.setLocale(this);
})
});
```
###API
|Method |Description |Return |
|---------|--------------|---------|
|setLocale|Sets the cookie by either the class name from jquery's `this` object or the locale's string| |
###Option
|Option |Description|
|---------|-----------|
|cookieName| Sets the name of the cookie
Example:
```js
var gengo = new gcl({cookiName:'ihearti18n'});
```