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
I'm trying to config a locale whose file is a javascript file that return a object. if the dictionary is simple like {‘title’: ‘about’, ‘data’: ‘the data’} everything works correctly and I can access those values via $t(title) without problems. However, if the dictionary includes other elements imported from other js files, I am not able to access them.
The configuration of my environment is as follows:
import portfolioMain from './pages/portfolioMain'
import blogMain from './pages/blogMain'
export default {
portfolioMain,
blogMain,
"section-name": "about me"
}
PORTFOLIOMAIN.JS
export default {
title: 'the house'
}
In this configuration, I can access to section-name without problems. Could I help me, please? My intention is to have the files as tidy as possible within the directory
Additional context
No response
Logs
WARN [intlify] Not found 'portfolioMain.title' key in'es' locale messages.
The text was updated successfully, but these errors were encountered:
Environment
Reproduction
.
Describe the bug
I'm trying to config a locale whose file is a javascript file that return a object. if the dictionary is simple like {‘title’: ‘about’, ‘data’: ‘the data’} everything works correctly and I can access those values via $t(title) without problems. However, if the dictionary includes other elements imported from other js files, I am not able to access them.
The configuration of my environment is as follows:
NUXT.CONFIG.TS:
export default defineNuxtConfig({
devtools: { enabled: true },
modules: ["@nuxtjs/i18n"],
i18n: {
lazy: true,
langDir: "./locales",
strategy: 'prefix_and_default',
locales: [
{
code: "en",
name: "English(US)",
file: "en/index.js",
},
{
code: "es",
name: "Español",
file: "es/index.js",
},
],
defaultLocale: "es",
}
})
INDEX.JS
import portfolioMain from './pages/portfolioMain'
import blogMain from './pages/blogMain'
export default {
portfolioMain,
blogMain,
"section-name": "about me"
}
PORTFOLIOMAIN.JS
export default {
title: 'the house'
}
In this configuration, I can access to section-name without problems. Could I help me, please? My intention is to have the files as tidy as possible within the directory
Additional context
No response
Logs
The text was updated successfully, but these errors were encountered: