<commit_before>cordova-plugin-globalization (source: https://github.com/apache/cordova-plugin-globalization)


This plugin obtains information and performs operations specific to the user's locale, language, and timezone.
Note the difference between locale and language: locale controls how numbers, dates, and times are displayed for a region, 
while language determines what language text appears as, independently of locale settings. Often developers use locale to set both settings,
but there is no reason a user couldn't set her language to "English" but locale to "French", so that text is displayed in English but dates, times, etc.,
are displayed as they are in France. Unfortunately, most mobile platforms currently do not make a distinction between these settings.

Supported Platforms are:

    Amazon Fire OS
    Android
    BlackBerry 10
    Firefox OS
    iOS
    Windows Phone 8
    Windows
    Browser

via navigator.globalization.getPreferredLanguage you get the client's current language.<commit_msg>added some documentation on the new module and the new plugin<commit_after>The app now uses the __[cordova-plugin-globalization](https://github.com/apache/cordova-plugin-globalization/)__ plugin:

- obtains information and performs operations specific to the user's locale, language, and timezone
- via navigator.globalization.getPreferredLanguage you get the clients currently set language 
- via navigator.globalization.getLocaleName you get the clients currently set locale
	(locale controls how numbers, dates, and times are displayed for a region)
- android only has an option for language, which also sets locale, but you can set them independently on some other platforms

The actual translation is done via the new AngularJS module __[angular-translate](http://angular-translate.github.io/)__:

- Components (filters/directives) to translate your contents
- Asynchronous loading of i18n data
- Pluralization support using __[MessageFormat.js](https://github.com/SlexAxton/messageformat.js/)__
- Expandability through easy to use interfaces
- very good documentation
- also offers support for Right-to-Left Languages, with non latin letters like arabic (see eg. __[here](https://www.sitepoint.com/multilingual-support-for-angularjs/)__)

The setup is very easy. After including the module, you write this:

    app.config(['$translateProvider', function ($translateProvider) {
      $translateProvider.translations('ar', {
        'TITLE': 'مرحبا',
      });
     
      $translateProvider.translations('de', {
        'TITLE': 'Hallo',
      });
     
      $translateProvider.preferredLanguage('en');
    }]);

And then in your html you use the key and let angular know that you want this translated:

	<h1>{{ 'TITLE' | translate }}</h1>

{'fraction_non_alphanumeric': 0.07450271247739602, 'fraction_numerical': 0.002531645569620253, 'mean_word_length': 4.4129158512720155, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 4, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6470289', 'n_tokens_mistral': 705, 'n_tokens_neox': 680, 'n_words': 304}