pwix:app-pages-i18n
What is it ?
A package which extends the pwix:app-pages
packages to provide some helpers for the application internationalization:
- extends the semantic of the environmnet settings to have a
wantLanguageSwitch
property.
Provides
AppPagesI18n
The exported AppPagesI18n
global object provides following items:
Functions
AppPagesI18n.configure()
See below.
A reactive data source.
AppPagesI18n.environmentWantSwitch()
Whether the environment settings have defined a wantLanguageSwitch
to true
, defaulting to false
.
A reactive data source.
Configuration
The package's behavior can be configured through a call to the AppPagesI18n.configure()
method, with just a single javascript object argument, which itself should only contains the options you want override.
Known configuration options are:
-
verbosity
Define the expected verbosity level.
The accepted value can be any or-ed combination of following:
-
AppPagesI18n.C.Verbose.NONE
Do not display any trace log to the console
-
AppPagesI18n.C.Verbose.CONFIGURE
Trace
AppPagesI18n.configure()
calls and their result -
AppPagesI18n.C.Verbose.FUNCTIONS
Trace functions calls
-
Please note that AppPagesI18n.configure()
method should be called in the same terms both in client and server sides.
Remind too that Meteor packages are instanciated at application level. They are so only configurable once, or, in other words, only one instance has to be or can be configured. Addtionnal calls to AppPagesI18n.configure()
will just override the previous one. You have been warned: only the application should configure a package.
NPM peer dependencies
Starting with v 0.1.0, and in accordance with advices from the Meteor Guide, we no more hardcode NPM dependencies in the Npm.depends
clause of the package.js
.
Instead we check npm versions of installed packages at runtime, on server startup, in development environment.
Dependencies as of v 1.0.0:
1 'lodash': '^4.17.0', 2 '@vestergaard-company/js-mixin': '^1.0.3'
'lodash': '^4.17.0',```
Translations
New and updated translations are willingly accepted, and more than welcome. Just be kind enough to submit a PR on the Github repository.
Cookies and comparable technologies
None at the moment.
Issues & help
In case of support or error, please report your issue request to our Issues tracker.
P. Wieser
- Last updated on 2025, Jun. 30th