We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
t
keyPrefix
t function doesn't work if keyPrefix is specified and array of keys provided. It fails with missingKey error. As far as I understood, this line of code is a reason of that error - https://github.com/i18next/i18next/blob/5bd9ac037867edbb45fcdf9976e3b5ea48f164d5/src/i18next.js#L396
missingKey
i18next.use(initReactI18next).init({ // ... resources: { en: { translation: { group: { key1: "Translation 1", key2: "Translation 2" } } } } }); export default function App() { const { t } = useTranslation("translation", { keyPrefix: "group" }); return t(["key1", "key2"]); // Doesn't work }
A codesandbox example
Translation for key1 value should be returned
key1
The text was updated successfully, but these errors were encountered:
i18next v22.4.9 should address this
Sorry, something went wrong.
fyi: i18next/i18next@dbe9940#diff-6859f2a371e0f563ec9c27c5cf64cb82f8d91750467509caaa8f6f0e6d06dec5
No branches or pull requests
馃悰 Bug Report
t
function doesn't work ifkeyPrefix
is specified and array of keys provided. It fails withmissingKey
error.As far as I understood, this line of code is a reason of that error - https://github.com/i18next/i18next/blob/5bd9ac037867edbb45fcdf9976e3b5ea48f164d5/src/i18next.js#L396
To Reproduce
A codesandbox example
Expected behavior
Translation for
key1
value should be returnedThe text was updated successfully, but these errors were encountered: