3.0.0 • Published 7 years ago

catberry-l10n-dust-helper v3.0.0

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

Dust helper for Catberry localization plugin

Gitter

Installation

npm install catberry-l10n-dust-helper --save

Description

You can use dustjs helper that puts localized value wherever you want:

{@l10n key="SOME_LOCALIZATION_KEY" locale="en-us" count=5 /}
  • key - localization key
  • locale - current user localization (optional)
  • count - pluralization count (optional)

Let's say we have such localization dictionary:

{
	"COMMENT": ["comment", "comments"]
}

And we use such helper parameters:

{@l10n key="COMMENT" locale="en-us" count=1 /}

It outputs comment word.

{@l10n key="COMMENT" locale="en-us" count=5 /}

It outputs comments word.

Also, if you have locale value in template data context it is not needed to specify parameter locale in helper because it will be automatically used from template data context.

Contributing

There are a lot of ways to contribute:

Denis Rechkunov denis.rechkunov@gmail.com

3.0.0

7 years ago

2.0.0

8 years ago

1.0.5

8 years ago

1.0.4

9 years ago

1.0.3

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago