I already did before a tutorial about localization and how i did it but i am trying to make it a little better this time and rethink it.
Basically my idea is to work with localized files/pages instead of simply replacing the string. This way one is much more flexible and can tailor content more precisely for different languages.
For core f7 it would be easy, just making the path in the routes array dynamic according to the current language selection.
But when using webpack, the outcome is a bit difficult because it packs everything into app.js so I got some questions:
- Does it make sense todo so? or should one simply work with replacing strings?
- How should one approach this? Can you make dynamic imports?
import LandingPage from '../'+language+'/pages/landing.f7.html';