eversport / intl-codegen

generate code and type definitions from translations
MIT License
15 stars 1 forks source link

Make it possible to directly import language files #12

Closed Swatinem closed 5 years ago

Swatinem commented 5 years ago
import { Localize } from "./localization/en";

This should just load one specific language bundle synchronously.

You could even use webpacks path-mapping to import from "./localization" and have it transparently use "./localization/en". With this, you could create separate bundles that bake in a specific language.

Swatinem commented 5 years ago

not sure this is worth it anymore… the reasoning back then was to avoid having to call the async loadLanguage function