Skip to content

localize

Amy J. Ko edited this page Nov 29, 2026 · 41 revisions

Welcome! Our goal is to support all of the world's written languages, and that definitely isn't going to happen without your help. This guide will help you contribute.

First, let's discuss some key principles:

  • We expect redesign as part of localization. Every new language is going to surface new defects and new requirements for the platform, which might mean bug fixes, and changes to the interface, interaction design, even to the programming language. So if you're working on something and something seems off for the particular language that you're working on, that's a great time to submit an issue so we can decide if something about the design or implementation needs to change.

  • Localization is an art. Contributing isn't just about translating sentences from other languages. It's about moving between cultural ideas, reinterpreting humor, connecting to concepts, and in many cases, rewriting text to reflect different values. That means that you're doing more than just punching words into Google Translate — you're taking on the role of writer, teacher, and sometimes comedian, as this project is full of puns that frequently don't translate between cultures.

  • Localization and accessibility are inseparable. For example, there are going to be cases where it might be easy to write something that refers to something on screen, but in a way that assumes someone can see it. That's not accessible: there has to be a way for someone who can't see to find what you're talking about. Another example is the need for plain language, which can be essential for people with cognitive or intellectual disabilities, or low reading literacy. That means keeping writing clear, concise, and organized, even when you're writing in the voice of a character (as is often the case in Wordplay).

Let's talk about how to contribute. There are two paths: the in-app workflow described first, which is the recommended path for most edits, and the file-based workflow further down, which is needed for new locales, structural work, and large bulk operations.

Note

We're always trying to find ways to make localization easier. If you think of ideas for how to improve the process below, report a maintenance issue.

In-app localization (recommended)

For most edits — fixing a typo, replacing a machine-translated line with a fluent one, writing the next unwritten string — you can localize directly inside Wordplay without cloning the repo, installing tools, or opening a pull request by hand. The application keeps your edits on your device, and when you're ready, submitting opens a pull request for you with all the surrounding context maintainers need.

Turn on localization mode

  1. Sign in. Submissions require an account so the resulting pull request can credit you.
  2. Open Settings (the gear in the page footer) and toggle the ✎ switch on.
  3. A small header appears at the top of every page indicating localization mode is on, with a 🔗 link to the workspace page (see below).
  4. Localization mode stays on, on this device, until you turn it off. If you reload the page, you are still in localization mode and your edits are still showing.

Editing inline

With localization mode on, translator-facing text on every page becomes editable in place:

  • Yellow buttons — visible UI text like button labels, headers, and dialog. Click to open an inline editor; ✓ saves, ⨉ cancels, ↺ reverts to the official text.
  • 💭 badges — tooltips, aria-labels, and other text that normally only appears on hover or to screen readers. Click the badge to edit the underlying string.
  • Mode rows (the segmented buttons in Settings, the editor toolbar, etc.) — each option has its own label and tooltip you can edit independently.
  • Tutorial text on /learn — act and scene titles, scene subtitles, and dialog bubbles. Dialog uses a rich-text editor because the body can contain markup (links, concept references, code samples); the editor warns you if any @Concept links don't resolve in the current locale.

Where your edits go. When you press ✓, your edit is saved in this browser, on this device, and a note saying Saved on this device appears beside the text. Nobody else sees it yet. When you are ready, open the workspace (the 🔗 in the localization header) and send your edits from its Submit tab. The saved button at the bottom right of the page is about projects. It does not save or send localization edits.

Guidance for your language

The localization-mode header has a Guidance switch (📕/📖) that shows and hides guidance for the language you're working in, and the same guidance appears at the top of the workspace page. It holds the conventions specific to your locale — how to address the reader, how formal to be, what to do about gendered forms when you don't know someone's gender, and terminology choices the glossary doesn't cover.

Guidance is unlike every other string in the locale file: it is written in your language, not translated from English, so there's no English original to compare it to and it's never machine translated. It can also be empty, which is a fine state for a locale that hasn't settled on anything yet.

