News for hackers. Stuff that matters.
Re:Ask HN: Do you internationalize/localize your apps? by waibelp on Saturday November 04, 2017 @02:23PM (#15626239)
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.

There are no comments on this comment yet.