You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is by far the best internationalization library for VueJs I've found so far, but like every other library I think it has a pretty major short-coming. Pluralization of course. The translators have to make a separate string for multiple items and one for a single item.
I would propose an API similar to that of Laravel/Symfony as it is already known by many developers (at least those of us who come from the back-end) and it is pretty straight-forward. https://laravel.com/docs/5.2/localization#pluralization
To fit with this library the API would maybe be something like {{ $tc('user.have_apples', x) }}, which could then output either You have one apple or You have four apples depending on the value of x.
A feature like this would be extremely helpful for pretty much all projects, especially as there are no real good workarounds. Hope we see this feature in an upcoming version! 😃
The text was updated successfully, but these errors were encountered:
Hey folks!
This is by far the best internationalization library for VueJs I've found so far, but like every other library I think it has a pretty major short-coming. Pluralization of course. The translators have to make a separate string for multiple items and one for a single item.
I would propose an API similar to that of Laravel/Symfony as it is already known by many developers (at least those of us who come from the back-end) and it is pretty straight-forward. https://laravel.com/docs/5.2/localization#pluralization
To fit with this library the API would maybe be something like
{{ $tc('user.have_apples', x) }}
, which could then output eitherYou have one apple
orYou have four apples
depending on the value ofx
.A feature like this would be extremely helpful for pretty much all projects, especially as there are no real good workarounds. Hope we see this feature in an upcoming version! 😃
The text was updated successfully, but these errors were encountered: