---
title: "Internationalization"
canonical_url: https://developer.repebble.com/pebbleos/docs/subsystems/i18n/
last_updated: 2026-11-09
sdk_version: 4.44
---
# Internationalization

Source: https://developer.repebble.com/pebbleos/docs/subsystems/i18n/

`subsys/i18n/` translates strings with a gettext message catalog (an MO file). Its public API is `include/pbl/i18n/i18n.h`, enabled with `CONFIG_I18N`.

## Translating

Strings are looked up by their English original. Without a catalog, or without a translation, the original is returned, so code is written in English and works the same before any language is installed:

```
text\_layer\_set\_text(&data-\>title, pbl\_i18n\_get("Settings", data));...pbl\_i18n\_free\_all(data);
```

`pbl_i18n_get()` caches the translation for an owner until it is freed; `pbl_i18n_get_with_buffer()` translates into a caller buffer and caches nothing. The `i18n_ctx_*` variants attach a context to tell identical originals apart. Strings that cannot be translated in place, such as constant initializers, are marked with `pbl_i18n_noop()` or `pbl_i18n_ctx_noop()` so they are still extracted. The build extracts every marked string into `pebbleos.pot`.

## Catalogs

The subsystem does not know where catalogs are stored. Its user sets one with `pbl_i18n_set_catalog()`, providing a reader, its data and the catalog size; setting another catalog, or none, frees every cached translation. `pbl_i18n_catalog_get_info()` reads a catalog’s locale, language name and version from its header without setting it.

In the firmware, the language pack service (`fw/services/language_pack/`) sets the catalog of the selected language pack, read from system resources, and sets it again when the pack file changes. See [Language pack management](https://developer.repebble.com/pebbleos/docs/reference/language-packs.md) for how packs are installed and selected.

Generated from PebbleOS [f3212a729](https://github.com/coredevices/pebbleos/commit/f3212a72989b0c88945e5f4beb36af8c8f78aa08). This page is maintained in the pebbleos repository: [docs/subsystems/i18n.md](https://github.com/coredevices/pebbleos/blob/f3212a72989b0c88945e5f4beb36af8c8f78aa08/docs/subsystems/i18n.md).
