---
name: "mini18n_set_locale"
section: "3"
platform: "linux"
package: "libmini18n-dev"
version: "0.2.1-2+b2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/mini18n_set_locale"
---

# mini18n\_set\_locale(3)

load translations

## NAME

mini18n\_set\_locale, mini18n\_set\_domain - load translations

## SYNOPSIS

**#include \<mini18n.h\>**

**int mini18n\_set\_locale(const char \* filepath);**

**int mini18n\_set\_domain(const char \* dirpath);**

## DESCRIPTION

**mini18n\_set\_locale()** loads a translation from the specified *filepath*.

**mini18n\_set\_domain()** loads a translation matching the system language. The translation file is searched in the directory specified by *dirpath*. If *dirpath* is NULL, the translation is searched in the current directory.

## RETURN VALUE

These functions return 0 if successful and -1 otherwise.
