lokalise / i18n-ally

🌍 All in one i18n extension for VS Code
https://marketplace.visualstudio.com/items?itemName=lokalise.i18n-ally
MIT License
3.98k stars 320 forks source link

Add support for next-intl/server #1009

Open equiman opened 1 year ago

equiman commented 1 year ago

Is your feature related to a specific framework or general for this extension next-intl (server side)

Is your feature request related to a problem? Please describe. extension is working correctly with next-intl using the useTranslations() but in next-intl/server use the function useTranslations()

Describe the solution you'd like

Additional context That's what is showing currently on server side component image

Robin-Ln commented 11 months ago

can you add the support for getTranslations too ? 🙏

import { getTranslations } from 'next-intl/server';
const t = await getTranslations('Index');
Robin-Ln commented 11 months ago

https://github.com/lokalise/i18n-ally/pull/1048

equiman commented 11 months ago

getTranslator was renamed to getTranslations on new versions.

image

ixartz commented 5 months ago

I use the "Custom Framework" feature from the extension to support next-intl/server.

So, it works perfectly with next-intl using getTranslations without any issue: https://github.com/ixartz/Next-js-Boilerplate and you can find the configuration at .vscode/i18n-ally-custom-framework.yml