You edit it the way you edit anything else in localization mode, and it travels in the same pull request as your other edits. Two things to keep in mind:

  • If the guidance carries the machine-translated badge, it was inferred from the locale's existing translations rather than written by a fluent speaker. Read it critically and correct it — that's exactly what it's there for.
  • Add to it whenever you make a judgment call the next contributor would otherwise have to make from scratch. "We chose X over Y because Z" is worth one line here and saves an argument later.

Edits are scoped to your device and to the locale you were viewing when you made them. Switching the application's locale switches which queued edits you see; edits made under each locale are kept separately, so you can have an in-progress fr-FR bundle and an in-progress de-DE bundle at the same time without one overwriting the other. You can keep going across sessions; the workspace page (next) shows your queued bundle for the active locale.

The workspace page (/[locale]/localize)

Open it from the 🔗 in the localization-mode header, or by typing the URL. It has five tabs across the top: About (how localizing works, plus your language's guidance), Text, Terms, Glossary, and Submit. The Submit tab shows a count of the edits you have waiting.

Text to write or review

A filter row sits at the top:

  • Search field — matches the path or the description of each string.
  • Quality filter (a Mode widget) — all vs machine translated or unwritten. Defaults to the latter, since that's typically what a contributor is reviewing. Each option shows a live count.
  • Section filter (another Mode widget) — narrow to a single top-level area of the locale (ui, node, output, …). Each section's count reflects the current quality and text filters.

Below the filters: prev/next arrows to step through the filtered list, a grouped dropdown of every matching string, and an editor whose type depends on the string's tag:

Tag Editor
[plain] single-line text field
[formatted] rich-text editor with @Concept link validation
[name] text field validated against Wordplay's name syntax
[emotion] emotion picker

The original English text appears below the editor as a reference. As you type, a one-second delayed check flags words in your draft that occur only once across the entire locale — a hint that you may have introduced a typo or a unique-to-this-string usage.

For tuple-typed fields (Mode labels and tips, for example), an additional row of prev/next arrows lets you step through the tuple's elements without leaving the editor.

Glossary

The glossary explains the words learners meet — "value", "parameter", "loop". Each term has one main word, which you translate on the Text tab like any other string. This tab is for something different: the other written forms of that word in your language.

Here is why they matter. When someone writes documentation, they can link a glossary word by putting @ in front of it, like @parameter. A link stops at the end of the word, so in English @parameters would not find anything — "parameters" is not the term's word, "parameter" is. Adding parameters as a written form makes the whole word one link.

Every language needs different forms, and that is the point: English mostly needs plurals, while a language with cases or conjugations may need several forms for one word, and some languages need none at all. Nobody translates these for you, and no other language's list is copied into yours — you write the ones your language actually uses.

Each term on this tab shows:

  • Its word and definition in your language. With localization mode on, both have a ✎ beside them, so you can fix a term's wording right here instead of hunting for it on the Text tab. (They are the same strings either way — an edit made here and an edit made there go to the same place.) You can also edit them from the glossary in the guide, where learners read them.
  • The English forms, as a reference. These are only a hint about what kinds of forms English needed; do not translate them one for one.
  • The forms you have added, each with a ✕ to remove it, and a field with a + to add another.

If a form would not work, the tab says so before you submit: a word that is already another term's word, or a word the documentation already defines, would make a link ambiguous, so those are refused. A form containing a space or a hyphen is allowed, but a note tells you it will only help searching, since a link stops at the space.

Each term's whole list counts as a single edit in your bundle, so removing a form and adding two more is one line on the Submit tab, not three.

Submit

Appears only when your bundle contains at least one edit for the active locale. It has:

  • A note reminding you that each submission targets one locale at a time, naming the locale this bundle will be submitted under. If you have queued edits under a different locale, switch to that locale and submit them separately.
  • A free-text description field — the rationale that will appear in your PR body. Required.
  • A "not spam" checkbox confirming the edits are good-faith. Required.
  • A bundle viewer showing one edit at a time, with prev/next arrows. The path is shown as a code block, and the source text appears alongside your override (strikethrough → arrow → new value). Clicking the edit jumps back to the editor with that string selected.
  • A Submit confirm-button. Once both required fields are filled and you double-confirm, the backend runs.

What the function does:

  1. Validates your bundle.
  2. Fetches the section files your edits touch — for example sections/ui.json — and (if applicable) [locale]-tutorial.json, from main.
  3. Applies your edits in place.
  4. Re-serializes the result with Prettier (matching the repo's .prettierrc.json), so the PR diff only shows your text changes — not whitespace churn from the JSON round trip.
  5. Backtranslates each edited string from your target locale into English using Google Translate, so a maintainer who doesn't speak the language can sanity-check the meaning.
  6. Opens a branch and a PR on wordplaydev/wordplay. The PR title includes your locale and the edit count; the body includes your displayed name, your rationale, and a table of Key | Original English | Edited | Backtranslation.
  7. Returns the PR URL.

The success notice on the page links to your new PR — open it to follow review, respond to feedback, or add detail.

If anything fails (auth, GitHub API, invalid path), the notice shows an error message and your edits remain on your device so you can retry. Bundles are capped at 1,000 edits each; very large efforts should use the file-based workflow below.

When to use file-based localization instead

Use the file-based workflow further down when:

  • Creating a brand-new locale (no JSON files exist yet).
  • Making structural changes (adding or removing locale fields, working with the schema generator).
  • Submitting many hundreds of edits at once that exceed the per-bundle limit.
  • Editing the tutorial's performance source code, which is Wordplay code rather than text and is not covered by the in-app editor.

Everything else is faster in-app.

File-based localization

The rest of this guide describes the file-based workflow, which is what maintainers use when bootstrapping new locales or doing bulk work directly against the JSON files.

Setup

Follow the setup instructions to configure VS Code and other tools so that you can contribute localizations.

When VS Code offers the project's recommended extensions, accept them — Prettier in particular. The project formats on save, and without the Prettier extension VS Code falls back to its own built-in JSON formatter, which expands every inline array. One save reformats roughly ten thousand lines of a locale file, and from then on your branch conflicts with every change anyone else makes to it.

Choose a locale

Wordplay's localization is organized pairs of languages and regions, which we call locales. For example, a locale might be es-MX, which means "Mexican Spanish". Sometimes a language is written in more than one alphabet, called a script. When a locale uses a script that isn't its language's usual one, its name includes a four-letter script code in the middle. For example, ur-Latn-PK means "Urdu written in Latin letters, as in Pakistan", often called Roman Urdu. Most locales don't need a script code, so if you're not sure, leave it out. What language and locale do you want to work on? Ideally, it's one you're fluent in, so you can write high quality labels, documentation, and tutorial content.

Find collaborators

Before you do anything else, find out who else might want to work on the locale with you. Having other people to edit your writing is essential to high quality writing, and it's often helpful to discuss translations with others to get multiple perspectives on word choice, concepts, and cultural metaphors and idioms.

One way to find others is to join a Wordplaypen meetup and network with the other folks localizing. Another is to write in #localize in Discord and see who else might be working on the locale.

Find or create an issue

There are three kinds of issues you can work on:

  • Create an entirely new locale for a language and region pair that isn't yet supported. If you're doing this, ensure there aren't people already working on one by asking in Discord #localize, and checking for existing issues.

  • Find defects or unfinished work for the language and region that you want to work on. Search the issues to see if there is an issue already corresponding to the locale, or a specific issue marking an enhancement or defect.

  • Run npm run l10n -- status (explained below) or npm run locales to see if there are any unwritten strings for the locale you want to work on or other errors to fix. If there are, create an issue to represent your work, and then follow the steps below to write those missing or machine translated strings.

If you're working on an existing issue, be sure to check if there are other assignees already working on it and which fork they are working in. If there are none, write a comment on the issue, tagging a maintainer to request assignment.

Set up a draft pull request for the issue

To prepare to work on the issue, follow the pull request instructions.

Write

Until we manage to build some better web-based tools for localization, contributing localizations currently requires using the tools that software developers use to build Wordplay. This isn't ideal, so hopefully these instructions make it as easy as possible.

Wordplay localization files live in the folder static/locales -- with one exception, which is English. You'll find that in src/locale/en-US/, because English is imported as a default locale, since it has several symbolic names for things.

Inside the static/locales folder are folders that are named using ISO 639-1 language codes. Inside each of those you'll find a sections folder, plus a few files that stand on their own:

What What's in it
sections/ The interface text, split across eight files. This is what you edit.
[language]-tutorial.json The tutorial in that language.
[language]-tutorial-quick.json The shorter tutorial.
[language]-how.json The how-to answers, built from that locale's how folder.
[language]-emojis.json Names for emoji.
[language]-updates.json Translations of the updates page.
[language]-datetimes.json Date and time formats.

Inside sections are eight files. Together they hold exactly what the one big file used to:

File What's in it
ui.json Most of the interface — dialogs, buttons, the palette, the editor.
ui-page.json Text belonging to a particular page, like the landing page or login.
node.json Explanations of each piece of the Wordplay language.
basis.json Documentation for the built-in types, like numbers and lists.
input.json Documentation for inputs, like the keyboard and the camera.
output.json Documentation for output, like phrases and shapes.
token-keyword.json The names of symbols and keywords.
locale.json Everything else: your language's name, the glossary, moderation text.

Why they're split up. They used to be one file of about a megabyte. That meant every person working on a translation was editing the same file at the same time, and if you worked on a branch for more than a few days, merging it back was painful — git would report conflicts all through the file, even where two people had changed completely different things. Eight smaller files means your change usually touches one of them, and someone else's touches another, so there's nothing to conflict.

If you ever want to see the whole locale as one file the way it used to be, you still can: Wordplay builds one at static/locales/<code>/<code>.json when you run npm install or npm run build. Don't edit that file. It's rebuilt from the sections folder every time, so anything you type into it is thrown away. It isn't stored in git for the same reason.

The tutorial is a separate file for a different reason: it can be very large, so Wordplay only loads it when someone actually opens the tutorial.

You may not see a folder for the language code you want to work on. That means you're the first to work on it!

  • Ask Amy to generate the language files for the language, and a draft machine translation from English. She'll use the npm run locales-translate command to do that, using an account that pays for the translation.
  • Find SupportedLocales.ts and find the DraftLocales variable. Add the locale code you're working on to that list; make sure it matches the name and region you give for the locale file. This will make it so that you can switch to the locale locally, even though the locale isn't supported yet.

The recommended editing setup is as follows:

  • Have VS Code open with the locale file you're editing
  • Open a terminal and run npm run dev; this will show a link like http://localhost:5173. Open that link in a web browser and you'll see the Wordplay application. Position the browser window side by side with VS Code.
  • Edit your locale file. Every time you save (cmd/ctrl + s), the browser tab will refresh. This will let you iteratively write, save, and check formatting and appearance.
  • Find the concept you're editing in the documentation panel by searching for its name. That'll help you see live updates on each save. For conflict messages, you should be able to find code examples that produce the conflict in the tooltips of the message.

Now, what actually goes in those files?

That's a lot of detail — what each section of the locale file is for, what the $ and @ symbols mean, how the tutorial is structured, and how to format rich text — so it lives on its own page: locale reference. Open it in a second tab and keep it there while you write; you'll be looking things up in it constantly at first, and hardly at all after a week.

If you're writing in a right-to-left language such as Arabic, Hebrew, or Persian, read that page's RTL section before you write anything. Code editors handle right-to-left text badly, and knowing what's a real problem and what's just the editor lying to you will save you a lot of frustration.

One rule from that page is worth learning before you write your first line, because it's the one people lose work to:

Important

When you write a string by hand, delete the $?, $!, or $~ at the front of it. Those marks tell our tooling "nobody has written this yet, feel free to overwrite it." If you write a beautiful translation but leave the mark in place, the next translation pass will throw your writing away and replace it with a machine's. This applies to the single most common contribution there is: filling in a $? string. Write the text, then delete the $?. (The in-app editor handles this for you — it only matters when you're editing the JSON files directly.)

Machine translation

Machine learning tools can be reasonable at providing a first draft of translations. If you're starting from scratch on a locale, you can use the following command to generate an initial translation. For example, if you wanted to generate Punjabi, you would find the locale and region for the language (pa-IN), then run:

npm run locales-translate pa-IN

This translates every unwritten string (the ones marked $?) from English into the language you named. If you have a lot of strings to get through, npm run locales-translate-parallel pa-IN does the same work several strings at a time and finishes much faster.

For this to work, the machine translator needs an account of its own to talk to. We use Claude, which needs an API key set in an environment variable called ANTHROPIC_API_KEY. You probably shouldn't set this up yourself — the key costs money to use, and a maintainer likely already has one. Ask in Discord and someone will either run the translation for you or help you get set up.

At the end of a translation run, the command prints how much work it did and roughly what it cost in dollars, so whoever ran it can see the bill before it arrives. Most of the translating is done by a less expensive model; a stronger, pricier one is reserved for the strings the first model got wrong and for names, where a mistake matters more.

Whatever produces it, treat the result as a rough first draft and nothing more. The writing often lands above the reading level we're aiming for, it sometimes mangles our template syntax, and it makes cultural choices a fluent speaker wouldn't. That's expected. Every machine-translated string is tagged $~ precisely so a person can find it and rewrite it — that rewriting is the actual work of localization, and it's why we need you.

When English changes underneath you

A translation can be finished, fluent, and still wrong — because the English sentence it was translating got rewritten afterwards. Nothing about the translation itself looks broken, so nobody notices. That had been happening quietly since 2023, and by the time we went looking there were about eight thousand of them across the thirty languages.

There is a command that finds them:

npm run locales-drift

It doesn't translate anything and it doesn't cost money. It reads this repository's own history, which already records when every single string last changed. If the English changed after the translation did, the translation is describing an older sentence. That's it — that's the whole idea.

It prints a line per language, like this:

de-DE: 497 stale — 491 markable (477 machine, 14 human), 6 name path(s) to review by hand

Add --details and it shows you each one: what the English used to say, what it says now, and what the translation currently says. That last part is the useful bit — you can usually tell in a second whether the translation still works.

A maintainer then runs npm run locales-drift -- --mark, which puts a $! in front of each stale translation. $! is the mark that means "the English behind this changed; translate it again," so the ordinary translation pass picks them up. Nothing new to learn — it's the same $?/$!/$~ system described above.

This one can fail the build

This check runs on every pull request, and again before anything is deployed. If your change rewrites an English string and leaves the translations behind, the build goes red and tells you so. That's deliberate: out-of-date text in thirty languages is exactly the kind of thing that never gets noticed unless something insists.

To make it pass, run npm run locales-drift -- --mark and commit the result. That doesn't translate anything — it just marks the affected strings so the next translation pass knows to redo them. You are not expected to translate thirty languages yourself.

Two things it deliberately won't do

  • It won't touch names. Re-translating the name of something — Phrase, Group, a list function like sans — through a machine tends to make two different things end up with the same word in a language, which breaks projects that use those names in code. Those are listed for a person to look at instead, and they never fail the build, because there's no button that fixes them.
  • It won't guess about your own language's wording. It only compares against English. If you improved a Spanish sentence and English never changed, that is not drift and it stays exactly as you wrote it.

The heads-up when you commit

You'll also see this in your terminal when you commit a change to the English files (src/locale/en-US/sections/) or the English tutorials:

! l10n: 3 en-US string(s) changed meaning in this commit, so their translations now describe the old English:

That's a warning, not an error. Your commit still goes through. It's telling you that thirty translations just fell out of date, so you'll want to run npm run l10n -- fix (which marks them) before you open your pull request. npm run l10n -- status shows the same thing at any time, in the drift column.

Stay in sync

(This section applies to the file-based workflow only — in-app submissions automate this for you by always operating on the latest main.)

As you write, there may be changes to the main branch, and others may contribute commits to your locale's branch.

  • Regularly run git pull in your branch, to pull in changes from your collaborators.
  • Regularly run git merge main while in your branch, so you have the latest code. This is key, as new features often generate new keys that need translation.
  • Run npm run locales in a terminal in VS Code and for yellow squiggles in VS code, to ensure you aren't violating any of the localization rules. Don't submit a locale for merging that has errors.
  • Commit and push frequently to your branch, so others can pull in your changes.
  • Coordinate with your collaborators on which sections each person is working on; use the keys in the JSON file (e.g. "I'm working on ui > page > login")

Merge rather than rebase, and sync often. Locale files change constantly on main, and unlike ordinary code they get re-translated in bulk, so a branch that sits for a couple of months will conflict on most of the strings it touches. Merging stops once, no matter how many commits you've made; rebasing stops once per commit and replays the same conflict each time. Merging also keeps the sides the right way round: in a merge, HEAD is your work, whereas during a rebase VS Code labels the project's content "Current" and your own commit "Incoming", which reads backwards from what you'd expect.

When you do hit a conflict, you'll see three sections rather than two, because npm install configures merge.conflictstyle=zdiff3 for this repository. The middle section is the common ancestor — the string as it was before either side touched it. Compare your version against it: if your line matches the ancestor exactly, you didn't write it, and you can safely take main's version. If both differ, you and a re-translation genuinely changed the same string, and you'll need to decide which reads better.

Verifying

So you've written a bit of translation and want to make sure you followed all the rules above?

First, you can rely on VS Code to catch some things. For example, it will do autocomplete and highlight any errors with your file's structure, using a schema that we wrote to specify what makes a valid locale or tutorial file. That should help with editing.

See where things stand

Before you start, and whenever you're unsure what to do next, open a terminal in VS Code (the Terminal menu, then New Terminal) and type:

npm run l10n

This reads every locale and your branch. It costs nothing and changes nothing, and takes a few seconds. It shows a table with one row per locale, counting:

  • unwritten $?: strings nobody has translated yet. Readers see English for these.
  • revised $!: strings whose English changed, waiting to be translated again.
  • machine $~: strings a machine translated and no person has reviewed. These are fine to ship; reviewing them is a great way to help.
  • drift: strings whose English you changed on this branch, so their translations now describe the old English.

Then it asks what you want to do: repair what can be repaired for free, check every locale, see what will happen when you commit, or have a check explained. Use the arrow keys to choose and Enter to confirm. Press Escape at any point to stop without doing anything. Whatever you choose, it prints the command it ran, so next time you can type that directly.

If you ever don't understand a problem it reports, each one names the check that found it. Type npm run l10n -- explain followed by that name (for example npm run l10n -- explain link-targets) to see why the check exists and how to fix what it found. Every command, and every option, is described in LOCALIZATION.md.

Find problems as you edit

But VS Code can't check everything, so we wrote a little tool to help you find more subtle problems. In the terminal, just type

npm run locales

And a little program will run (and re-run) every time you save your locale or tutorial files, and tell you about any problems, including unwritten strings, code with errors, invalid formatting, invalid concept links, and more. Keep chipping away at your translation until there are no more problems.

Two kinds of message deserve explaining, because they confuse everyone the first time:

  • Warnings (marked !) don't have to be fixed to submit; errors (marked ✗) do. You'll see a great many warnings about strings nobody has written yet in other people's locales. Those aren't yours and aren't your problem.
  • Some problems the tool can fix itself. Run npm run locales-fix and it will repair the mechanical ones — formatting, padding, invalid names — and rebuild the files it generates. Run it, then run npm run locales again to see what's left for a human.

That second point matters more than it sounds. Some files aren't written by anyone — they're built from the locale files:

  • Each locale's static/locales/<code>/<code>.json, the whole locale assembled from its sections folder. This is the one Wordplay actually loads.
  • static/locales/names.json, the index that lets the language chooser search for a language by name.
  • Each locale's static/locales/<code>/<code>-how.json, built from that locale's how folder of text files.
  • Each locale's static/manifests/<code>.webmanifest, which is what names Wordplay when someone installs it as an app on their phone, tablet, or computer. It takes the app's name from your locale's wordplay glossary word, its description from system.appDescription, and whether it reads left-to-right or right-to-left from your language's script.

If you rename something and don't rebuild them, our automated checks fail, and they fail on everyone's work, not just yours. npm run locales-fix rebuilds all of them. If you ever see a confusing failure mentioning one of those files, that's the fix.

One consequence worth knowing: system.appDescription is read outside the app, by the phone or computer someone is installing onto, so it has to make sense with no Wordplay around it to explain it. Keep it to one short sentence.

What happens when you commit

When you commit, git runs a short program first (a "pre-commit hook"). It always formats the files you're committing, so you never have to think about spacing. When you commit locale files, it also checks that the files built from them are still up to date, and stops the commit if they aren't. That can take from a few seconds to a few minutes, and it tells you why it's running before it starts.

If it stops your commit, it says what's out of date and how to fix it. Almost always that's:

npm run l10n -- fix

Then add the files it changed (git add followed by their names, or the + button in VS Code's Source Control panel) and commit again. If you're in a hurry and want to commit anyway, WORDPLAY_SKIP_SWEEP=1 git commit skips these checks once. Our automated checks will still catch it later, so fix it before you ask for a review.

To see what the hook will do before you commit, run npm run l10n -- hook.

Finally, part of fully testing your localization is checking strings in the application itself. View them as a creator would and ensure they make sense in context, and don't have layout issues. Correcting these may require changing the application, so either identify and make the needed change yourself or recruit a developer to collaborate with.

Fonts

An important part of supporting a language is finding fonts that support the language. Unfortunately, there aren't many outside the Latin character set. Fortunately, there are Noto fonts for most scripts. Find multiple open and free fonts that are appropriate, including the Noto font that supports the script, and any others you can find. The best place for these is Google Fonts.

Finding good fonts is the part only you can do, and it's genuinely useful even if you never touch the code: gather several open, freely licensed fonts that cover your script, note their names, and post them on your issue. A developer can take it from there.

If you'd like to add them yourself, here's how it works. Every font Wordplay ships is declared in one file, src/basis/faces/fonts.manifest.ts. You describe the font there — its name, which scripts it covers, which weights it has, whether it has italics — and then run a command that does everything else, including working out which characters the font actually contains. Don't edit any of the other font files; most of them are generated by that command, and a test will fail if you change one by hand.

  • Add an entry for your font to src/basis/faces/fonts.manifest.ts, copying the shape of an entry that's already there. Each field has a comment above it explaining what it's for.
  • If the font comes from Google Fonts, run npm run fonts-download, which fetches the font files and generates everything else.
  • If you have the font files from somewhere else, put them in static/fonts following the naming you see there, and run npm run fonts-fix.
  • Run npm run dev and check that your font appears in the font chooser and renders your language correctly once chosen.
  • Set it as the default face for your locale.

If the above is outside your skillset, ask someone else to do it before submitting your locale for final revision. We don't want to launch a locale without proper font support!

Submit your pull request (PR)

Ready to submit your localization for review?

For in-app submissions, the workspace's Submit form does this for you: it opens a pull request on wordplaydev/wordplay, fills the body with your rationale and a backtranslation table, and the success notice links you to it so you can follow review there. Skip the rest of this section unless you also have file-based changes.

For file-based submissions, submit your GitHub pull request manually. When you write your request, hopefully you've already been in contact with Amy, and so it isn't a surprise (though surprise locales are welcome). The team will review the localization for any technical problems and chat with you about how you want to be credited.

Because the team isn't likely to be able to review your translation, we do expect you to show it to someone else fluent in your language for feedback. Have them read it for any clarity issues before you submit, just as you would for any writing that was going to be widely read.

If everything looks good, we'll incorporate your draft, update SupportedLocales so that the world can see your writing, and then hopefully release it soon.

Once you're done, go back to the beginning and do some more localizing!

Clone this wiki locally