<aside> đĄ
Please provide improvements and be patient with this document as we work through all the different use cases when it comes to localizing strings in the web UI.
</aside>
Because we support localization, adding text is a little more complicated than just typing it on the page. Itâs all a part of a maturing project. But once you do it a couple of times, youâll have it figured out.
We use the following tools to accomplish this, but you donât have to worry about most of them.
Tool | Description |
---|---|
Owncast Translation Component | Custom component used for displaying translated strings. |
i18next | Used for parsing and exporting translatable strings from our source code. |
next-export-i18n | Used to handle localization for Next.js statically exported sites. |
Cowdin | Web service used for performing the actual translation of strings. Users can create accounts to assist in the translation process. |
Thereâs two parts to understand when adding a new translated string:
The first thing you must do when creating a new translatable string is to assign it a key.
localization.ts
Admin â EditInstanceDetails
, for example).Frontend
or Admin
respectively.helloWorld: âAdmin.EditInstanceDetails.HelloWorldâ
for a new piece of text that says âHello, worldâ in the Edit Instance Details section of the Admin.For most cases where you want to display a string in the web interface, you will be using the Translation
component. You donât have to know how itâs built or internally how it works. But simply how to use it. Itâs the easiest and fastest way to get things done.