Translations have always been a tricky part of software development. There are many things to consider: keeping the translations consistent, using the right terminology, making sure every string is translated, and of course, making sure the application uses the right translation files and technology.

Until now, I have mostly handled this manually. But with AI, I have started doing things differently.

In this article, I will explain how I started working with translations using GitHub Copilot, and how I created a Copilot skill to make the process more consistent.

Copilot is already pretty good at translations

My first experience was that Copilot is actually pretty good at translating text.

It does a surprisingly good job of keeping the language consistent, especially when it is working in an existing application. If you have worked on the application for a long time and already have a lot of translated text, Copilot has a lot of context to work with.

In many cases, I don't need to do anything special. I can ask Copilot to translate a piece of text, and the result is usually good enough.

But I wanted to make it even more consistent.

So I created a translation skill.

Creating a translation skill

The skill itself is pretty simple. It contains instructions about things such as:

  • What should be translated
  • That hard-coded strings should never be used
  • Where the translation files are located
  • Which translation technology the application uses
  • What tone and style the language should have
  • Which terminology should be used

The last part is the most important one: a term list.

The term list contains important terms used in the application and the translations that should be used for those terms.

For example, if we have decided that a specific concept should always be called one particular thing in Swedish, the translation skill tells Copilot to use that translation instead of coming up with a new one.

This makes a surprisingly big difference.

Term lists are more important than I thought

The importance of term lists was one of the first things I learned when I studied to become a software developer.

But over the years, I have realized that organizations are often pretty bad at actually using them.

And this causes problems that go beyond translations.

One example is when developers use different words for the same thing. That can make communication within a development team more confusing than it needs to be.

It can also become a problem when working with support teams in different countries.

Imagine that the Finnish support team uses one Finnish term for something, while the Swedish support team uses a different Swedish term. Then the developers use yet another term internally.

Everyone might be talking about the same thing, but because everyone uses different terminology, it can be difficult to understand what they actually mean.

A term list gives everyone a common language.

It is not just useful for translating the application. It can also make communication between developers, support teams, product teams, translators, and other parts of an organization much easier.

Creating a term list with Copilot

In one large application I worked with, we had a partner handling translations for us. Because of that, we had a lot of translated text across the application.

So I decided to use that existing data to create the term list.

I took all the repositories where we had translated text and gave them to Copilot. I then created an instruction asking Copilot to analyze the existing translations and create a term list based on the terminology that was already being used.

And it worked pretty well, I must say.

Instead of starting from scratch and manually trying to identify all the important terms, I could use the translations we already had as the source for the term list.

Of course, I still had to review the result. AI-generated terminology should not automatically become the official terminology for your organization.

But it gave me a very good starting point.

Once I had the term list, I added it as an attachment to the translation skill and added an instruction that Copilot should always use the term list when translating.

Now Copilot has both the general instructions for how translations should work and the specific terminology that should be used.

What if you are starting a new application?

If you are starting a new application and don't have existing translations to work from, you can of course create the term list manually.

In fact, that might be a good thing to do early in a project.

You don't need hundreds of terms. Start with the important concepts in your application and add to the list as the project grows.

The important thing is that the team agrees on the terminology and that the same terms are used consistently.

How I use the skill

There are several ways to use the translation skill.

The simplest is to use it directly while developing. When I add new text to the application, I can ask Copilot to translate it and the skill makes sure the translation follows the rules and terminology we have defined.

It can also help prevent hard-coded strings from being introduced. Instead of just translating the text, Copilot can make sure the new text is added to the correct translation file and used correctly in the application.

Another possibility is to use it as part of an agent workflow.

For example, you could have an agent run after every commit and check the application for new or changed strings. It could make sure that the strings have translations and that the terminology follows the term list.

That turns translation from something developers have to remember to do into something that can be checked automatically.

AI makes consistency even more important

The interesting thing about using AI for translations is that the quality depends a lot on the information you give it.

Copilot is already quite good at translating text. But if you give it clear rules, existing terminology, and examples from your application, it becomes much better at producing consistent results.

This is also something I have seen when using AI for other parts of software development. The better structure and conventions you have in your project, the more useful AI becomes.

For translations, a good term list is one of those conventions.

It gives both developers and AI a common source of truth.

And for me, that is the biggest lesson from this: don't just ask AI to translate your application. Give it the rules and terminology that make your application consistent.