new UWA.Plugins.I18n(widget, options)
Examples
Using plugin in Widget Manifest:
<widget:plugins>
<widget:plugin name="I18n">
<widget:options name="fr">
<widget:option name="Hello" value="Bonjour" />
</widget:options>
</widget:plugin>
</widget:plugins>
Using plugin in Widget Javascript:
<script type="text/javascript" src="http://cdn.uwa.preview.netvibes.com/lib/c/UWA/js/UWA_Plugins_I18n.js"></script>
<script type="text/javascript">
var MyPlugin = UWA.Plugins.I18n(widget, {
fr: {
'Hello': 'Bonjour'
}
});
</script>
Using Exposition Server application.ini config file:
exposition.widget.libraries.I18n = "UWA_Plugins_I18n.js";
exposition.widget.plugins.I18n."Hello" = "Bonjour";
Parameters
Name | Type | Description |
---|---|---|
widget |
Object | |
options |
Object | Options hash or a option/value pair. |