strolch-wc-localize-behavior/strolch-wc-localize-behavio...

21 lines
726 B
HTML
Raw Normal View History

<link rel="import" href="../app-localize-behavior/app-localize-behavior.html">
<script>
// custom behaviour accessing the configuration above
StrolchLocalizeBehaviorImpl = {
attached: function() {
2017-09-12 15:11:05 +02:00
var locale = Strolch.getUserLocale();
// load the language resource of the configured language
2017-09-12 15:11:05 +02:00
this.language = locale;
2017-03-08 16:34:42 +01:00
this.useKeyIfMissing = true;
2017-09-12 15:11:05 +02:00
console.log('Loading locales ' + this.localesPath);
this.loadResources(this.resolveUrl(this.localesPath));
}
};
// inherit the behavior of the standard polymer localization
StrolchLocalizeBehavior = [Polymer.AppLocalizeBehavior, StrolchLocalizeBehaviorImpl];
</script>