Comments (3)
You cannot use "dynamic paths" that change at runtime because webpack evaluates them before.
An easy solution for this is to move the images in the static folder and link to them with :src= "'/image-' + $i18n.locale + '.svg'"
. If that's (whyever) not wanted, you can also use require (:src="require('~/assets/image-' + $i18n.locale + '.svg')"
)
from i18n.
This question has been resolved by @manniL, see answer.
from i18n.
so for each image also we would need to check if the image exists otherwise get the "fallback" one.
from i18n.
Related Issues (20)
- Overridden locale domains don't switch locale HOT 2
- [Error after update to 8.3.1 from 8.3.0] First argument to String.prototype.startsWith must not be a regular expression HOT 2
- Vue Router logs unprefixed route as not found
- Update `nuxt-module-builder` to fix broken plugin inejcted types with `vue-tsc` 2.0+ HOT 7
- Redirects not working for translated routes HOT 1
- hi, I am learning nuxt+i18n, but I encountered a problem when using t in step HOT 3
- fix: invalid urls starting in v8.3.1
- Nuxt generate (SSG) does not update components outside of NuxtPage on locale change HOT 1
- After updating nuxt and i18n versions, i18n strictMessage doesn't work. HOT 2
- how can i add prefix before i18n language prefix? HOT 4
- I am not able to load a js file in locale that contains other attached json files. HOT 3
- Changing locale causes all components to be in Unmounted state HOT 4
- PublicRuntimeConfig type not being recognized by eslint, only happens after nuxt 3.11.2 with i18n active HOT 1
- router.back()
- Using defineI18nLocaleDetector, event.context.i18n?.locale could be async function instead of string
- TypeScript Issue with nuxtApp.$i18n in defineNuxtPlugin HOT 2
- pages:extend pages i18n remove layout from extend pages HOT 2
- page alias no have prefix
- Can not use custom path with i18n in nuxt.config.ts HOT 2
- docs: Add note/link about i18n-t,… on components api page HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from i18n.