Skip to content

Instantly share code, notes, and snippets.

@Xanir
Last active August 29, 2015 14:17
Show Gist options
  • Save Xanir/6dff36b4048a30fc5554 to your computer and use it in GitHub Desktop.
Save Xanir/6dff36b4048a30fc5554 to your computer and use it in GitHub Desktop.
Angular I18N Initalization Format
(function (angular) {
"use strict";
var mod;
try {
mod = angular.module(!*ANGULAR_PACKAGE*!);
} catch(e) {}
if (mod) {
mod.config(function ($translateProvider) {
var i18nValues = !*LOCALE_MAP*!;
$translateProvider.translations(!*LOCALE_CODE*!, i18nValues);
$translateProvider.use(!*LOCALE_CODE*!);
});
}
})(angular);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment