Skip to content

Commit

Permalink
Update i18n.md (#574)
Browse files Browse the repository at this point in the history
title case
  • Loading branch information
bpaulien authored Dec 11, 2024
1 parent eafd128 commit 3687e7a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/contributing/i18n.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ Currently, Actual Budget **is not yet ready** to receive community translations.

:::

## Current status
## Current Status

Actual is currently being prepared for internationalization (i18n). This means that initially everything in the app was English, but we're slowly marking all texts for translation.

## Marking for translation
## Marking for Translation

Developing translated software requires that every text shown to the user passes through a translation function. Actual uses [i18next](https://www.i18next.com/) to achieve this goal.

Expand All @@ -28,7 +28,7 @@ When preparing your translatable strings, please use complete units to translate

The translation framework provides two primary methods for translation:

### `t()` function
### `t()` Function

The `t()` function is the simplest form of translation, it accepts the text to be translated and an optional object with interpolation variables. We're using the `i18next` singleton instance. You can use the hook within React components to get a reference to it.

Expand Down Expand Up @@ -56,7 +56,7 @@ const manyItems = t('You selected {{count}} items', { count: 4 });

i18next will take care of proper pluralization rules in the currently active language and provide multiple different forms if required.

### `<Trans>` component
### `<Trans>` Component

When translating text with simple HTML tags or other React components, you will need to use the [`<Trans>` component](https://react.i18next.com/latest/trans-component).

Expand Down

0 comments on commit 3687e7a

Please sign in to comment.