Open Gromov-Roman opened 7 years ago
@kaycebasques It is already explained in the README file
<dom-module id="x-app">
<template>
<div>{{localize('hello', 'name', 'Batman')}}</div>
</template>
<script>
Polymer({
is: "x-app",
behaviors: [
Polymer.AppLocalizeBehavior
],
properties: {
language: {
value: 'en'
},
resources: {
value: function() {
return {
'en': { 'hello': 'My name is {name}.' },
'fr': { 'hello': 'Je m\'apelle {name}.' }
}
}
}
});
</script>
</dom-module>
It is for one file, I must use
behaviors: [ Polymer.AppLocalizeBehavior ],
properties: {
language: { value: 'en' },
resources: {
value: function() {
return {
'en': { 'hello': 'My name is {name}.' },
'fr': { 'hello': 'Je m\'apelle {name}.' }
}
}
}
}
in any file?
Good day!
How can I announce language and json files in one main html, and use just {{locale('something')}} or some any function in all my html files?
Many thanks for your attention!