<feed xmlns='http://www.w3.org/2005/Atom'>
<title>coinosv3.git/android/app/src/main/java/url%2525252525252525252527, branch master</title>
<subtitle>coinos v3 — bitcoin, Ark, Lightning and nostr wallet (web + Android)</subtitle>
<id>https://git.coinos.io/coinosv3.git/atom?h=master</id>
<link rel='self' href='https://git.coinos.io/coinosv3.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.coinos.io/coinosv3.git/'/>
</feed>
 feed' href='https://git.coinos.io/coinos-ui.git/atom/doc/i18n-technical.md?h=notice' type='application/atom+xml'/>
<link rel='vcs-git' href='https://git.coinos.io/coinos-ui.git' title='coinos-ui.git Git repository'/>
</head>
<body>
<div id='cgit'><table id='header'>
<tr>
<td class='logo' rowspan='2'><a href='/'><img src='/cgit.png' alt='cgit logo'/></a></td>
<td class='main'><a href='/'>index</a> : <a href='/coinos-ui.git/'>coinos-ui.git</a></td><td class='form'><form method='get'>
<input type='hidden' name='id' value='702e6ed3516be6dbd82afbffcb3eb4704a3e03b4'/><select name='h' onchange='this.form.submit();'>
<option value='HEAD'>HEAD</option>
<option value='amber'>amber</option>
<option value='ark'>ark</option>
<option value='auto-withdrawals'>auto-withdrawals</option>
<option value='base'>base</option>
<option value='bigmap'>bigmap</option>
<option value='biz-card'>biz-card</option>
<option value='channels'>channels</option>
<option value='dark'>dark</option>
<option value='date-picker'>date-picker</option>
<option value='deps-upgrade'>deps-upgrade</option>
<option value='ecash'>ecash</option>
<option value='es'>es</option>
<option value='fee-slider'>fee-slider</option>
<option value='fund-access'>fund-access</option>
<option value='geocode'>geocode</option>
<option value='getroutes'>getroutes</option>
<option value='hashme'>hashme</option>
<option value='i18n'>i18n</option>
<option value='icons'>icons</option>
<option value='invoice-requests'>invoice-requests</option>
<option value='items'>items</option>
<option value='key-import'>key-import</option>
<option value='layout-updates'>layout-updates</option>
<option value='liquid'>liquid</option>
<option value='lnurl-fiat'>lnurl-fiat</option>
<option value='master'>master</option>
<option value='maven'>maven</option>
<option value='new-qr-scanner'>new-qr-scanner</option>
<option value='nfc'>nfc</option>
<option value='nip17dm'>nip17dm</option>
<option value='nip17dm-fixes'>nip17dm-fixes</option>
<option value='nostr-login'>nostr-login</option>
<option value='nostr-tools'>nostr-tools</option>
<option value='notice' selected='selected'>notice</option>
<option value='notifications'>notifications</option>
<option value='numpad'>numpad</option>
<option value='old-sveltekit'>old-sveltekit</option>
<option value='poster-map'>poster-map</option>
<option value='prod'>prod</option>
<option value='sc-wallet'>sc-wallet</option>
<option value='self-custody'>self-custody</option>
<option value='send-fiat'>send-fiat</option>
<option value='separate-homepage'>separate-homepage</option>
<option value='staging'>staging</option>
<option value='static-qr'>static-qr</option>
<option value='sticker'>sticker</option>
<option value='svelte-5'>svelte-5</option>
<option value='swapee'>swapee</option>
<option value='test'>test</option>
<option value='tickets'>tickets</option>
<option value='video'>video</option>
<option value='welcome-page'>welcome-page</option>
<option value='well'>well</option>
</select> <input type='submit' value='switch'/></form></td></tr>
<tr><td class='sub'>coinos ui — legacy coinos.io web app (SvelteKit)</td><td class='sub right'>coinos</td></tr></table>
<table class='tabs'><tr><td>
<a href='/coinos-ui.git/about/?h=notice'>about</a><a href='/coinos-ui.git/?h=notice'>summary</a><a href='/coinos-ui.git/refs/?h=notice&amp;id=702e6ed3516be6dbd82afbffcb3eb4704a3e03b4'>refs</a><a href='/coinos-ui.git/log/doc/i18n-technical.md?h=notice'>log</a><a class='active' href='/coinos-ui.git/tree/doc/i18n-technical.md?h=notice&amp;id=702e6ed3516be6dbd82afbffcb3eb4704a3e03b4'>tree</a><a href='/coinos-ui.git/commit/doc/i18n-technical.md?h=notice&amp;id=702e6ed3516be6dbd82afbffcb3eb4704a3e03b4'>commit</a><a href='/coinos-ui.git/diff/doc/i18n-technical.md?h=notice&amp;id=702e6ed3516be6dbd82afbffcb3eb4704a3e03b4'>diff</a><a href='/coinos-ui.git/stats/doc/i18n-technical.md?h=notice'>stats</a></td><td class='form'><form class='right' method='get' action='/coinos-ui.git/log/doc/i18n-technical.md'>
<input type='hidden' name='h' value='notice'/><input type='hidden' name='id' value='702e6ed3516be6dbd82afbffcb3eb4704a3e03b4'/><select name='qt'>
<option value='grep'>log msg</option>
<option value='author'>author</option>
<option value='committer'>committer</option>
<option value='range'>range</option>
</select>
<input class='txt' type='search' size='10' name='q' value=''/>
<input type='submit' value='search'/>
</form>
</td></tr></table>
<div class='path'>path: <a href='/coinos-ui.git/tree/?h=notice&amp;id=702e6ed3516be6dbd82afbffcb3eb4704a3e03b4'>root</a>/<a href='/coinos-ui.git/tree/doc?h=notice&amp;id=702e6ed3516be6dbd82afbffcb3eb4704a3e03b4'>doc</a>/<a href='/coinos-ui.git/tree/doc/i18n-technical.md?h=notice&amp;id=702e6ed3516be6dbd82afbffcb3eb4704a3e03b4'>i18n-technical.md</a></div><div class='content'>blob: 3f6a09d58b7d0956a434306ebd3ffb74f388e6f8 (<a href='/coinos-ui.git/plain/doc/i18n-technical.md?h=notice&amp;id=702e6ed3516be6dbd82afbffcb3eb4704a3e03b4'>plain</a>) (<a href='/coinos-ui.git/blame/doc/i18n-technical.md?h=notice&amp;id=702e6ed3516be6dbd82afbffcb3eb4704a3e03b4'>blame</a>)
<table summary='blob content' class='blob'>
<tr><td class='linenumbers'><pre><a id='n1' href='#n1'>1</a>
<a id='n2' href='#n2'>2</a>
<a id='n3' href='#n3'>3</a>
<a id='n4' href='#n4'>4</a>
<a id='n5' href='#n5'>5</a>
<a id='n6' href='#n6'>6</a>
<a id='n7' href='#n7'>7</a>
<a id='n8' href='#n8'>8</a>
<a id='n9' href='#n9'>9</a>
<a id='n10' href='#n10'>10</a>
<a id='n11' href='#n11'>11</a>
<a id='n12' href='#n12'>12</a>
<a id='n13' href='#n13'>13</a>
<a id='n14' href='#n14'>14</a>
<a id='n15' href='#n15'>15</a>
<a id='n16' href='#n16'>16</a>
<a id='n17' href='#n17'>17</a>
<a id='n18' href='#n18'>18</a>
<a id='n19' href='#n19'>19</a>
<a id='n20' href='#n20'>20</a>
<a id='n21' href='#n21'>21</a>
<a id='n22' href='#n22'>22</a>
<a id='n23' href='#n23'>23</a>
<a id='n24' href='#n24'>24</a>
<a id='n25' href='#n25'>25</a>
<a id='n26' href='#n26'>26</a>
<a id='n27' href='#n27'>27</a>
<a id='n28' href='#n28'>28</a>
<a id='n29' href='#n29'>29</a>
<a id='n30' href='#n30'>30</a>
<a id='n31' href='#n31'>31</a>
<a id='n32' href='#n32'>32</a>
<a id='n33' href='#n33'>33</a>
<a id='n34' href='#n34'>34</a>
<a id='n35' href='#n35'>35</a>
<a id='n36' href='#n36'>36</a>
<a id='n37' href='#n37'>37</a>
<a id='n38' href='#n38'>38</a>
<a id='n39' href='#n39'>39</a>
<a id='n40' href='#n40'>40</a>
<a id='n41' href='#n41'>41</a>
<a id='n42' href='#n42'>42</a>
<a id='n43' href='#n43'>43</a>
<a id='n44' href='#n44'>44</a>
<a id='n45' href='#n45'>45</a>
<a id='n46' href='#n46'>46</a>
<a id='n47' href='#n47'>47</a>
<a id='n48' href='#n48'>48</a>
<a id='n49' href='#n49'>49</a>
<a id='n50' href='#n50'>50</a>
<a id='n51' href='#n51'>51</a>
<a id='n52' href='#n52'>52</a>
</pre></td>
<td class='lines'><pre><code><style>pre { line-height: 125%; }
td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
.highlight .hll { background-color: #ffffcc }
.highlight .c { color: #888 } /* Comment */
.highlight .err { color: #A61717; background-color: #E3D2D2 } /* Error */
.highlight .k { color: #080; font-weight: bold } /* Keyword */
.highlight .ch { color: #888 } /* Comment.Hashbang */
.highlight .cm { color: #888 } /* Comment.Multiline */
.highlight .cp { color: #C00; font-weight: bold } /* Comment.Preproc */
.highlight .cpf { color: #888 } /* Comment.PreprocFile */
.highlight .c1 { color: #888 } /* Comment.Single */
.highlight .cs { color: #C00; font-weight: bold; background-color: #FFF0F0 } /* Comment.Special */
.highlight .gd { color: #000; background-color: #FDD } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */
.highlight .gr { color: #A00 } /* Generic.Error */
.highlight .gh { color: #333 } /* Generic.Heading */
.highlight .gi { color: #000; background-color: #DFD } /* Generic.Inserted */
.highlight .go { color: #888 } /* Generic.Output */
.highlight .gp { color: #555 } /* Generic.Prompt */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #666 } /* Generic.Subheading */
.highlight .gt { color: #A00 } /* Generic.Traceback */
.highlight .kc { color: #080; font-weight: bold } /* Keyword.Constant */
.highlight .kd { color: #080; font-weight: bold } /* Keyword.Declaration */
.highlight .kn { color: #080; font-weight: bold } /* Keyword.Namespace */
.highlight .kp { color: #080 } /* Keyword.Pseudo */
.highlight .kr { color: #080; font-weight: bold } /* Keyword.Reserved */
.highlight .kt { color: #888; font-weight: bold } /* Keyword.Type */
.highlight .m { color: #00D; font-weight: bold } /* Literal.Number */
.highlight .s { color: #D20; background-color: #FFF0F0 } /* Literal.String */
.highlight .na { color: #369 } /* Name.Attribute */
.highlight .nb { color: #038 } /* Name.Builtin */
.highlight .nc { color: #B06; font-weight: bold } /* Name.Class */
.highlight .no { color: #036; font-weight: bold } /* Name.Constant */
.highlight .nd { color: #555 } /* Name.Decorator */
.highlight .ne { color: #B06; font-weight: bold } /* Name.Exception */
.highlight .nf { color: #06B; font-weight: bold } /* Name.Function */
.highlight .nl { color: #369; font-style: italic } /* Name.Label */
.highlight .nn { color: #B06; font-weight: bold } /* Name.Namespace */
.highlight .py { color: #369; font-weight: bold } /* Name.Property */
.highlight .nt { color: #B06; font-weight: bold } /* Name.Tag */
.highlight .nv { color: #369 } /* Name.Variable */
.highlight .ow { color: #080 } /* Operator.Word */
.highlight .w { color: #BBB } /* Text.Whitespace */
.highlight .mb { color: #00D; font-weight: bold } /* Literal.Number.Bin */
.highlight .mf { color: #00D; font-weight: bold } /* Literal.Number.Float */
.highlight .mh { color: #00D; font-weight: bold } /* Literal.Number.Hex */
.highlight .mi { color: #00D; font-weight: bold } /* Literal.Number.Integer */
.highlight .mo { color: #00D; font-weight: bold } /* Literal.Number.Oct */
.highlight .sa { color: #D20; background-color: #FFF0F0 } /* Literal.String.Affix */
.highlight .sb { color: #D20; background-color: #FFF0F0 } /* Literal.String.Backtick */
.highlight .sc { color: #D20; background-color: #FFF0F0 } /* Literal.String.Char */
.highlight .dl { color: #D20; background-color: #FFF0F0 } /* Literal.String.Delimiter */
.highlight .sd { color: #D20; background-color: #FFF0F0 } /* Literal.String.Doc */
.highlight .s2 { color: #D20; background-color: #FFF0F0 } /* Literal.String.Double */
.highlight .se { color: #04D; background-color: #FFF0F0 } /* Literal.String.Escape */
.highlight .sh { color: #D20; background-color: #FFF0F0 } /* Literal.String.Heredoc */
.highlight .si { color: #33B; background-color: #FFF0F0 } /* Literal.String.Interpol */
.highlight .sx { color: #2B2; background-color: #F0FFF0 } /* Literal.String.Other */
.highlight .sr { color: #080; background-color: #FFF0FF } /* Literal.String.Regex */
.highlight .s1 { color: #D20; background-color: #FFF0F0 } /* Literal.String.Single */
.highlight .ss { color: #A60; background-color: #FFF0F0 } /* Literal.String.Symbol */
.highlight .bp { color: #038 } /* Name.Builtin.Pseudo */
.highlight .fm { color: #06B; font-weight: bold } /* Name.Function.Magic */
.highlight .vc { color: #369 } /* Name.Variable.Class */
.highlight .vg { color: #D70 } /* Name.Variable.Global */
.highlight .vi { color: #33B } /* Name.Variable.Instance */
.highlight .vm { color: #369 } /* Name.Variable.Magic */
.highlight .il { color: #00D; font-weight: bold } /* Literal.Number.Integer.Long */</style><div class="highlight"><pre><span></span><span class="gh"># coinos Internationalization - Technical Information</span>

<span class="ge">_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._</span>

Last Updated: 2022-08-23

<span class="gu">## Dependencies</span>

coinos&#39;s internationalization system depends on the <span class="sb">`npm`</span> package [<span class="sb">`sveltekit-i18n`</span>](https://www.npmjs.com/package/sveltekit-i18n). Consider reading [<span class="nt">its documentation</span>](<span class="na">https://github.com/sveltekit-i18n/lib/tree/master/docs/README.md</span>) in addition to this.

<span class="gu">## Internationalization Code</span>

The main code for coinos&#39;s internationalization is at <span class="sb">`src/lib/translations/index.js`</span>. When imported, it does the following:

<span class="k">1.</span> Load all of the locales asynchronously, based on .
<span class="k">2.</span> Initialize <span class="sb">`sveltekit-i18n`</span>.

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

<span class="gu">## Locale Files</span>

Each locale in <span class="sb">`coinos-ui-v2`</span> is defined by a JSON file in <span class="sb">`src/locales`</span>. Its name is the locale&#39;s [<span class="nt">ISO 639-1 code</span>](<span class="na">https://en.wikipedia.org/wiki/ISO_639-1</span>) plus <span class="sb">`.json`</span>. It is simply a file that maps string IDs to translated strings. Here is an example of <span class="sb">`en.json`</span>:

<span class="sb">```json</span>
<span class="p">{</span>
<span class="w">	</span><span class="nt">&quot;howItWorks&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;How it works&quot;</span><span class="p">,</span>
<span class="w">	</span><span class="nt">&quot;faq&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;FAQ&quot;</span><span class="p">,</span>
<span class="w">	</span><span class="nt">&quot;about&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;About&quot;</span><span class="p">,</span>
<span class="w">	</span><span class="nt">&quot;startInSeconds&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;Start in Seconds&quot;</span><span class="p">,</span>
<span class="w">	</span><span class="nt">&quot;signIn&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;Sign In&quot;</span>
<span class="p">}</span>
<span class="sb">```</span>

<span class="gu">## Internationalizing Strings</span>

Strings are internationalized by simply using <span class="sb">`sveltekit-i18n`</span>&#39;s <span class="sb">`$t`</span> function. A localized string looks like this:

<span class="sb">```</span>
<span class="sb">{$t(&#39;stringID&#39;)}</span>
<span class="sb">```</span>

<span class="gu">## The Locale Selector</span>

coinos also has a <span class="sb">`LocaleSelector`</span> component, which should be used to select locales. It is a dropdown that allows you to select &amp; update the locale.

<span class="gu">## The Guided Translation Script</span>

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

<span class="k">-</span><span class="w"> </span><span class="sb">`nested_dict_keys`</span> - gets a list of keys of a nested dictionary in dot-separated shallow format (e.g. a.b.c)
<span class="k">-</span><span class="w"> </span><span class="sb">`create_locale`</span> - adds a new locale to the lang.json file
<span class="k">-</span><span class="w"> </span><span class="sb">`localize_string`</span> - localizes a string interactively
</pre></div>
</code></pre></td></tr></table>
</div> <!-- class=content -->
<div class='footer'>generated by <a href='https://git.zx2c4.com/cgit/about/'>cgit v1.2.3</a> (<a href='https://git-scm.com/'>git 2.51.0</a>) at 2026-12-06 00:40:32 +0000</div>
</div> <!-- id=cgit -->
</body>
</html>
