-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 30d8dd6
Showing
10 changed files
with
886 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/*.sublime-* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
Copyright (c) 2012 Benoît Bar | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
jQuery Translate | ||
================ | ||
|
||
:Info: jQuery Translate is a translation plugin for jQuery. Is very useful in static html page. | ||
:Author: Benoît Bar (http://github.com/benoitbar, http://www.scopart.fr/) | ||
|
||
Instructions | ||
============ | ||
|
||
Include the script in your page | ||
|
||
... | ||
<script src="js/jquery.translate.min.js"></script> | ||
... | ||
|
||
Add a css class for all html tag content you want to translate | ||
|
||
... | ||
<p class="trans">My text to translate</p> | ||
... | ||
|
||
Call the plugin or without options | ||
|
||
$('.trans').translate({ | ||
lang : 'en', | ||
url : '/local/', // Determine the url where the translation file are | ||
showTranslations : false // Show a strutured translation file in browser console | ||
}); | ||
|
||
or | ||
|
||
$('.trans').translate(); | ||
|
||
Options | ||
======= | ||
|
||
*lang* (optional) : Determine the language to translate to. Set to browser language by default. | ||
|
||
*url* (optional) : Determine the url where the translation files are. Set to /local/ by default. You must create one file by language naming them <language>.json. For example fr.json, en.json, ... | ||
|
||
*showTranslations* : Show a strutured translation object in browser console. Set to false by default. You can set this parameter to true and then copy the object displayed in the browser console and paste it into your language json files. | ||
|
||
Utils | ||
===== | ||
|
||
You can get browser language by calling i18n.getLang() | ||
|
||
License | ||
======= | ||
|
||
jQuery Translate is Copyright © 2012 Benoît Bar. It is free software, and may be redistributed under the terms specified in the LICENSE file. |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.