Skip to content

Commit

Permalink
fixed translation docs index number and linked it on table of contents
Browse files Browse the repository at this point in the history
  • Loading branch information
novcmbro committed Jun 15, 2024
1 parent 14ce86d commit 29555fc
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/en/feature-translation.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Decoder - 2. Features
## 2.1. Translation
## 2.2. Translation
### translation.js
The initial language code value is detected through `navigator.language` and saved locally in the browser in `localStorage`. If the browser does not support `navigator` method, the initial language will be English. The stored code is used to access `languages` object, which contains translations texts from [`/locales`](/src/locales) directory. The translations are inserted into document elements by `data-translation` attribute, which contains the key(s) to access the corresponding text.

Expand Down
1 change: 1 addition & 0 deletions docs/en/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Index | Title
1 | [Project Structure](/docs/en/project-structure.md)
2 | [Features](/docs/en/features.md)
2.1 | [Features - Theme](/docs/en/feature-theme.md)
2.2 | [Features - Translation](/docs/en/feature-translation.md)

<br>

Expand Down
2 changes: 1 addition & 1 deletion docs/pt/feature-translation.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Decoder - 2. Funcionalidades
## 2.1. Tradução
## 2.2. Tradução
### translation.js
O valor inicial do código do idioma é detectado através de `navigator.language` e salvo localmente no navegador em `localStorage`. Se o navegador não suportar o método `navigator`, o idioma inicial será Inglês. O código armazenado é usado para acessar o objeto `languages`, que contém textos de traduções do diretório [`/locales`](/src/locales). As traduções são inseridas nos elementos do documento pelo atributo `data-translation`, que contém a(s) chave(s) para acessar o texto correspondente.

Expand Down
1 change: 1 addition & 0 deletions docs/pt/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
1 | [Estrutura do projeto](/docs/pt/project-structure.md)
2 | [Funcionalidades](/docs/pt/features.md)
2.1 | [Funcionalidades - Tema](/docs/pt/feature-theme.md)
2.2 | [Funcionalidades - Tradução](/docs/pt/feature-translation.md)

<br>

Expand Down

0 comments on commit 29555fc

Please sign in to comment.