Scrivio Interview library
LeadershipPrincipal6 min read · updated 12 November 2026

Your product will expand to many countries over the next years. What would you decide now about internationalisation in Spring services to avoid expensive changes later?

The decisions that are cheap now and very expensive later are the data and contract ones: no user-facing text in code, only message codes; times stored and sent in UTC with the user's zone kept separately; money always as an amount plus a currency; and locale decisions kept at the edge, in clients or a presentation layer. Alongside those, we pick a translation workflow and tool early, and we make sure the front ends are ready for right-to-left languages and local formats.

Background to this question

Internationalisation, often shortened to i18n, is one of those concerns that costs almost nothing on day one and a great deal in year three. Adding a second country to a system that stores local times without zones, prices without currencies and English sentences inside Java code means touching every service and migrating data that is already wrong. Leaders are asked this question to see whether they can tell which decisions are reversible and which are not. In this answer, we will separate the decisions we must make now from those we can defer, go through each irreversible one with an example of what goes wrong, and end with how we would roll the rules out across teams.

1Which Decisions Are Expensive to Change Later?

The test a senior engineer applies is simple: if we get this wrong, do we have to migrate stored data or change a published API? If yes, decide now. If the fix is only a code change in one place, it can wait until the first real market needs it.

Translating the UI into Japanese can wait; it is work, but it is additive. Storing timestamps as local times without a zone cannot wait, because every row written until we notice is ambiguous. The table sorts the common items this way.

Decide now or later
ConcernCost if wrongDecide
User-facing text in coderewrite strings in every servicenow: message codes only
Time storagedata migration, ambiguous rowsnow: UTC Instant plus user zone
Moneydata migration, rounding errorsnow: amount plus ISO 4217 currency
Where locale is chosenlocale logic spread across servicesnow: at the edge
Translation tool and workflowhand-edited bundles driftearly, before the second language
RTL and local formats in UIlayout rework on every screennow in the design system
Actual translationsadditive worklater, per market

2No User-Facing Text in Code

Every message a user can see, including error messages, email subjects and notification text, is referenced by a code such as order.shipped and resolved through Spring's MessageSource or by the client. Even with only English today, the English lives in messages.properties, not in a Java string literal.

The reason is volume. A service with 300 inline strings needs 300 edits and a careful search before the first translation can start, and something is always missed. A service that already uses codes needs only a new properties file. APIs follow the same rule: they return codes and parameters so clients can render them, and free text in an error body is a convenience, never the contract.

3Times in UTC, Money With Its Currency

Time is the classic trap. A LocalDateTime such as 2026-03-29 02:30 means nothing without a zone, and in Europe that exact local time does not even exist on the night clocks move forward. So we store instants: Instant in Java, timestamptz in PostgreSQL, ISO 8601 with Z or an offset in JSON. Separately, we store the user's IANA zone id, such as Europe/Berlin, and convert only for display.

Money has the same shape of problem. An amount of 100 is meaningless without knowing whether it is euros or yen, and yen have no minor unit while dinars have three. So every amount travels with its ISO 4217 currency code, is held as BigDecimal or as an integer of minor units, and is never a double.

Java
Instant paidAt = Instant.now(); // 2026-11-05T14:00:00Z, stored as is
ZoneId userZone = ZoneId.of("Asia/Tokyo"); // stored on the user profile
ZonedDateTime shown = paidAt.atZone(userZone); // 2026-11-05T23:00+09:00[Asia/Tokyo]
record Money(BigDecimal amount, Currency currency) {}
new Money(new BigDecimal("100"), Currency.getInstance("JPY")); // JPY has 0 fraction digits
Currency.getInstance("EUR").getDefaultFractionDigits(); // 2

Notice that the conversion to Tokyo time happens only when showing the value. If one country later has a daylight saving change, our stored data stays correct, because it never depended on local rules.

4Keep Locale Decisions at the Edge

The locale, meaning the language plus regional conventions such as fr-CA, should be chosen as close to the user as possible: in the web or mobile client, or in a presentation layer such as a backend-for-frontend. Core domain services work with codes, instants and Money values, and do not know or care which language the user reads.

There is one exception: work that happens with no user present, like a nightly invoice email. For those, the event that triggers the work carries the user's locale and zone, so the rendering service can format correctly without calling back to ask. This keeps the rule simple: domain services are locale-free; rendering services receive the locale explicitly.

