DEV Community

Cover image for A Practical Guide to Translating & Localizing Your Web App: Using i18n and Lingo.dev

A Practical Guide to Translating & Localizing Your Web App: Using i18n and Lingo.dev

Ademola Thompson on February 28, 2025

When building web applications for a global audience, it is important to consider localization—the process of presenting your web application's con...
Collapse
 
maxprilutskiy profile image
Max Prilutskiy • Edited

Fantastic article! Definitely opinionated, but Lingo.dev is fire ;) 🔥

By the way, quick tip:

To extract translation strings, one can just use the following prompt with claude sonnet:

Extract i18n strings in src/, and produce en.json in i18n/en.json
Enter fullscreen mode Exit fullscreen mode

Works like magic!

Collapse
 
superherojt profile image
Ademola Thompson

Ouuuuu! I didn't know that. Thank you for the tip, Max!

Collapse
 
mathio profile image
Matej Lednický

That prompt is a lifesaver 🚀 I often use similar one directly in Cursor IDE 🙃

Collapse
 
mathio profile image
Matej Lednický

Nice article 🚀🚀🚀


If you are on a Windows machine, the above command might not work

Well, if you are, give me a shout and we can have a look at how the auth command works together.

Or you can just put your Lingo.dev API key into LINGODOTDEV_API_KEY env variable. Windows does have those, right? Genuinely asking 🫥

Collapse
 
superherojt profile image
Ademola Thompson

Hi, Matej. Thank you!

I wouldn't mind looking at how the auth command works with you.

Yes, Windows have those. 😅 But then, the problem persists when you run other commands like, npx lingo.dev@latest init. So I figured it was better to run the commands from a Unix-like environment.

Collapse
 
mathio profile image
Matej Lednický

Did you try running the CLI directly on Windows? Do you have node installed? It is written in typescript / node, not bash. But honestly we did not check on Windows.

I am happy to hear you got it running via WSL. Is that the standard for developing on Windows? Or is direct support for Windows preferred?

Thread Thread
 
superherojt profile image
Ademola Thompson

I initially tried running the CLI directly on Windows and have Node installed. However, each command attempts to run a Bash script located in node_modules/.bin/lingo.dev for some reason. Since Windows does not natively support running Bash files, it simply opens the file in a text editor, browser, or whichever default program the user has set. I can paste the file's content if you want.

From my experience, most developers use WSL or Git Bash frequently because this issue is not unique to Lingo. Windows support would be nice, but I wouldn’t prioritize it too much. There’s a high chance developers will encounter the same issue with another package and eventually switch to WSL.

Thread Thread
 
mathio profile image
Matej Lednický

I tried to run this on my gaming machine out of curiosity. I learned that while via npx it tried to run the bash script, installing lingo.dev via npm worked (it created a .cmd comamnd). However not all of the CLI commands worked.

If this works via WLS, I think we can check the Windows platform support ✅

Thank you for your help 🙌

Thread Thread
 
superherojt profile image
Ademola Thompson

I tried to run this on my gaming machine out of curiosity. I learned that while via npx it tried to run the bash script, installing lingo.dev via npm worked (it created a .cmd comamnd)

This is interesting because I did try to install lingo.dev via npm and even though it installed, I couldn't perform the authentication and other CLI commands

If this works via WLS, I think we can check the Windows platform support ✅

Definitely. Windows is "interesting" to build for. 😅

Thank you for your help 🙌

You're welcome! And thank you too!

Collapse
 
ryanguitar profile image
Ryan Els

Lingo.dev now has a Compiler that makes localization much much easier.

You can see it on X @lingodotdev 🤩

Collapse
 
superherojt profile image
Ademola Thompson

For sure! I'll probably write a tutorial about it after testing. Lovely stuff from the Lingo.dev team!

Collapse
 
ryanguitar profile image
Ryan Els

Thank you, Ademola 😊🙏

Looking forward to read the tutorial.

Collapse
 
ryanguitar profile image
Ryan Els

Have you tried the lingo.dev compiler 🤔

Check it out on X @lingodotdev 👌