DEV Community

jD91mZM2
jD91mZM2

Posted on

Implementing translations

As a hobby programmer, everything is your responsibility. Front end, back end, all of that.
So when a friend requested translations, I got a lot of work to do.

Let me give you some background. I started working on DiscordConsole some time ago. It's a program to take control over Discord bots, but also works for users and webhooks. It can nearly do every function Discord can, so that's the biggest issue. Every function creates new strings that needs translation.
Even with some heavy vim macros (@a to add current string to a file, @b to add current file entry back to the string), it became extremely tedious.

Now, this post isn't about how to make a simple translation system, or anything.
It's about when to start thinking about translations. C'mmon, don't make my mistake. I sat hours just moving and translating many different files, one being 1500 lines long!
Common signs you need to start thinking about translations are:

  • Your application is becoming unexpectedly big.
  • You start to write multiple similar error messages.
  • Similar messages become different (because you automatically vary them more and more)

Better start early than late...

This was my first post. It was very nervous to write, and I feel it's kinda useless too... So umm... Keep that in mind I guess... in case it was awful...

Top comments (6)

Collapse
 
jsalvador profile image
Juanjo Salvador

That ankward moment when your client/boss wants the app in 12 languages and you need to rebuild everything...

Collapse
 
legolord208 profile image
jD91mZM2

Haha jeez :P

Collapse
 
tbodt profile image
tbodt

noice

Collapse
 
legolord208 profile image
jD91mZM2

yusssss

Collapse
 
ben profile image
Ben Halpern

Thanks for your first contribution ๐Ÿ™‚

Collapse
 
legolord208 profile image
jD91mZM2

Thanks a lot for thanking me.. It means a lot to me :D