Step throughWhere each concern lives
  1. Client or BFFchooses locale, formats dates, numbers, plurals, RTL layout
  2. Rendering servicesemail, PDF, SMS: get locale and zone from the event
  3. Domain servicescodes, Instant, Money; no locale logic
  4. StorageUTF-8 text, timestamptz, amount plus currency

4 layers, from the top down. Step through them one at a time.

5Translation Workflow and Front-End Readiness

Choosing a translation management system before the second language matters because the workflow shapes the code. Engineers write the base language, the system collects translations with context for translators, and pipelines pull approved files back into builds. Without it, teams email spreadsheets, and bundles across services drift within months.

The front end has its own irreversible work. Right-to-left languages such as Arabic and Hebrew flip the whole layout, so the design system should use logical CSS properties such as margin-inline-start instead of margin-left from the start. Text can be 30 to 40 percent longer in German than in English, so components must not assume fixed widths. Names, addresses and phone numbers have local shapes, so forms should not hard-code first name plus last name or a five-digit postcode. Text everywhere is UTF-8, including databases, where in MySQL 8.4 that means utf8mb4.

6Rolling It Out Across Teams

Decisions only help if every team follows them. I would write the rules as a short platform standard, put the mechanics into a shared starter (MessageSource configuration, a Money type, Jackson settings that write instants in ISO 8601 UTC), and add cheap automated checks: a lint rule that flags string literals passed to user-facing APIs, a test that fails on LocalDateTime columns in new migrations, and the bundle key check in CI. Then the standard costs teams almost nothing to follow, and reviewing a design for i18n becomes a short checklist rather than a debate.

7Follow-up questions

Is it worth doing this before we have a second country?

For the data and contract decisions, yes, because they cost almost nothing at the start and require migrations later. For translations, legal texts and local payment methods, no; those are additive and should wait until a market is confirmed.

Why not store the user's local time as well as UTC?

Storing the instant plus the user's zone id lets us derive the local time whenever we need it. Storing local time separately creates two values that can disagree, especially after time zone rule changes, which governments make several times a year somewhere in the world.

Where do Spring's locale resolvers fit if locale lives at the edge?

A backend-for-frontend or a rendering service can still use LocaleResolver, for example AcceptHeaderLocaleResolver, to read the request's locale. The point is that only those edge services do it; domain services do not take a locale parameter at all.

8Conclusion

In this answer, we saw how to sort i18n decisions by how expensive they are to reverse. Message codes instead of inline text, UTC instants with a separate zone, money with its currency, locale at the edge, an early translation workflow and an RTL-ready design system are cheap now and costly later; the translations themselves can wait for each market.

What to say in the interviewAbout 90 seconds aloud

Open with

My rule is to decide now anything that would force a data migration or an API change later, and defer anything that is purely additive. So the first decision is that no user-facing text lives in code.

Then, if they want more

Even in English-only days, messages are codes resolved through MessageSource or rendered by the client, and APIs return codes with parameters. Second, time: we store Instants, timestamptz in PostgreSQL and ISO 8601 UTC in JSON, keep the user's IANA zone separately, and convert only for display, because local times without zones become ambiguous data.

Third, money always travels as an amount plus its ISO 4217 currency, in BigDecimal or minor units, never a double, since currencies have zero, two or three decimals.

Fourth, locale choice stays at the edge: clients or a presentation layer pick the language and format, domain services stay locale-free, and background jobs get the locale and zone in the triggering event.

Then I would choose a translation management system before the second language, so bundles are generated rather than hand-edited, and make the design system right-to-left ready with logical CSS properties and flexible widths.

I would roll this out through a short standard, a shared starter and a few CI checks, so following the rules is the easy path for every team.

About this answer

Last updated
12 November 2026
Versions it names
MySQL 8.4
Checked
Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the documentation below. What the checks cover
Where the question comes from
Written by Scrivio for practice. It is not taken from an interview.
Report an issue with this answer

Copy the line below and send it to the author with what you found. It carries the address of this page.

Issue with "Your product will expand to many countries over the next years. What would you decide...": https://scrivio-interview-library.netlify.app/spring-boot/spring-utilities/81528559e0/