primefaces / primelocale

MIT License
82 stars 111 forks source link

Any docs to show how to use this repo? #110

Closed xiangnanscu closed 1 year ago

xiangnanscu commented 1 year ago

for example, if I want to use zh?

melloware commented 1 year ago

Which Prime Library are you using?

xiangnanscu commented 1 year ago

primevue

melloware commented 1 year ago

Yep just copy the zh file and follow these primevue instructions: https://primevue.org/configuration/#setlocale

xiangnanscu commented 1 year ago

OK. thanks.

humbertleonardo commented 10 months ago

It's still not clear to me, what folder do I copy the file to? What exactly do I change when importing from PrimeVUe?

melloware commented 10 months ago

Here is a great showcase showing how to use PrimeLocale with PrimeVue and even detect the browsers locale and switch to that language: https://github.com/orgs/primefaces/discussions/478

humbertleonardo commented 10 months ago

When I try to import the pt.json file, I receive the following error in the console

ERROR Cannot restart nuxt: Maximum call stack size exceeded 11:24:02 AM

image

melloware commented 10 months ago

@humbertleonardo here is a Vue I8LN starter: https://github.com/primefaces/primevue-examples/tree/main/vue-i18n

humbertleonardo commented 10 months ago

I ended up solving it another way, instead of saving it in JSON, I saved it as JS and imported the JS file, that's how it worked. Thanks!