Skip to content

Comment on Ask HN: Do you internationalize/localize your apps?

Comments

For all new projects I always use internationalization. Instead of writing something like

<button>Sign Up</button>

I simply write

<button>{{ 'Sign Up'|trans }}</button>

That way I don't need translation files (EN is default). If translation is not found the "key" is returned which is fine. Once the app is ready I call a command to create my language files and simply translate them.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.