Replies: 1 comment 1 reply
-
Curious if/how you've thought about code splitting dictionaries for exceptionally large apps. I've worked in a couple where a single dictionary approach can be 100kb+ of messages. But code splitting/loading/updating context adds some complexity. Example (in Next.js):
import dynamic from 'next/dynamic';
import i18n from '$i18n';
const Footer = dynamic(() => import('@/ui/Footer', {
loading: () => i18n.loading()
});
export default function Home() {
return (
<div>
<h1>{i18n.greeting()}</h1>
<Footer />
</div>
);
} Code-split import i18n from '$i18n';
export default function Footer() {
return <div>{i18n.copyright()}</div>
} Would need bundler context here to group translations (possibly more transitive translations) at the code split point and load them into context when loading the |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
What optimizations are reasonable?
Beta Was this translation helpful? Give feedback.
All reactions