The file where available languages are statically wasn't properly referenced (lib/ instead of js/).

master
Filip Muki Dobranic 9 years ago
parent 53f7f3bb0a
commit 4a1321805a

@ -11,7 +11,7 @@ The translation concept follows similar concepts as GNU gettext:
2. Copy one of the files into your languages [two-letter ISO 639-1 code](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes#Partial_ISO_639_table), i.e. to `es.json` for a Spanish.
3. Open the file in a text editor and change the messages after the english message ID.
4. Save the file in UTF-8 character encoding.
5. Add your new language code into the array called `supportedLanguages` in `lib/zerobin.js` (around line 300).
5. Add your new language code into the array called `supportedLanguages` in `js/zerobin.js` (around line 300).
6. Done (Pull requests highly welcome!)
## Technical Details
@ -40,7 +40,7 @@ Some languages can have more then one plural forms. Which form to use depending
### Gotchas
Currently we do not inform the JS part about the available languages on the server, but instead these are statically encoded in the file `lib/zerobin.js` in the property `i18n.supportedLanguages` (around line 300). If you add a new language, remember to add it there, too.
Currently we do not inform the JS part about the available languages on the server, but instead these are statically encoded in the file `js/zerobin.js` in the property `i18n.supportedLanguages` (around line 300). If you add a new language, remember to add it there, too.
If your new language does use more complex plurals then English, you need to add the [formula](http://localization-guide.readthedocs.org/en/latest/l10n/pluralforms.html) for it in two places:
* [lib/i18n.php](https://github.com/elrido/ZeroBin/blob/master/lib/i18n.php) in class i18n, method _getPluralForm()

Loading…
Cancel
Save