aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/LandingHeader.svelte
diff options
context:
space:
mode:
authorAdrien Hopkins <[email protected]>2026-02-14 09:57:08 -0500
committerAdam Soltys <[email protected]>2026-02-14 17:50:13 -0800
commite4fcbff25f21c21bc5259b41f409f79516b5ab60 (patch)
treed44de95290d3f85ea30903cb297e5424300e4c53 /src/components/LandingHeader.svelte
parent67e4701cfbc99aaafc6c8418053439d62337e18b (diff)
downloadcoinos-ui-e4fcbff25f21c21bc5259b41f409f79516b5ab60.tar.gz
coinos-ui-e4fcbff25f21c21bc5259b41f409f79516b5ab60.zip
Increase DM fetch limit to 2^16
Given that this is for all recipients combined, 2^16 is much more reasonable than 2^8.
Diffstat (limited to 'src/components/LandingHeader.svelte')
0 files changed, 0 insertions, 0 deletions
[email protected]> 2022-09-13 19:39:53 -0600 committer secondl1ght <[email protected]> 2022-09-13 19:39:53 -0600 update CoinOS to coinos' href='/coinos-ui.git/commit/doc/i18n-technical.md?h=sc-wallet&id=c31388c1931affef331686a91b82bf1689e751fa'>c31388c1 ^
b156efdf ^


c31388c1 ^
c26e004f ^
bd132fd1 ^
f6ff5156 ^
b156efdf ^
f6ff5156 ^
b156efdf ^


c26e004f ^
b156efdf ^


216a6002 ^




b156efdf ^




bd132fd1 ^
b156efdf ^

0ebb60f9 ^
b156efdf ^

b156efdf ^

c31388c1 ^
c80b3767 ^


c31388c1 ^
eeb4f8e9 ^
c80b3767 ^
bd132fd1 ^
c80b3767 ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
                                                     
 
                                                                                                                                                                           
 
                        


               
                                                                                                                                                                                                                                                               


                            
                                                                                                                            
 
                                                     
                               
 
                                                                                                                                                                                                                                                                            


               
                                                                                                                                                                                                                                                                           


       




                                       




                             
                                                                                                                   

   
                

   

                      
                                                                                                                                                     


                                
                                                                                                                                                                            
 
                                                                                                              
                                                           
                                                      
# coinos Internationalization - Technical Information

_NOTE: This documentation was written for people with a technical background. If you do not have a technical background, consider reading [this guide](./i18n.md) instead._

Last Updated: 2022-08-23

## Dependencies

coinos's internationalization system depends on the `npm` package [`sveltekit-i18n`](https://www.npmjs.com/package/sveltekit-i18n). Consider reading [its documentation](https://github.com/sveltekit-i18n/lib/tree/master/docs/README.md) in addition to this.

## Internationalization Code

The main code for coinos's internationalization is at `src/lib/translations/index.js`. When imported, it does the following:

1. Load all of the locales asynchronously, based on .
2. Initialize `sveltekit-i18n`.

It also defines important constants, including the list of available locales and the default locale. This code is loaded by importing `$lib/translations` in `src/routes/+layout.svelte`. This code, which runs in the frontend, also persists the locale in `localStorage`.

## Locale Files

Each locale in `coinos-ui-v2` is defined by a JSON file in `src/locales`. Its name is the locale's [ISO 639-1 code](https://en.wikipedia.org/wiki/ISO_639-1) plus `.json`. It is simply a file that maps string IDs to translated strings. Here is an example of `en.json`:

```json
{
  "howItWorks": "How it works",
  "faq": "FAQ",
  "about": "About",
  "startInSeconds": "Start in Seconds",
  "signIn": "Sign In"
}
```

## Internationalizing Strings

Strings are internationalized by simply using `sveltekit-i18n`'s `$t` function. A localized string looks like this:

```
{$t('stringID')}
```

## The Locale Selector

coinos also has a `LocaleSelector` component, which should be used to select locales. It is a dropdown that allows you to select & update the locale.

## The Guided Translation Script

coinos has a Python script that helps you with the technical parts of translation. It is located at `src/locales/guided_translation.py`. It also has some utility functions:

- `nested_dict_keys` - gets a list of keys of a nested dictionary in dot-separated shallow format (e.g. a.b.c)
- `create_locale` - adds a new locale to the lang.json file
- `localize_string` - localizes a string interactively