Skip to content

Latest commit

 

History

History
17 lines (13 loc) · 419 Bytes

namespace.md

File metadata and controls

17 lines (13 loc) · 419 Bytes

Namespaces

It is possible that you need to create a plugin using its own translation. In this case, you can use the namespaces

// Initialize Language
Languages.init('fr_FR', 'core/languages/', () => {
   'hello'.t()
});

// Add namespace
Languages.add('fr_FR', 'plugins/my_plugin/languages/', 'plugin_name', () => {
   'plugin_name.hello'.t()
});

Use the add() method and add the plugin name (namespace)