You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The first argument of the localize method is the name of the language pack. You might have a different language pack for different parts of your website.
51
42
@@ -71,8 +62,8 @@ if the language of the browser also had a country code, like "fr-FR", then the p
71
62
72
63
This let's you define partial language refinements for different regions. For instance, you can have the base language translation file for a language that translates 100 different phrases, and for countries were maybe a some of those phrases would be out of place, you can just provide a country-specific file with _just those special phrases_ defined.
73
64
74
-
Skipping Languages (aka Optimizing for My Language)
75
-
------------------
65
+
## Skipping Languages (aka Optimizing for My Language)
66
+
76
67
This is useful if you've got a default language. For example, if all of your content is served in english, then you probably don't want the overhead of loading up unecessary (and probably non-existant) english langauge packs (foo-en.json)
77
68
78
69
You can tell the localize plugin to always skip certain languages using the skipLanguage option:
@@ -88,13 +79,11 @@ You can tell the localize plugin to always skip certain languages using the skip
88
79
# using an array of strings will skip if any of the strings matches exactly
You can provide a callback if you want to augment or replace the default callback provided by the plugin. Your callback should take at least 1 argument: the language data (contents of your json file). It can optionally accept a second argument, which is a reference to the default callback function. This is handy if you still want the default behavior, but also need to do something else with the language data.
135
123
@@ -143,8 +131,20 @@ You can provide a callback if you want to augment or replace the default callbac
143
131
144
132
See the tests for working examples.
145
133
146
-
Credits & Licensing
147
-
-------------------
134
+
# Contributing
135
+
136
+
This plugin is written in [CoffeeScript](http://jashkenas.github.com/coffee-script/).
137
+
The included `builder` script will run `coffee` with the necessary flags to
138
+
automatically update the compiled javascript in the build/ directory any time you
139
+
save changes to the coffee code under src/.
140
+
141
+
If you're interested in contributing, please fork the [repository](https://github.com/coderifous/jquery-localize),
142
+
make your changes, and send pull-requests.
143
+
144
+
Learn more about [how to fork](http://help.github.com/fork-a-repo/) and
0 commit comments