This commit is contained in:
macobo 2024-06-13 06:56:54 +00:00
parent 1360bc6751
commit 727af57ee5
394 changed files with 1095 additions and 1095 deletions

4
.build
View File

@ -414,8 +414,8 @@ dist/merriweather-latin-ext-300-normal-K6L27CZ5.woff2
dist/merriweather-vietnamese-300-italic-EHHNZPUO.woff2
dist/merriweather-vietnamese-300-normal-U376L4Z4.woff2
dist/remixicon-NKANDIL5.woff2
dist/search_data-9536E80A.js
dist/sidebar_items-E3A5DD79.js
dist/search_data-8AE7B0EB.js
dist/sidebar_items-808B55A7.js
index.html
readme.html
search.html

View File

@ -16,7 +16,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>
@ -1153,23 +1153,23 @@ pool to disconnect within the given interval.</p><p>See <a href="https://hexdocs
<section class="docstring">
<p>Similar to <a href="#insert_all/2"><code class="inline">insert_all/2</code></a> but with the following differences:</p><ul><li>accepts rows as streams or lists</li><li>sends rows as a chunked request</li><li>doesn't autogenerate ids or does any other preprocessing</li></ul><p>Example:</p><pre><code class="makeup elixir" translate="no"><span class="nc">Repo</span><span class="o">.</span><span class="n">query!</span><span class="p" data-group-id="9338896479-1">(</span><span class="s">&quot;create table ecto_ch_demo(a UInt64, b String) engine Null&quot;</span><span class="p" data-group-id="9338896479-1">)</span><span class="w">
<p>Similar to <a href="#insert_all/2"><code class="inline">insert_all/2</code></a> but with the following differences:</p><ul><li>accepts rows as streams or lists</li><li>sends rows as a chunked request</li><li>doesn't autogenerate ids or does any other preprocessing</li></ul><p>Example:</p><pre><code class="makeup elixir" translate="no"><span class="nc">Repo</span><span class="o">.</span><span class="n">query!</span><span class="p" data-group-id="0999279091-1">(</span><span class="s">&quot;create table ecto_ch_demo(a UInt64, b String) engine Null&quot;</span><span class="p" data-group-id="0999279091-1">)</span><span class="w">
</span><span class="kd">defmodule</span><span class="w"> </span><span class="nc">Demo</span><span class="w"> </span><span class="k" data-group-id="9338896479-2">do</span><span class="w">
</span><span class="kd">defmodule</span><span class="w"> </span><span class="nc">Demo</span><span class="w"> </span><span class="k" data-group-id="0999279091-2">do</span><span class="w">
</span><span class="kn">use</span><span class="w"> </span><span class="nc">Ecto.Schema</span><span class="w">
</span><span class="na">@primary_key</span><span class="w"> </span><span class="no">false</span><span class="w">
</span><span class="n">schema</span><span class="w"> </span><span class="s">&quot;ecto_ch_demo&quot;</span><span class="w"> </span><span class="k" data-group-id="9338896479-3">do</span><span class="w">
</span><span class="n">schema</span><span class="w"> </span><span class="s">&quot;ecto_ch_demo&quot;</span><span class="w"> </span><span class="k" data-group-id="0999279091-3">do</span><span class="w">
</span><span class="n">field</span><span class="w"> </span><span class="ss">:a</span><span class="p">,</span><span class="w"> </span><span class="nc">Ch</span><span class="p">,</span><span class="w"> </span><span class="ss">type</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;UInt64&quot;</span><span class="w">
</span><span class="n">field</span><span class="w"> </span><span class="ss">:b</span><span class="p">,</span><span class="w"> </span><span class="ss">:string</span><span class="w">
</span><span class="k" data-group-id="9338896479-3">end</span><span class="w">
</span><span class="k" data-group-id="9338896479-2">end</span><span class="w">
</span><span class="k" data-group-id="0999279091-3">end</span><span class="w">
</span><span class="k" data-group-id="0999279091-2">end</span><span class="w">
</span><span class="n">rows</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nc">Stream</span><span class="o">.</span><span class="n">map</span><span class="p" data-group-id="9338896479-4">(</span><span class="mi">1</span><span class="o">..</span><span class="mi">100_000</span><span class="p">,</span><span class="w"> </span><span class="k" data-group-id="9338896479-5">fn</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">-&gt;</span><span class="w"> </span><span class="p" data-group-id="9338896479-6">%{</span><span class="ss">a</span><span class="p">:</span><span class="w"> </span><span class="n">i</span><span class="p">,</span><span class="w"> </span><span class="ss">b</span><span class="p">:</span><span class="w"> </span><span class="n">to_string</span><span class="p" data-group-id="9338896479-7">(</span><span class="n">i</span><span class="p" data-group-id="9338896479-7">)</span><span class="p" data-group-id="9338896479-6">}</span><span class="w"> </span><span class="k" data-group-id="9338896479-5">end</span><span class="p" data-group-id="9338896479-4">)</span><span class="w">
</span><span class="p" data-group-id="9338896479-8">{</span><span class="mi">100_000</span><span class="p">,</span><span class="w"> </span><span class="no">nil</span><span class="p" data-group-id="9338896479-8">}</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nc">Repo</span><span class="o">.</span><span class="n">insert_stream</span><span class="p" data-group-id="9338896479-9">(</span><span class="nc">Demo</span><span class="p">,</span><span class="w"> </span><span class="n">rows</span><span class="p" data-group-id="9338896479-9">)</span><span class="w">
</span><span class="n">rows</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nc">Stream</span><span class="o">.</span><span class="n">map</span><span class="p" data-group-id="0999279091-4">(</span><span class="mi">1</span><span class="o">..</span><span class="mi">100_000</span><span class="p">,</span><span class="w"> </span><span class="k" data-group-id="0999279091-5">fn</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">-&gt;</span><span class="w"> </span><span class="p" data-group-id="0999279091-6">%{</span><span class="ss">a</span><span class="p">:</span><span class="w"> </span><span class="n">i</span><span class="p">,</span><span class="w"> </span><span class="ss">b</span><span class="p">:</span><span class="w"> </span><span class="n">to_string</span><span class="p" data-group-id="0999279091-7">(</span><span class="n">i</span><span class="p" data-group-id="0999279091-7">)</span><span class="p" data-group-id="0999279091-6">}</span><span class="w"> </span><span class="k" data-group-id="0999279091-5">end</span><span class="p" data-group-id="0999279091-4">)</span><span class="w">
</span><span class="p" data-group-id="0999279091-8">{</span><span class="mi">100_000</span><span class="p">,</span><span class="w"> </span><span class="no">nil</span><span class="p" data-group-id="0999279091-8">}</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nc">Repo</span><span class="o">.</span><span class="n">insert_stream</span><span class="p" data-group-id="0999279091-9">(</span><span class="nc">Demo</span><span class="p">,</span><span class="w"> </span><span class="n">rows</span><span class="p" data-group-id="0999279091-9">)</span><span class="w">
</span><span class="c1"># schemaless</span><span class="w">
</span><span class="p" data-group-id="9338896479-10">{</span><span class="mi">100_000</span><span class="p">,</span><span class="w"> </span><span class="no">nil</span><span class="p" data-group-id="9338896479-10">}</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nc">Repo</span><span class="o">.</span><span class="n">insert_stream</span><span class="p" data-group-id="9338896479-11">(</span><span class="s">&quot;ecto_ch_demo&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">rows</span><span class="p">,</span><span class="w"> </span><span class="ss">types</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="9338896479-12">[</span><span class="ss">a</span><span class="p">:</span><span class="w"> </span><span class="nc">Ch.Types</span><span class="o">.</span><span class="n">u64</span><span class="p" data-group-id="9338896479-13">(</span><span class="p" data-group-id="9338896479-13">)</span><span class="p">,</span><span class="w"> </span><span class="ss">b</span><span class="p">:</span><span class="w"> </span><span class="ss">:string</span><span class="p" data-group-id="9338896479-12">]</span><span class="p" data-group-id="9338896479-11">)</span></code></pre>
</span><span class="p" data-group-id="0999279091-10">{</span><span class="mi">100_000</span><span class="p">,</span><span class="w"> </span><span class="no">nil</span><span class="p" data-group-id="0999279091-10">}</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nc">Repo</span><span class="o">.</span><span class="n">insert_stream</span><span class="p" data-group-id="0999279091-11">(</span><span class="s">&quot;ecto_ch_demo&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">rows</span><span class="p">,</span><span class="w"> </span><span class="ss">types</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="0999279091-12">[</span><span class="ss">a</span><span class="p">:</span><span class="w"> </span><span class="nc">Ch.Types</span><span class="o">.</span><span class="n">u64</span><span class="p" data-group-id="0999279091-13">(</span><span class="p" data-group-id="0999279091-13">)</span><span class="p">,</span><span class="w"> </span><span class="ss">b</span><span class="p">:</span><span class="w"> </span><span class="ss">:string</span><span class="p" data-group-id="0999279091-12">]</span><span class="p" data-group-id="0999279091-11">)</span></code></pre>
</section>
</section>
<section class="detail" id="load/2">

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>
@ -727,12 +727,12 @@ this user owns + StatsAPI if the user has a configured Stats API key.</p><p>Give
<p>Queries the ClickHouse database for the monthly pageview usage. If the given user's
subscription is <code class="inline">active</code>, <code class="inline">past_due</code>, or a <code class="inline">deleted</code> (but not yet expired), a map
with the following structure is returned:</p><pre><code class="makeup elixir" translate="no"><span class="p" data-group-id="6229244817-1">%{</span><span class="w">
</span><span class="ss">current_cycle</span><span class="p">:</span><span class="w"> </span><span class="n">usage_cycle</span><span class="p" data-group-id="6229244817-2">(</span><span class="p" data-group-id="6229244817-2">)</span><span class="p">,</span><span class="w">
</span><span class="ss">last_cycle</span><span class="p">:</span><span class="w"> </span><span class="n">usage_cycle</span><span class="p" data-group-id="6229244817-3">(</span><span class="p" data-group-id="6229244817-3">)</span><span class="p">,</span><span class="w">
</span><span class="ss">penultimate_cycle</span><span class="p">:</span><span class="w"> </span><span class="n">usage_cycle</span><span class="p" data-group-id="6229244817-4">(</span><span class="p" data-group-id="6229244817-4">)</span><span class="w">
</span><span class="p" data-group-id="6229244817-1">}</span></code></pre><p>In all other cases of the subscription status (or a <code class="inline">free_10k</code> subscription which
does not have a <code class="inline">last_bill_date</code> defined) - the following structure is returned:</p><pre><code class="makeup elixir" translate="no"><span class="p" data-group-id="7689323646-1">%{</span><span class="ss">last_30_days</span><span class="p">:</span><span class="w"> </span><span class="n">usage_cycle</span><span class="p" data-group-id="7689323646-2">(</span><span class="p" data-group-id="7689323646-2">)</span><span class="p" data-group-id="7689323646-1">}</span></code></pre><p>Given only a user as input, the usage is queried from across all the sites that the
with the following structure is returned:</p><pre><code class="makeup elixir" translate="no"><span class="p" data-group-id="0075451803-1">%{</span><span class="w">
</span><span class="ss">current_cycle</span><span class="p">:</span><span class="w"> </span><span class="n">usage_cycle</span><span class="p" data-group-id="0075451803-2">(</span><span class="p" data-group-id="0075451803-2">)</span><span class="p">,</span><span class="w">
</span><span class="ss">last_cycle</span><span class="p">:</span><span class="w"> </span><span class="n">usage_cycle</span><span class="p" data-group-id="0075451803-3">(</span><span class="p" data-group-id="0075451803-3">)</span><span class="p">,</span><span class="w">
</span><span class="ss">penultimate_cycle</span><span class="p">:</span><span class="w"> </span><span class="n">usage_cycle</span><span class="p" data-group-id="0075451803-4">(</span><span class="p" data-group-id="0075451803-4">)</span><span class="w">
</span><span class="p" data-group-id="0075451803-1">}</span></code></pre><p>In all other cases of the subscription status (or a <code class="inline">free_10k</code> subscription which
does not have a <code class="inline">last_bill_date</code> defined) - the following structure is returned:</p><pre><code class="makeup elixir" translate="no"><span class="p" data-group-id="5333931648-1">%{</span><span class="ss">last_30_days</span><span class="p">:</span><span class="w"> </span><span class="n">usage_cycle</span><span class="p" data-group-id="5333931648-2">(</span><span class="p" data-group-id="5333931648-2">)</span><span class="p" data-group-id="5333931648-1">}</span></code></pre><p>Given only a user as input, the usage is queried from across all the sites that the
user owns. Alternatively, given an optional argument of <code class="inline">site_ids</code>, the usage from
across all those sites is queried instead.</p>
</section>

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>
@ -148,7 +148,7 @@ Pages
the set of natural languages that are preferred as a response to the request.
Language tags function are provided in <a href="https://hexdocs.pm/ex_cldr/2.37.5/Cldr.LanguageTag.html"><code class="inline">Cldr.LanguageTag</code></a>.</p><p>The format of an <code class="inline">Accept-Language</code> header is as follows in <code class="inline">ABNF</code> format:</p><pre><code class="makeup elixir" translate="no"><span class="w"> </span><span class="nc">Accept</span><span class="o">-</span><span class="nc">Language</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">&quot;Accept-Language&quot;</span><span class="w"> </span><span class="s">&quot;:&quot;</span><span class="w">
</span><span class="mi">1</span><span class="c1">#( language-range [ &quot;;&quot; &quot;q&quot; &quot;=&quot; qvalue ] )</span><span class="w">
</span><span class="n">language</span><span class="o">-</span><span class="n">range</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p" data-group-id="5997176410-1">(</span><span class="w"> </span><span class="p" data-group-id="5997176410-2">(</span><span class="w"> </span><span class="mi">1</span><span class="o">*</span><span class="mi">8</span><span class="nc">ALPHA</span><span class="w"> </span><span class="o">*</span><span class="p" data-group-id="5997176410-3">(</span><span class="w"> </span><span class="s">&quot;-&quot;</span><span class="w"> </span><span class="mi">1</span><span class="o">*</span><span class="mi">8</span><span class="nc">ALPHA</span><span class="w"> </span><span class="p" data-group-id="5997176410-3">)</span><span class="w"> </span><span class="p" data-group-id="5997176410-2">)</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="s">&quot;*&quot;</span><span class="w"> </span><span class="p" data-group-id="5997176410-1">)</span></code></pre><p>Each language-range MAY be given an associated quality value which represents an
</span><span class="n">language</span><span class="o">-</span><span class="n">range</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p" data-group-id="2343295171-1">(</span><span class="w"> </span><span class="p" data-group-id="2343295171-2">(</span><span class="w"> </span><span class="mi">1</span><span class="o">*</span><span class="mi">8</span><span class="nc">ALPHA</span><span class="w"> </span><span class="o">*</span><span class="p" data-group-id="2343295171-3">(</span><span class="w"> </span><span class="s">&quot;-&quot;</span><span class="w"> </span><span class="mi">1</span><span class="o">*</span><span class="mi">8</span><span class="nc">ALPHA</span><span class="w"> </span><span class="p" data-group-id="2343295171-3">)</span><span class="w"> </span><span class="p" data-group-id="2343295171-2">)</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="s">&quot;*&quot;</span><span class="w"> </span><span class="p" data-group-id="2343295171-1">)</span></code></pre><p>Each language-range MAY be given an associated quality value which represents an
estimate of the user's preference for the languages specified by that range. The
quality value defaults to &quot;q=1&quot;. For example,</p><pre><code class="makeup elixir" translate="no"><span class="w"> </span><span class="nc">Accept</span><span class="o">-</span><span class="ss">Language</span><span class="p">:</span><span class="w"> </span><span class="n">da</span><span class="p">,</span><span class="w"> </span><span class="n">en</span><span class="o">-</span><span class="n">gb</span><span class="p">;</span><span class="n">q</span><span class="o">=</span><span class="mf">0.8</span><span class="p">,</span><span class="w"> </span><span class="n">en</span><span class="p">;</span><span class="n">q</span><span class="o">=</span><span class="mf">0.7</span></code></pre><p>would mean: &quot;I prefer Danish, but will accept British English and other types of English.&quot;</p>
</section>
@ -261,54 +261,54 @@ a configured <a href="https://hexdocs.pm/ex_cldr/2.37.5/Cldr.html"><code class="
</a>
<span class="text">Examples</span>
</h2>
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.AcceptLanguage</span><span class="o">.</span><span class="n">best_match</span><span class="p" data-group-id="6622119034-1">(</span><span class="s">&quot;da;q=0.1,zh-TW;q=0.3&quot;</span><span class="p">,</span><span class="w"> </span><span class="nc">TestBackend.Cldr</span><span class="p" data-group-id="6622119034-1">)</span><span class="w">
</span><span class="p" data-group-id="6622119034-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="6622119034-3">%</span><span class="nc" data-group-id="6622119034-3">Cldr.LanguageTag</span><span class="p" data-group-id="6622119034-3">{</span><span class="w">
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.AcceptLanguage</span><span class="o">.</span><span class="n">best_match</span><span class="p" data-group-id="4635812693-1">(</span><span class="s">&quot;da;q=0.1,zh-TW;q=0.3&quot;</span><span class="p">,</span><span class="w"> </span><span class="nc">TestBackend.Cldr</span><span class="p" data-group-id="4635812693-1">)</span><span class="w">
</span><span class="p" data-group-id="4635812693-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="4635812693-3">%</span><span class="nc" data-group-id="4635812693-3">Cldr.LanguageTag</span><span class="p" data-group-id="4635812693-3">{</span><span class="w">
</span><span class="ss">backend</span><span class="p">:</span><span class="w"> </span><span class="nc">TestBackend.Cldr</span><span class="p">,</span><span class="w">
</span><span class="ss">canonical_locale_name</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;zh-TW&quot;</span><span class="p">,</span><span class="w">
</span><span class="ss">cldr_locale_name</span><span class="p">:</span><span class="w"> </span><span class="ss">:&quot;zh-Hant&quot;</span><span class="p">,</span><span class="w">
</span><span class="ss">language_subtags</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="6622119034-4">[</span><span class="p" data-group-id="6622119034-4">]</span><span class="p">,</span><span class="w">
</span><span class="ss">extensions</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="6622119034-5">%{</span><span class="p" data-group-id="6622119034-5">}</span><span class="p">,</span><span class="w">
</span><span class="ss">language_subtags</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="4635812693-4">[</span><span class="p" data-group-id="4635812693-4">]</span><span class="p">,</span><span class="w">
</span><span class="ss">extensions</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="4635812693-5">%{</span><span class="p" data-group-id="4635812693-5">}</span><span class="p">,</span><span class="w">
</span><span class="ss">gettext_locale_name</span><span class="p">:</span><span class="w"> </span><span class="no">nil</span><span class="p">,</span><span class="w">
</span><span class="ss">language</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;zh&quot;</span><span class="p">,</span><span class="w">
</span><span class="ss">locale</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="6622119034-6">%{</span><span class="p" data-group-id="6622119034-6">}</span><span class="p">,</span><span class="w">
</span><span class="ss">private_use</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="6622119034-7">[</span><span class="p" data-group-id="6622119034-7">]</span><span class="p">,</span><span class="w">
</span><span class="ss">locale</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="4635812693-6">%{</span><span class="p" data-group-id="4635812693-6">}</span><span class="p">,</span><span class="w">
</span><span class="ss">private_use</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="4635812693-7">[</span><span class="p" data-group-id="4635812693-7">]</span><span class="p">,</span><span class="w">
</span><span class="ss">rbnf_locale_name</span><span class="p">:</span><span class="w"> </span><span class="ss">:&quot;zh-Hant&quot;</span><span class="p">,</span><span class="w">
</span><span class="ss">requested_locale_name</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;zh-TW&quot;</span><span class="p">,</span><span class="w">
</span><span class="ss">script</span><span class="p">:</span><span class="w"> </span><span class="ss">:Hant</span><span class="p">,</span><span class="w">
</span><span class="ss">territory</span><span class="p">:</span><span class="w"> </span><span class="ss">:TW</span><span class="p">,</span><span class="w">
</span><span class="ss">transform</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="6622119034-8">%{</span><span class="p" data-group-id="6622119034-8">}</span><span class="p">,</span><span class="w">
</span><span class="ss">language_variants</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="6622119034-9">[</span><span class="p" data-group-id="6622119034-9">]</span><span class="w">
</span><span class="p" data-group-id="6622119034-3">}</span><span class="p" data-group-id="6622119034-2">}</span><span class="w">
</span><span class="ss">transform</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="4635812693-8">%{</span><span class="p" data-group-id="4635812693-8">}</span><span class="p">,</span><span class="w">
</span><span class="ss">language_variants</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="4635812693-9">[</span><span class="p" data-group-id="4635812693-9">]</span><span class="w">
</span><span class="p" data-group-id="4635812693-3">}</span><span class="p" data-group-id="4635812693-2">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.AcceptLanguage</span><span class="o">.</span><span class="n">best_match</span><span class="p" data-group-id="6622119034-10">(</span><span class="s">&quot;da;q=0.1,zh-TW;q=0.3&quot;</span><span class="p">,</span><span class="w"> </span><span class="nc">TestBackend.Cldr</span><span class="p" data-group-id="6622119034-10">)</span><span class="w">
</span><span class="p" data-group-id="6622119034-11">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="6622119034-12">%</span><span class="nc" data-group-id="6622119034-12">Cldr.LanguageTag</span><span class="p" data-group-id="6622119034-12">{</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.AcceptLanguage</span><span class="o">.</span><span class="n">best_match</span><span class="p" data-group-id="4635812693-10">(</span><span class="s">&quot;da;q=0.1,zh-TW;q=0.3&quot;</span><span class="p">,</span><span class="w"> </span><span class="nc">TestBackend.Cldr</span><span class="p" data-group-id="4635812693-10">)</span><span class="w">
</span><span class="p" data-group-id="4635812693-11">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="4635812693-12">%</span><span class="nc" data-group-id="4635812693-12">Cldr.LanguageTag</span><span class="p" data-group-id="4635812693-12">{</span><span class="w">
</span><span class="ss">backend</span><span class="p">:</span><span class="w"> </span><span class="nc">TestBackend.Cldr</span><span class="p">,</span><span class="w">
</span><span class="ss">canonical_locale_name</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;zh-TW&quot;</span><span class="p">,</span><span class="w">
</span><span class="ss">cldr_locale_name</span><span class="p">:</span><span class="w"> </span><span class="ss">:&quot;zh-Hant&quot;</span><span class="p">,</span><span class="w">
</span><span class="ss">language_subtags</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="6622119034-13">[</span><span class="p" data-group-id="6622119034-13">]</span><span class="p">,</span><span class="w">
</span><span class="ss">extensions</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="6622119034-14">%{</span><span class="p" data-group-id="6622119034-14">}</span><span class="p">,</span><span class="w">
</span><span class="ss">language_subtags</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="4635812693-13">[</span><span class="p" data-group-id="4635812693-13">]</span><span class="p">,</span><span class="w">
</span><span class="ss">extensions</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="4635812693-14">%{</span><span class="p" data-group-id="4635812693-14">}</span><span class="p">,</span><span class="w">
</span><span class="ss">gettext_locale_name</span><span class="p">:</span><span class="w"> </span><span class="no">nil</span><span class="p">,</span><span class="w">
</span><span class="ss">language</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;zh&quot;</span><span class="p">,</span><span class="w">
</span><span class="ss">locale</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="6622119034-15">%{</span><span class="p" data-group-id="6622119034-15">}</span><span class="p">,</span><span class="w">
</span><span class="ss">private_use</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="6622119034-16">[</span><span class="p" data-group-id="6622119034-16">]</span><span class="p">,</span><span class="w">
</span><span class="ss">locale</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="4635812693-15">%{</span><span class="p" data-group-id="4635812693-15">}</span><span class="p">,</span><span class="w">
</span><span class="ss">private_use</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="4635812693-16">[</span><span class="p" data-group-id="4635812693-16">]</span><span class="p">,</span><span class="w">
</span><span class="ss">rbnf_locale_name</span><span class="p">:</span><span class="w"> </span><span class="ss">:&quot;zh-Hant&quot;</span><span class="p">,</span><span class="w">
</span><span class="ss">requested_locale_name</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;zh-TW&quot;</span><span class="p">,</span><span class="w">
</span><span class="ss">script</span><span class="p">:</span><span class="w"> </span><span class="ss">:Hant</span><span class="p">,</span><span class="w">
</span><span class="ss">territory</span><span class="p">:</span><span class="w"> </span><span class="ss">:TW</span><span class="p">,</span><span class="w">
</span><span class="ss">transform</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="6622119034-17">%{</span><span class="p" data-group-id="6622119034-17">}</span><span class="p">,</span><span class="w">
</span><span class="ss">language_variants</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="6622119034-18">[</span><span class="p" data-group-id="6622119034-18">]</span><span class="w">
</span><span class="p" data-group-id="6622119034-12">}</span><span class="p" data-group-id="6622119034-11">}</span><span class="w">
</span><span class="ss">transform</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="4635812693-17">%{</span><span class="p" data-group-id="4635812693-17">}</span><span class="p">,</span><span class="w">
</span><span class="ss">language_variants</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="4635812693-18">[</span><span class="p" data-group-id="4635812693-18">]</span><span class="w">
</span><span class="p" data-group-id="4635812693-12">}</span><span class="p" data-group-id="4635812693-11">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.AcceptLanguage</span><span class="o">.</span><span class="n">best_match</span><span class="p" data-group-id="6622119034-19">(</span><span class="s">&quot;xx,yy;q=0.3&quot;</span><span class="p" data-group-id="6622119034-19">)</span><span class="w">
</span><span class="p" data-group-id="6622119034-20">{</span><span class="ss">:error</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="6622119034-21">{</span><span class="nc">Cldr.NoMatchingLocale</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;No configured locale could be matched to </span><span class="se">\&quot;</span><span class="s">xx,yy;q=0.3</span><span class="se">\&quot;</span><span class="s">&quot;</span><span class="p" data-group-id="6622119034-21">}</span><span class="p" data-group-id="6622119034-20">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.AcceptLanguage</span><span class="o">.</span><span class="n">best_match</span><span class="p" data-group-id="4635812693-19">(</span><span class="s">&quot;xx,yy;q=0.3&quot;</span><span class="p" data-group-id="4635812693-19">)</span><span class="w">
</span><span class="p" data-group-id="4635812693-20">{</span><span class="ss">:error</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="4635812693-21">{</span><span class="nc">Cldr.NoMatchingLocale</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;No configured locale could be matched to </span><span class="se">\&quot;</span><span class="s">xx,yy;q=0.3</span><span class="se">\&quot;</span><span class="s">&quot;</span><span class="p" data-group-id="4635812693-21">}</span><span class="p" data-group-id="4635812693-20">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.AcceptLanguage</span><span class="o">.</span><span class="n">best_match</span><span class="p" data-group-id="6622119034-22">(</span><span class="s">&quot;invalid_tag&quot;</span><span class="p" data-group-id="6622119034-22">)</span><span class="w">
</span><span class="p" data-group-id="6622119034-23">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="6622119034-24">{</span><span class="nc">Cldr.LanguageTag.ParseError</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;Expected a BCP47 language tag. Could not parse the remaining </span><span class="se">\&quot;</span><span class="s">g</span><span class="se">\&quot;</span><span class="s"> starting at position 11&quot;</span><span class="p" data-group-id="6622119034-24">}</span><span class="p" data-group-id="6622119034-23">}</span></code></pre>
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.AcceptLanguage</span><span class="o">.</span><span class="n">best_match</span><span class="p" data-group-id="4635812693-22">(</span><span class="s">&quot;invalid_tag&quot;</span><span class="p" data-group-id="4635812693-22">)</span><span class="w">
</span><span class="p" data-group-id="4635812693-23">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="4635812693-24">{</span><span class="nc">Cldr.LanguageTag.ParseError</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;Expected a BCP47 language tag. Could not parse the remaining </span><span class="se">\&quot;</span><span class="s">g</span><span class="se">\&quot;</span><span class="s"> starting at position 11&quot;</span><span class="p" data-group-id="4635812693-24">}</span><span class="p" data-group-id="4635812693-23">}</span></code></pre>
</section>
</section>
<section class="detail" id="parse/1">
@ -369,95 +369,95 @@ wuth an error tuple for each invalid tag added at the end of the list.</p><h2 id
</a>
<span class="text">Example</span>
</h2>
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Cldr.AcceptLanguage</span><span class="o">.</span><span class="n">parse</span><span class="p" data-group-id="8368411216-1">(</span><span class="s">&quot;da,zh-TW;q=0.3&quot;</span><span class="p">,</span><span class="w"> </span><span class="nc">TestBackend.Cldr</span><span class="p" data-group-id="8368411216-1">)</span><span class="w">
</span><span class="p" data-group-id="8368411216-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="8368411216-3">[</span><span class="w">
</span><span class="p" data-group-id="8368411216-4">{</span><span class="mf">1.0</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="8368411216-5">%</span><span class="nc" data-group-id="8368411216-5">Cldr.LanguageTag</span><span class="p" data-group-id="8368411216-5">{</span><span class="w">
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Cldr.AcceptLanguage</span><span class="o">.</span><span class="n">parse</span><span class="p" data-group-id="2544548647-1">(</span><span class="s">&quot;da,zh-TW;q=0.3&quot;</span><span class="p">,</span><span class="w"> </span><span class="nc">TestBackend.Cldr</span><span class="p" data-group-id="2544548647-1">)</span><span class="w">
</span><span class="p" data-group-id="2544548647-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="2544548647-3">[</span><span class="w">
</span><span class="p" data-group-id="2544548647-4">{</span><span class="mf">1.0</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="2544548647-5">%</span><span class="nc" data-group-id="2544548647-5">Cldr.LanguageTag</span><span class="p" data-group-id="2544548647-5">{</span><span class="w">
</span><span class="ss">backend</span><span class="p">:</span><span class="w"> </span><span class="nc">TestBackend.Cldr</span><span class="p">,</span><span class="w">
</span><span class="ss">canonical_locale_name</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;da&quot;</span><span class="p">,</span><span class="w">
</span><span class="ss">cldr_locale_name</span><span class="p">:</span><span class="w"> </span><span class="ss">:da</span><span class="p">,</span><span class="w">
</span><span class="ss">language_subtags</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="8368411216-6">[</span><span class="p" data-group-id="8368411216-6">]</span><span class="p">,</span><span class="w">
</span><span class="ss">extensions</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="8368411216-7">%{</span><span class="p" data-group-id="8368411216-7">}</span><span class="p">,</span><span class="w">
</span><span class="ss">language_subtags</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="2544548647-6">[</span><span class="p" data-group-id="2544548647-6">]</span><span class="p">,</span><span class="w">
</span><span class="ss">extensions</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="2544548647-7">%{</span><span class="p" data-group-id="2544548647-7">}</span><span class="p">,</span><span class="w">
</span><span class="ss">gettext_locale_name</span><span class="p">:</span><span class="w"> </span><span class="no">nil</span><span class="p">,</span><span class="w">
</span><span class="ss">language</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;da&quot;</span><span class="p">,</span><span class="w">
</span><span class="ss">locale</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="8368411216-8">%{</span><span class="p" data-group-id="8368411216-8">}</span><span class="p">,</span><span class="w">
</span><span class="ss">private_use</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="8368411216-9">[</span><span class="p" data-group-id="8368411216-9">]</span><span class="p">,</span><span class="w">
</span><span class="ss">locale</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="2544548647-8">%{</span><span class="p" data-group-id="2544548647-8">}</span><span class="p">,</span><span class="w">
</span><span class="ss">private_use</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="2544548647-9">[</span><span class="p" data-group-id="2544548647-9">]</span><span class="p">,</span><span class="w">
</span><span class="ss">rbnf_locale_name</span><span class="p">:</span><span class="w"> </span><span class="ss">:da</span><span class="p">,</span><span class="w">
</span><span class="ss">requested_locale_name</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;da&quot;</span><span class="p">,</span><span class="w">
</span><span class="ss">script</span><span class="p">:</span><span class="w"> </span><span class="ss">:Latn</span><span class="p">,</span><span class="w">
</span><span class="ss">territory</span><span class="p">:</span><span class="w"> </span><span class="ss">:DK</span><span class="p">,</span><span class="w">
</span><span class="ss">transform</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="8368411216-10">%{</span><span class="p" data-group-id="8368411216-10">}</span><span class="p">,</span><span class="w">
</span><span class="ss">language_variants</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="8368411216-11">[</span><span class="p" data-group-id="8368411216-11">]</span><span class="w">
</span><span class="p" data-group-id="8368411216-5">}</span><span class="p" data-group-id="8368411216-4">}</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="8368411216-12">{</span><span class="mf">0.3</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="8368411216-13">%</span><span class="nc" data-group-id="8368411216-13">Cldr.LanguageTag</span><span class="p" data-group-id="8368411216-13">{</span><span class="w">
</span><span class="ss">transform</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="2544548647-10">%{</span><span class="p" data-group-id="2544548647-10">}</span><span class="p">,</span><span class="w">
</span><span class="ss">language_variants</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="2544548647-11">[</span><span class="p" data-group-id="2544548647-11">]</span><span class="w">
</span><span class="p" data-group-id="2544548647-5">}</span><span class="p" data-group-id="2544548647-4">}</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="2544548647-12">{</span><span class="mf">0.3</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="2544548647-13">%</span><span class="nc" data-group-id="2544548647-13">Cldr.LanguageTag</span><span class="p" data-group-id="2544548647-13">{</span><span class="w">
</span><span class="ss">backend</span><span class="p">:</span><span class="w"> </span><span class="nc">TestBackend.Cldr</span><span class="p">,</span><span class="w">
</span><span class="ss">canonical_locale_name</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;zh-TW&quot;</span><span class="p">,</span><span class="w">
</span><span class="ss">cldr_locale_name</span><span class="p">:</span><span class="w"> </span><span class="ss">:&quot;zh-Hant&quot;</span><span class="p">,</span><span class="w">
</span><span class="ss">language_subtags</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="8368411216-14">[</span><span class="p" data-group-id="8368411216-14">]</span><span class="p">,</span><span class="w">
</span><span class="ss">extensions</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="8368411216-15">%{</span><span class="p" data-group-id="8368411216-15">}</span><span class="p">,</span><span class="w">
</span><span class="ss">language_subtags</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="2544548647-14">[</span><span class="p" data-group-id="2544548647-14">]</span><span class="p">,</span><span class="w">
</span><span class="ss">extensions</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="2544548647-15">%{</span><span class="p" data-group-id="2544548647-15">}</span><span class="p">,</span><span class="w">
</span><span class="ss">gettext_locale_name</span><span class="p">:</span><span class="w"> </span><span class="no">nil</span><span class="p">,</span><span class="w">
</span><span class="ss">language</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;zh&quot;</span><span class="p">,</span><span class="w">
</span><span class="ss">locale</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="8368411216-16">%{</span><span class="p" data-group-id="8368411216-16">}</span><span class="p">,</span><span class="w">
</span><span class="ss">private_use</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="8368411216-17">[</span><span class="p" data-group-id="8368411216-17">]</span><span class="p">,</span><span class="w">
</span><span class="ss">locale</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="2544548647-16">%{</span><span class="p" data-group-id="2544548647-16">}</span><span class="p">,</span><span class="w">
</span><span class="ss">private_use</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="2544548647-17">[</span><span class="p" data-group-id="2544548647-17">]</span><span class="p">,</span><span class="w">
</span><span class="ss">rbnf_locale_name</span><span class="p">:</span><span class="w"> </span><span class="ss">:&quot;zh-Hant&quot;</span><span class="p">,</span><span class="w">
</span><span class="ss">requested_locale_name</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;zh-TW&quot;</span><span class="p">,</span><span class="w">
</span><span class="ss">script</span><span class="p">:</span><span class="w"> </span><span class="ss">:Hant</span><span class="p">,</span><span class="w">
</span><span class="ss">territory</span><span class="p">:</span><span class="w"> </span><span class="ss">:TW</span><span class="p">,</span><span class="w">
</span><span class="ss">transform</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="8368411216-18">%{</span><span class="p" data-group-id="8368411216-18">}</span><span class="p">,</span><span class="w">
</span><span class="ss">language_variants</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="8368411216-19">[</span><span class="p" data-group-id="8368411216-19">]</span><span class="w">
</span><span class="p" data-group-id="8368411216-13">}</span><span class="p" data-group-id="8368411216-12">}</span><span class="w">
</span><span class="p" data-group-id="8368411216-3">]</span><span class="p" data-group-id="8368411216-2">}</span><span class="w">
</span><span class="ss">transform</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="2544548647-18">%{</span><span class="p" data-group-id="2544548647-18">}</span><span class="p">,</span><span class="w">
</span><span class="ss">language_variants</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="2544548647-19">[</span><span class="p" data-group-id="2544548647-19">]</span><span class="w">
</span><span class="p" data-group-id="2544548647-13">}</span><span class="p" data-group-id="2544548647-12">}</span><span class="w">
</span><span class="p" data-group-id="2544548647-3">]</span><span class="p" data-group-id="2544548647-2">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.AcceptLanguage</span><span class="o">.</span><span class="n">parse</span><span class="p" data-group-id="8368411216-20">(</span><span class="s">&quot;invalid_tag&quot;</span><span class="p" data-group-id="8368411216-20">)</span><span class="w">
</span><span class="p" data-group-id="8368411216-21">{</span><span class="ss">:error</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="8368411216-22">{</span><span class="nc">Cldr.LanguageTag.ParseError</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;Expected a BCP47 language tag. Could not parse the remaining </span><span class="se">\&quot;</span><span class="s">g</span><span class="se">\&quot;</span><span class="s"> starting at position 11&quot;</span><span class="p" data-group-id="8368411216-22">}</span><span class="p" data-group-id="8368411216-21">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.AcceptLanguage</span><span class="o">.</span><span class="n">parse</span><span class="p" data-group-id="2544548647-20">(</span><span class="s">&quot;invalid_tag&quot;</span><span class="p" data-group-id="2544548647-20">)</span><span class="w">
</span><span class="p" data-group-id="2544548647-21">{</span><span class="ss">:error</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="2544548647-22">{</span><span class="nc">Cldr.LanguageTag.ParseError</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;Expected a BCP47 language tag. Could not parse the remaining </span><span class="se">\&quot;</span><span class="s">g</span><span class="se">\&quot;</span><span class="s"> starting at position 11&quot;</span><span class="p" data-group-id="2544548647-22">}</span><span class="p" data-group-id="2544548647-21">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.AcceptLanguage</span><span class="o">.</span><span class="n">parse</span><span class="p" data-group-id="8368411216-23">(</span><span class="s">&quot;da,zh-TW;q=0.3,invalid_tag&quot;</span><span class="p" data-group-id="8368411216-23">)</span><span class="w">
</span><span class="p" data-group-id="8368411216-24">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="8368411216-25">[</span><span class="w">
</span><span class="p" data-group-id="8368411216-26">{</span><span class="mf">1.0</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="8368411216-27">%</span><span class="nc" data-group-id="8368411216-27">Cldr.LanguageTag</span><span class="p" data-group-id="8368411216-27">{</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.AcceptLanguage</span><span class="o">.</span><span class="n">parse</span><span class="p" data-group-id="2544548647-23">(</span><span class="s">&quot;da,zh-TW;q=0.3,invalid_tag&quot;</span><span class="p" data-group-id="2544548647-23">)</span><span class="w">
</span><span class="p" data-group-id="2544548647-24">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="2544548647-25">[</span><span class="w">
</span><span class="p" data-group-id="2544548647-26">{</span><span class="mf">1.0</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="2544548647-27">%</span><span class="nc" data-group-id="2544548647-27">Cldr.LanguageTag</span><span class="p" data-group-id="2544548647-27">{</span><span class="w">
</span><span class="ss">backend</span><span class="p">:</span><span class="w"> </span><span class="nc">TestBackend.Cldr</span><span class="p">,</span><span class="w">
</span><span class="ss">canonical_locale_name</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;da&quot;</span><span class="p">,</span><span class="w">
</span><span class="ss">cldr_locale_name</span><span class="p">:</span><span class="w"> </span><span class="ss">:da</span><span class="p">,</span><span class="w">
</span><span class="ss">language_subtags</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="8368411216-28">[</span><span class="p" data-group-id="8368411216-28">]</span><span class="p">,</span><span class="w">
</span><span class="ss">extensions</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="8368411216-29">%{</span><span class="p" data-group-id="8368411216-29">}</span><span class="p">,</span><span class="w">
</span><span class="ss">language_subtags</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="2544548647-28">[</span><span class="p" data-group-id="2544548647-28">]</span><span class="p">,</span><span class="w">
</span><span class="ss">extensions</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="2544548647-29">%{</span><span class="p" data-group-id="2544548647-29">}</span><span class="p">,</span><span class="w">
</span><span class="ss">gettext_locale_name</span><span class="p">:</span><span class="w"> </span><span class="no">nil</span><span class="p">,</span><span class="w">
</span><span class="ss">language</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;da&quot;</span><span class="p">,</span><span class="w">
</span><span class="ss">locale</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="8368411216-30">%{</span><span class="p" data-group-id="8368411216-30">}</span><span class="p">,</span><span class="w">
</span><span class="ss">private_use</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="8368411216-31">[</span><span class="p" data-group-id="8368411216-31">]</span><span class="p">,</span><span class="w">
</span><span class="ss">locale</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="2544548647-30">%{</span><span class="p" data-group-id="2544548647-30">}</span><span class="p">,</span><span class="w">
</span><span class="ss">private_use</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="2544548647-31">[</span><span class="p" data-group-id="2544548647-31">]</span><span class="p">,</span><span class="w">
</span><span class="ss">rbnf_locale_name</span><span class="p">:</span><span class="w"> </span><span class="ss">:da</span><span class="p">,</span><span class="w">
</span><span class="ss">requested_locale_name</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;da&quot;</span><span class="p">,</span><span class="w">
</span><span class="ss">script</span><span class="p">:</span><span class="w"> </span><span class="ss">:Latn</span><span class="p">,</span><span class="w">
</span><span class="ss">territory</span><span class="p">:</span><span class="w"> </span><span class="ss">:DK</span><span class="p">,</span><span class="w">
</span><span class="ss">transform</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="8368411216-32">%{</span><span class="p" data-group-id="8368411216-32">}</span><span class="p">,</span><span class="w">
</span><span class="ss">language_variants</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="8368411216-33">[</span><span class="p" data-group-id="8368411216-33">]</span><span class="w">
</span><span class="p" data-group-id="8368411216-27">}</span><span class="p" data-group-id="8368411216-26">}</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="8368411216-34">{</span><span class="mf">0.3</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="8368411216-35">%</span><span class="nc" data-group-id="8368411216-35">Cldr.LanguageTag</span><span class="p" data-group-id="8368411216-35">{</span><span class="w">
</span><span class="ss">transform</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="2544548647-32">%{</span><span class="p" data-group-id="2544548647-32">}</span><span class="p">,</span><span class="w">
</span><span class="ss">language_variants</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="2544548647-33">[</span><span class="p" data-group-id="2544548647-33">]</span><span class="w">
</span><span class="p" data-group-id="2544548647-27">}</span><span class="p" data-group-id="2544548647-26">}</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="2544548647-34">{</span><span class="mf">0.3</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="2544548647-35">%</span><span class="nc" data-group-id="2544548647-35">Cldr.LanguageTag</span><span class="p" data-group-id="2544548647-35">{</span><span class="w">
</span><span class="ss">backend</span><span class="p">:</span><span class="w"> </span><span class="nc">TestBackend.Cldr</span><span class="p">,</span><span class="w">
</span><span class="ss">canonical_locale_name</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;zh-TW&quot;</span><span class="p">,</span><span class="w">
</span><span class="ss">cldr_locale_name</span><span class="p">:</span><span class="w"> </span><span class="ss">:&quot;zh-Hant&quot;</span><span class="p">,</span><span class="w">
</span><span class="ss">language_subtags</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="8368411216-36">[</span><span class="p" data-group-id="8368411216-36">]</span><span class="p">,</span><span class="w">
</span><span class="ss">extensions</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="8368411216-37">%{</span><span class="p" data-group-id="8368411216-37">}</span><span class="p">,</span><span class="w">
</span><span class="ss">language_subtags</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="2544548647-36">[</span><span class="p" data-group-id="2544548647-36">]</span><span class="p">,</span><span class="w">
</span><span class="ss">extensions</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="2544548647-37">%{</span><span class="p" data-group-id="2544548647-37">}</span><span class="p">,</span><span class="w">
</span><span class="ss">gettext_locale_name</span><span class="p">:</span><span class="w"> </span><span class="no">nil</span><span class="p">,</span><span class="w">
</span><span class="ss">language</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;zh&quot;</span><span class="p">,</span><span class="w">
</span><span class="ss">locale</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="8368411216-38">%{</span><span class="p" data-group-id="8368411216-38">}</span><span class="p">,</span><span class="w">
</span><span class="ss">private_use</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="8368411216-39">[</span><span class="p" data-group-id="8368411216-39">]</span><span class="p">,</span><span class="w">
</span><span class="ss">locale</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="2544548647-38">%{</span><span class="p" data-group-id="2544548647-38">}</span><span class="p">,</span><span class="w">
</span><span class="ss">private_use</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="2544548647-39">[</span><span class="p" data-group-id="2544548647-39">]</span><span class="p">,</span><span class="w">
</span><span class="ss">rbnf_locale_name</span><span class="p">:</span><span class="w"> </span><span class="ss">:&quot;zh-Hant&quot;</span><span class="p">,</span><span class="w">
</span><span class="ss">requested_locale_name</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;zh-TW&quot;</span><span class="p">,</span><span class="w">
</span><span class="ss">script</span><span class="p">:</span><span class="w"> </span><span class="ss">:Hant</span><span class="p">,</span><span class="w">
</span><span class="ss">territory</span><span class="p">:</span><span class="w"> </span><span class="ss">:TW</span><span class="p">,</span><span class="w">
</span><span class="ss">transform</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="8368411216-40">%{</span><span class="p" data-group-id="8368411216-40">}</span><span class="p">,</span><span class="w">
</span><span class="ss">language_variants</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="8368411216-41">[</span><span class="p" data-group-id="8368411216-41">]</span><span class="w">
</span><span class="p" data-group-id="8368411216-35">}</span><span class="p" data-group-id="8368411216-34">}</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="8368411216-42">{</span><span class="ss">:error</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="8368411216-43">{</span><span class="nc">Cldr.LanguageTag.ParseError</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;Expected a BCP47 language tag. Could not parse the remaining </span><span class="se">\&quot;</span><span class="s">g</span><span class="se">\&quot;</span><span class="s"> starting at position 11&quot;</span><span class="p" data-group-id="8368411216-43">}</span><span class="p" data-group-id="8368411216-42">}</span><span class="w">
</span><span class="p" data-group-id="8368411216-25">]</span><span class="p" data-group-id="8368411216-24">}</span></code></pre>
</span><span class="ss">transform</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="2544548647-40">%{</span><span class="p" data-group-id="2544548647-40">}</span><span class="p">,</span><span class="w">
</span><span class="ss">language_variants</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="2544548647-41">[</span><span class="p" data-group-id="2544548647-41">]</span><span class="w">
</span><span class="p" data-group-id="2544548647-35">}</span><span class="p" data-group-id="2544548647-34">}</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="2544548647-42">{</span><span class="ss">:error</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="2544548647-43">{</span><span class="nc">Cldr.LanguageTag.ParseError</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;Expected a BCP47 language tag. Could not parse the remaining </span><span class="se">\&quot;</span><span class="s">g</span><span class="se">\&quot;</span><span class="s"> starting at position 11&quot;</span><span class="p" data-group-id="2544548647-43">}</span><span class="p" data-group-id="2544548647-42">}</span><span class="w">
</span><span class="p" data-group-id="2544548647-25">]</span><span class="p" data-group-id="2544548647-24">}</span></code></pre>
</section>
</section>
<section class="detail" id="parse!/1">
@ -502,92 +502,92 @@ wuth an error tuple for each invalid tag added at the end of the list.</p><h2 id
</a>
<span class="text">Example</span>
</h2>
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.AcceptLanguage</span><span class="o">.</span><span class="n">parse!</span><span class="p" data-group-id="0387553161-1">(</span><span class="s">&quot;da,zh-TW;q=0.3&quot;</span><span class="p" data-group-id="0387553161-1">)</span><span class="w">
</span><span class="p" data-group-id="0387553161-2">[</span><span class="w">
</span><span class="p" data-group-id="0387553161-3">{</span><span class="mf">1.0</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="0387553161-4">%</span><span class="nc" data-group-id="0387553161-4">Cldr.LanguageTag</span><span class="p" data-group-id="0387553161-4">{</span><span class="w">
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.AcceptLanguage</span><span class="o">.</span><span class="n">parse!</span><span class="p" data-group-id="6384113394-1">(</span><span class="s">&quot;da,zh-TW;q=0.3&quot;</span><span class="p" data-group-id="6384113394-1">)</span><span class="w">
</span><span class="p" data-group-id="6384113394-2">[</span><span class="w">
</span><span class="p" data-group-id="6384113394-3">{</span><span class="mf">1.0</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="6384113394-4">%</span><span class="nc" data-group-id="6384113394-4">Cldr.LanguageTag</span><span class="p" data-group-id="6384113394-4">{</span><span class="w">
</span><span class="ss">backend</span><span class="p">:</span><span class="w"> </span><span class="nc">TestBackend.Cldr</span><span class="p">,</span><span class="w">
</span><span class="ss">canonical_locale_name</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;da&quot;</span><span class="p">,</span><span class="w">
</span><span class="ss">cldr_locale_name</span><span class="p">:</span><span class="w"> </span><span class="ss">:da</span><span class="p">,</span><span class="w">
</span><span class="ss">language_subtags</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="0387553161-5">[</span><span class="p" data-group-id="0387553161-5">]</span><span class="p">,</span><span class="w">
</span><span class="ss">extensions</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="0387553161-6">%{</span><span class="p" data-group-id="0387553161-6">}</span><span class="p">,</span><span class="w">
</span><span class="ss">language_subtags</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="6384113394-5">[</span><span class="p" data-group-id="6384113394-5">]</span><span class="p">,</span><span class="w">
</span><span class="ss">extensions</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="6384113394-6">%{</span><span class="p" data-group-id="6384113394-6">}</span><span class="p">,</span><span class="w">
</span><span class="ss">gettext_locale_name</span><span class="p">:</span><span class="w"> </span><span class="no">nil</span><span class="p">,</span><span class="w">
</span><span class="ss">language</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;da&quot;</span><span class="p">,</span><span class="w">
</span><span class="ss">locale</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="0387553161-7">%{</span><span class="p" data-group-id="0387553161-7">}</span><span class="p">,</span><span class="w">
</span><span class="ss">private_use</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="0387553161-8">[</span><span class="p" data-group-id="0387553161-8">]</span><span class="p">,</span><span class="w">
</span><span class="ss">locale</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="6384113394-7">%{</span><span class="p" data-group-id="6384113394-7">}</span><span class="p">,</span><span class="w">
</span><span class="ss">private_use</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="6384113394-8">[</span><span class="p" data-group-id="6384113394-8">]</span><span class="p">,</span><span class="w">
</span><span class="ss">rbnf_locale_name</span><span class="p">:</span><span class="w"> </span><span class="ss">:da</span><span class="p">,</span><span class="w">
</span><span class="ss">requested_locale_name</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;da&quot;</span><span class="p">,</span><span class="w">
</span><span class="ss">script</span><span class="p">:</span><span class="w"> </span><span class="ss">:Latn</span><span class="p">,</span><span class="w">
</span><span class="ss">territory</span><span class="p">:</span><span class="w"> </span><span class="ss">:DK</span><span class="p">,</span><span class="w">
</span><span class="ss">transform</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="0387553161-9">%{</span><span class="p" data-group-id="0387553161-9">}</span><span class="p">,</span><span class="w">
</span><span class="ss">language_variants</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="0387553161-10">[</span><span class="p" data-group-id="0387553161-10">]</span><span class="w">
</span><span class="p" data-group-id="0387553161-4">}</span><span class="p" data-group-id="0387553161-3">}</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="0387553161-11">{</span><span class="mf">0.3</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="0387553161-12">%</span><span class="nc" data-group-id="0387553161-12">Cldr.LanguageTag</span><span class="p" data-group-id="0387553161-12">{</span><span class="w">
</span><span class="ss">transform</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="6384113394-9">%{</span><span class="p" data-group-id="6384113394-9">}</span><span class="p">,</span><span class="w">
</span><span class="ss">language_variants</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="6384113394-10">[</span><span class="p" data-group-id="6384113394-10">]</span><span class="w">
</span><span class="p" data-group-id="6384113394-4">}</span><span class="p" data-group-id="6384113394-3">}</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="6384113394-11">{</span><span class="mf">0.3</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="6384113394-12">%</span><span class="nc" data-group-id="6384113394-12">Cldr.LanguageTag</span><span class="p" data-group-id="6384113394-12">{</span><span class="w">
</span><span class="ss">backend</span><span class="p">:</span><span class="w"> </span><span class="nc">TestBackend.Cldr</span><span class="p">,</span><span class="w">
</span><span class="ss">canonical_locale_name</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;zh-TW&quot;</span><span class="p">,</span><span class="w">
</span><span class="ss">cldr_locale_name</span><span class="p">:</span><span class="w"> </span><span class="ss">:&quot;zh-Hant&quot;</span><span class="p">,</span><span class="w">
</span><span class="ss">language_subtags</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="0387553161-13">[</span><span class="p" data-group-id="0387553161-13">]</span><span class="p">,</span><span class="w">
</span><span class="ss">extensions</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="0387553161-14">%{</span><span class="p" data-group-id="0387553161-14">}</span><span class="p">,</span><span class="w">
</span><span class="ss">language_subtags</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="6384113394-13">[</span><span class="p" data-group-id="6384113394-13">]</span><span class="p">,</span><span class="w">
</span><span class="ss">extensions</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="6384113394-14">%{</span><span class="p" data-group-id="6384113394-14">}</span><span class="p">,</span><span class="w">
</span><span class="ss">gettext_locale_name</span><span class="p">:</span><span class="w"> </span><span class="no">nil</span><span class="p">,</span><span class="w">
</span><span class="ss">language</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;zh&quot;</span><span class="p">,</span><span class="w">
</span><span class="ss">locale</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="0387553161-15">%{</span><span class="p" data-group-id="0387553161-15">}</span><span class="p">,</span><span class="w">
</span><span class="ss">private_use</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="0387553161-16">[</span><span class="p" data-group-id="0387553161-16">]</span><span class="p">,</span><span class="w">
</span><span class="ss">locale</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="6384113394-15">%{</span><span class="p" data-group-id="6384113394-15">}</span><span class="p">,</span><span class="w">
</span><span class="ss">private_use</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="6384113394-16">[</span><span class="p" data-group-id="6384113394-16">]</span><span class="p">,</span><span class="w">
</span><span class="ss">rbnf_locale_name</span><span class="p">:</span><span class="w"> </span><span class="ss">:&quot;zh-Hant&quot;</span><span class="p">,</span><span class="w">
</span><span class="ss">requested_locale_name</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;zh-TW&quot;</span><span class="p">,</span><span class="w">
</span><span class="ss">script</span><span class="p">:</span><span class="w"> </span><span class="ss">:Hant</span><span class="p">,</span><span class="w">
</span><span class="ss">territory</span><span class="p">:</span><span class="w"> </span><span class="ss">:TW</span><span class="p">,</span><span class="w">
</span><span class="ss">transform</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="0387553161-17">%{</span><span class="p" data-group-id="0387553161-17">}</span><span class="p">,</span><span class="w">
</span><span class="ss">language_variants</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="0387553161-18">[</span><span class="p" data-group-id="0387553161-18">]</span><span class="w">
</span><span class="p" data-group-id="0387553161-12">}</span><span class="p" data-group-id="0387553161-11">}</span><span class="w">
</span><span class="p" data-group-id="0387553161-2">]</span><span class="w">
</span><span class="ss">transform</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="6384113394-17">%{</span><span class="p" data-group-id="6384113394-17">}</span><span class="p">,</span><span class="w">
</span><span class="ss">language_variants</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="6384113394-18">[</span><span class="p" data-group-id="6384113394-18">]</span><span class="w">
</span><span class="p" data-group-id="6384113394-12">}</span><span class="p" data-group-id="6384113394-11">}</span><span class="w">
</span><span class="p" data-group-id="6384113394-2">]</span><span class="w">
</span><span class="nc">Plausible.Cldr.AcceptLanguage</span><span class="o">.</span><span class="n">parse!</span><span class="w"> </span><span class="s">&quot;invalid_tag&quot;</span><span class="w">
</span><span class="gt">** (Cldr.AcceptLanguageError) &quot;Expected a BCP47 language tag. Could not parse the remaining &quot;g&quot; starting at position 11
(ex_cldr) lib/cldr/accept_language.ex:304: Cldr.AcceptLanguage.parse!/1</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.AcceptLanguage</span><span class="o">.</span><span class="n">parse!</span><span class="p" data-group-id="0387553161-19">(</span><span class="s">&quot;da,zh-TW;q=0.3,invalid_tag&quot;</span><span class="p" data-group-id="0387553161-19">)</span><span class="w">
</span><span class="p" data-group-id="0387553161-20">[</span><span class="w">
</span><span class="p" data-group-id="0387553161-21">{</span><span class="mf">1.0</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="0387553161-22">%</span><span class="nc" data-group-id="0387553161-22">Cldr.LanguageTag</span><span class="p" data-group-id="0387553161-22">{</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.AcceptLanguage</span><span class="o">.</span><span class="n">parse!</span><span class="p" data-group-id="6384113394-19">(</span><span class="s">&quot;da,zh-TW;q=0.3,invalid_tag&quot;</span><span class="p" data-group-id="6384113394-19">)</span><span class="w">
</span><span class="p" data-group-id="6384113394-20">[</span><span class="w">
</span><span class="p" data-group-id="6384113394-21">{</span><span class="mf">1.0</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="6384113394-22">%</span><span class="nc" data-group-id="6384113394-22">Cldr.LanguageTag</span><span class="p" data-group-id="6384113394-22">{</span><span class="w">
</span><span class="ss">backend</span><span class="p">:</span><span class="w"> </span><span class="nc">TestBackend.Cldr</span><span class="p">,</span><span class="w">
</span><span class="ss">canonical_locale_name</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;da&quot;</span><span class="p">,</span><span class="w">
</span><span class="ss">cldr_locale_name</span><span class="p">:</span><span class="w"> </span><span class="ss">:da</span><span class="p">,</span><span class="w">
</span><span class="ss">language_subtags</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="0387553161-23">[</span><span class="p" data-group-id="0387553161-23">]</span><span class="p">,</span><span class="w">
</span><span class="ss">extensions</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="0387553161-24">%{</span><span class="p" data-group-id="0387553161-24">}</span><span class="p">,</span><span class="w">
</span><span class="ss">language_subtags</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="6384113394-23">[</span><span class="p" data-group-id="6384113394-23">]</span><span class="p">,</span><span class="w">
</span><span class="ss">extensions</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="6384113394-24">%{</span><span class="p" data-group-id="6384113394-24">}</span><span class="p">,</span><span class="w">
</span><span class="ss">gettext_locale_name</span><span class="p">:</span><span class="w"> </span><span class="no">nil</span><span class="p">,</span><span class="w">
</span><span class="ss">language</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;da&quot;</span><span class="p">,</span><span class="w">
</span><span class="ss">locale</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="0387553161-25">%{</span><span class="p" data-group-id="0387553161-25">}</span><span class="p">,</span><span class="w">
</span><span class="ss">private_use</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="0387553161-26">[</span><span class="p" data-group-id="0387553161-26">]</span><span class="p">,</span><span class="w">
</span><span class="ss">locale</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="6384113394-25">%{</span><span class="p" data-group-id="6384113394-25">}</span><span class="p">,</span><span class="w">
</span><span class="ss">private_use</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="6384113394-26">[</span><span class="p" data-group-id="6384113394-26">]</span><span class="p">,</span><span class="w">
</span><span class="ss">rbnf_locale_name</span><span class="p">:</span><span class="w"> </span><span class="ss">:da</span><span class="p">,</span><span class="w">
</span><span class="ss">requested_locale_name</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;da&quot;</span><span class="p">,</span><span class="w">
</span><span class="ss">script</span><span class="p">:</span><span class="w"> </span><span class="ss">:Latn</span><span class="p">,</span><span class="w">
</span><span class="ss">territory</span><span class="p">:</span><span class="w"> </span><span class="ss">:DK</span><span class="p">,</span><span class="w">
</span><span class="ss">transform</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="0387553161-27">%{</span><span class="p" data-group-id="0387553161-27">}</span><span class="p">,</span><span class="w">
</span><span class="ss">language_variants</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="0387553161-28">[</span><span class="p" data-group-id="0387553161-28">]</span><span class="w">
</span><span class="p" data-group-id="0387553161-22">}</span><span class="p" data-group-id="0387553161-21">}</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="0387553161-29">{</span><span class="mf">0.3</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="0387553161-30">%</span><span class="nc" data-group-id="0387553161-30">Cldr.LanguageTag</span><span class="p" data-group-id="0387553161-30">{</span><span class="w">
</span><span class="ss">transform</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="6384113394-27">%{</span><span class="p" data-group-id="6384113394-27">}</span><span class="p">,</span><span class="w">
</span><span class="ss">language_variants</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="6384113394-28">[</span><span class="p" data-group-id="6384113394-28">]</span><span class="w">
</span><span class="p" data-group-id="6384113394-22">}</span><span class="p" data-group-id="6384113394-21">}</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="6384113394-29">{</span><span class="mf">0.3</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="6384113394-30">%</span><span class="nc" data-group-id="6384113394-30">Cldr.LanguageTag</span><span class="p" data-group-id="6384113394-30">{</span><span class="w">
</span><span class="ss">backend</span><span class="p">:</span><span class="w"> </span><span class="nc">TestBackend.Cldr</span><span class="p">,</span><span class="w">
</span><span class="ss">canonical_locale_name</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;zh-TW&quot;</span><span class="p">,</span><span class="w">
</span><span class="ss">cldr_locale_name</span><span class="p">:</span><span class="w"> </span><span class="ss">:&quot;zh-Hant&quot;</span><span class="p">,</span><span class="w">
</span><span class="ss">language_subtags</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="0387553161-31">[</span><span class="p" data-group-id="0387553161-31">]</span><span class="p">,</span><span class="w">
</span><span class="ss">extensions</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="0387553161-32">%{</span><span class="p" data-group-id="0387553161-32">}</span><span class="p">,</span><span class="w">
</span><span class="ss">language_subtags</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="6384113394-31">[</span><span class="p" data-group-id="6384113394-31">]</span><span class="p">,</span><span class="w">
</span><span class="ss">extensions</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="6384113394-32">%{</span><span class="p" data-group-id="6384113394-32">}</span><span class="p">,</span><span class="w">
</span><span class="ss">gettext_locale_name</span><span class="p">:</span><span class="w"> </span><span class="no">nil</span><span class="p">,</span><span class="w">
</span><span class="ss">language</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;zh&quot;</span><span class="p">,</span><span class="w">
</span><span class="ss">locale</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="0387553161-33">%{</span><span class="p" data-group-id="0387553161-33">}</span><span class="p">,</span><span class="w">
</span><span class="ss">private_use</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="0387553161-34">[</span><span class="p" data-group-id="0387553161-34">]</span><span class="p">,</span><span class="w">
</span><span class="ss">locale</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="6384113394-33">%{</span><span class="p" data-group-id="6384113394-33">}</span><span class="p">,</span><span class="w">
</span><span class="ss">private_use</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="6384113394-34">[</span><span class="p" data-group-id="6384113394-34">]</span><span class="p">,</span><span class="w">
</span><span class="ss">rbnf_locale_name</span><span class="p">:</span><span class="w"> </span><span class="ss">:&quot;zh-Hant&quot;</span><span class="p">,</span><span class="w">
</span><span class="ss">requested_locale_name</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;zh-TW&quot;</span><span class="p">,</span><span class="w">
</span><span class="ss">script</span><span class="p">:</span><span class="w"> </span><span class="ss">:Hant</span><span class="p">,</span><span class="w">
</span><span class="ss">territory</span><span class="p">:</span><span class="w"> </span><span class="ss">:TW</span><span class="p">,</span><span class="w">
</span><span class="ss">transform</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="0387553161-35">%{</span><span class="p" data-group-id="0387553161-35">}</span><span class="p">,</span><span class="w">
</span><span class="ss">language_variants</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="0387553161-36">[</span><span class="p" data-group-id="0387553161-36">]</span><span class="w">
</span><span class="p" data-group-id="0387553161-30">}</span><span class="p" data-group-id="0387553161-29">}</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="0387553161-37">{</span><span class="ss">:error</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="0387553161-38">{</span><span class="nc">Cldr.LanguageTag.ParseError</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;Expected a BCP47 language tag. Could not parse the remaining </span><span class="se">\&quot;</span><span class="s">g</span><span class="se">\&quot;</span><span class="s"> starting at position 11&quot;</span><span class="p" data-group-id="0387553161-38">}</span><span class="p" data-group-id="0387553161-37">}</span><span class="w">
</span><span class="p" data-group-id="0387553161-20">]</span></code></pre>
</span><span class="ss">transform</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="6384113394-35">%{</span><span class="p" data-group-id="6384113394-35">}</span><span class="p">,</span><span class="w">
</span><span class="ss">language_variants</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="6384113394-36">[</span><span class="p" data-group-id="6384113394-36">]</span><span class="w">
</span><span class="p" data-group-id="6384113394-30">}</span><span class="p" data-group-id="6384113394-29">}</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="6384113394-37">{</span><span class="ss">:error</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="6384113394-38">{</span><span class="nc">Cldr.LanguageTag.ParseError</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;Expected a BCP47 language tag. Could not parse the remaining </span><span class="se">\&quot;</span><span class="s">g</span><span class="se">\&quot;</span><span class="s"> starting at position 11&quot;</span><span class="p" data-group-id="6384113394-38">}</span><span class="p" data-group-id="6384113394-37">}</span><span class="w">
</span><span class="p" data-group-id="6384113394-20">]</span></code></pre>
</section>
</section>

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>
@ -419,11 +419,11 @@ The default is <code class="inline">:all</code>. See <a href="https://hexdocs.pm
</h2>
<p> MyApp.Cldr.Currency.currencies_for_locale(&quot;en&quot;)
=&gt; {:ok,
%{</p><pre><code class="makeup elixir" translate="no"><span class="w"> </span><span class="ss">FJD</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="3093507510-1">%</span><span class="nc" data-group-id="3093507510-1">Cldr.Currency</span><span class="p" data-group-id="3093507510-1">{</span><span class="w">
%{</p><pre><code class="makeup elixir" translate="no"><span class="w"> </span><span class="ss">FJD</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="1538109834-1">%</span><span class="nc" data-group-id="1538109834-1">Cldr.Currency</span><span class="p" data-group-id="1538109834-1">{</span><span class="w">
</span><span class="ss">cash_digits</span><span class="p">:</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="w">
</span><span class="ss">cash_rounding</span><span class="p">:</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w">
</span><span class="ss">code</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;FJD&quot;</span><span class="p">,</span><span class="w">
</span><span class="ss">count</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="3093507510-2">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;Fijian dollar&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">other</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;Fijian dollars&quot;</span><span class="p" data-group-id="3093507510-2">}</span><span class="p">,</span><span class="w">
</span><span class="ss">count</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="1538109834-2">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;Fijian dollar&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">other</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;Fijian dollars&quot;</span><span class="p" data-group-id="1538109834-2">}</span><span class="p">,</span><span class="w">
</span><span class="ss">digits</span><span class="p">:</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="w">
</span><span class="ss">from</span><span class="p">:</span><span class="w"> </span><span class="no">nil</span><span class="p">,</span><span class="w">
</span><span class="ss">iso_digits</span><span class="p">:</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="w">
@ -433,12 +433,12 @@ The default is <code class="inline">:all</code>. See <a href="https://hexdocs.pm
</span><span class="ss">symbol</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;FJD&quot;</span><span class="p">,</span><span class="w">
</span><span class="ss">tender</span><span class="p">:</span><span class="w"> </span><span class="no">true</span><span class="p">,</span><span class="w">
</span><span class="ss">to</span><span class="p">:</span><span class="w"> </span><span class="no">nil</span><span class="w">
</span><span class="p" data-group-id="3093507510-1">}</span><span class="p">,</span><span class="w">
</span><span class="ss">SUR</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="3093507510-3">%</span><span class="nc" data-group-id="3093507510-3">Cldr.Currency</span><span class="p" data-group-id="3093507510-3">{</span><span class="w">
</span><span class="p" data-group-id="1538109834-1">}</span><span class="p">,</span><span class="w">
</span><span class="ss">SUR</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="1538109834-3">%</span><span class="nc" data-group-id="1538109834-3">Cldr.Currency</span><span class="p" data-group-id="1538109834-3">{</span><span class="w">
</span><span class="ss">cash_digits</span><span class="p">:</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="w">
</span><span class="ss">cash_rounding</span><span class="p">:</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w">
</span><span class="ss">code</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;SUR&quot;</span><span class="p">,</span><span class="w">
</span><span class="ss">count</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="3093507510-4">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;Soviet rouble&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">other</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;Soviet roubles&quot;</span><span class="p" data-group-id="3093507510-4">}</span><span class="p">,</span><span class="w">
</span><span class="ss">count</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="1538109834-4">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;Soviet rouble&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">other</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;Soviet roubles&quot;</span><span class="p" data-group-id="1538109834-4">}</span><span class="p">,</span><span class="w">
</span><span class="ss">digits</span><span class="p">:</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="w">
</span><span class="ss">from</span><span class="p">:</span><span class="w"> </span><span class="no">nil</span><span class="p">,</span><span class="w">
</span><span class="ss">iso_digits</span><span class="p">:</span><span class="w"> </span><span class="no">nil</span><span class="p">,</span><span class="w">
@ -448,7 +448,7 @@ The default is <code class="inline">:all</code>. See <a href="https://hexdocs.pm
</span><span class="ss">symbol</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;SUR&quot;</span><span class="p">,</span><span class="w">
</span><span class="ss">tender</span><span class="p">:</span><span class="w"> </span><span class="no">true</span><span class="p">,</span><span class="w">
</span><span class="ss">to</span><span class="p">:</span><span class="w"> </span><span class="no">nil</span><span class="w">
</span><span class="p" data-group-id="3093507510-3">}</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="1538109834-3">}</span><span class="p">,</span><span class="w">
</span><span class="n">...</span><span class="w">
</span><span class="err">}</span><span class="err">}</span></code></pre>
</section>
@ -499,11 +499,11 @@ The default is <code class="inline">:all</code>. See <a href="https://hexdocs.pm
<span class="text">Example</span>
</h2>
<p> MyApp.Cldr.Currency.currencies_for_locale!(&quot;en&quot;)
=&gt; %{</p><pre><code class="makeup elixir" translate="no"><span class="ss">FJD</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="1546822143-1">%</span><span class="nc" data-group-id="1546822143-1">Cldr.Currency</span><span class="p" data-group-id="1546822143-1">{</span><span class="w">
=&gt; %{</p><pre><code class="makeup elixir" translate="no"><span class="ss">FJD</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="1066386413-1">%</span><span class="nc" data-group-id="1066386413-1">Cldr.Currency</span><span class="p" data-group-id="1066386413-1">{</span><span class="w">
</span><span class="ss">cash_digits</span><span class="p">:</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="w">
</span><span class="ss">cash_rounding</span><span class="p">:</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w">
</span><span class="ss">code</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;FJD&quot;</span><span class="p">,</span><span class="w">
</span><span class="ss">count</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="1546822143-2">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;Fijian dollar&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">other</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;Fijian dollars&quot;</span><span class="p" data-group-id="1546822143-2">}</span><span class="p">,</span><span class="w">
</span><span class="ss">count</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="1066386413-2">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;Fijian dollar&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">other</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;Fijian dollars&quot;</span><span class="p" data-group-id="1066386413-2">}</span><span class="p">,</span><span class="w">
</span><span class="ss">digits</span><span class="p">:</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="w">
</span><span class="ss">from</span><span class="p">:</span><span class="w"> </span><span class="no">nil</span><span class="p">,</span><span class="w">
</span><span class="ss">iso_digits</span><span class="p">:</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="w">
@ -513,12 +513,12 @@ The default is <code class="inline">:all</code>. See <a href="https://hexdocs.pm
</span><span class="ss">symbol</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;FJD&quot;</span><span class="p">,</span><span class="w">
</span><span class="ss">tender</span><span class="p">:</span><span class="w"> </span><span class="no">true</span><span class="p">,</span><span class="w">
</span><span class="ss">to</span><span class="p">:</span><span class="w"> </span><span class="no">nil</span><span class="w">
</span><span class="p" data-group-id="1546822143-1">}</span><span class="p">,</span><span class="w">
</span><span class="ss">SUR</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="1546822143-3">%</span><span class="nc" data-group-id="1546822143-3">Cldr.Currency</span><span class="p" data-group-id="1546822143-3">{</span><span class="w">
</span><span class="p" data-group-id="1066386413-1">}</span><span class="p">,</span><span class="w">
</span><span class="ss">SUR</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="1066386413-3">%</span><span class="nc" data-group-id="1066386413-3">Cldr.Currency</span><span class="p" data-group-id="1066386413-3">{</span><span class="w">
</span><span class="ss">cash_digits</span><span class="p">:</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="w">
</span><span class="ss">cash_rounding</span><span class="p">:</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w">
</span><span class="ss">code</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;SUR&quot;</span><span class="p">,</span><span class="w">
</span><span class="ss">count</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="1546822143-4">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;Soviet rouble&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">other</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;Soviet roubles&quot;</span><span class="p" data-group-id="1546822143-4">}</span><span class="p">,</span><span class="w">
</span><span class="ss">count</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="1066386413-4">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;Soviet rouble&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">other</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;Soviet roubles&quot;</span><span class="p" data-group-id="1066386413-4">}</span><span class="p">,</span><span class="w">
</span><span class="ss">digits</span><span class="p">:</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="w">
</span><span class="ss">from</span><span class="p">:</span><span class="w"> </span><span class="no">nil</span><span class="p">,</span><span class="w">
</span><span class="ss">iso_digits</span><span class="p">:</span><span class="w"> </span><span class="no">nil</span><span class="p">,</span><span class="w">
@ -528,7 +528,7 @@ The default is <code class="inline">:all</code>. See <a href="https://hexdocs.pm
</span><span class="ss">symbol</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;SUR&quot;</span><span class="p">,</span><span class="w">
</span><span class="ss">tender</span><span class="p">:</span><span class="w"> </span><span class="no">true</span><span class="p">,</span><span class="w">
</span><span class="ss">to</span><span class="p">:</span><span class="w"> </span><span class="no">nil</span><span class="w">
</span><span class="p" data-group-id="1546822143-3">}</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="1066386413-3">}</span><span class="p">,</span><span class="w">
</span><span class="n">...</span></code></pre><p> }</p>
</section>
</section>
@ -586,13 +586,13 @@ or a <a href="https://hexdocs.pm/ex_cldr/2.37.5/Cldr.LanguageTag.html"><code cla
</a>
<span class="text">Examples</span>
</h2>
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Currency</span><span class="o">.</span><span class="n">currency_for_code</span><span class="p" data-group-id="8353042572-1">(</span><span class="s">&quot;AUD&quot;</span><span class="p" data-group-id="8353042572-1">)</span><span class="w">
</span><span class="p" data-group-id="8353042572-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="8353042572-3">%</span><span class="nc" data-group-id="8353042572-3">Cldr.Currency</span><span class="p" data-group-id="8353042572-3">{</span><span class="w">
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Currency</span><span class="o">.</span><span class="n">currency_for_code</span><span class="p" data-group-id="3123253904-1">(</span><span class="s">&quot;AUD&quot;</span><span class="p" data-group-id="3123253904-1">)</span><span class="w">
</span><span class="p" data-group-id="3123253904-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="3123253904-3">%</span><span class="nc" data-group-id="3123253904-3">Cldr.Currency</span><span class="p" data-group-id="3123253904-3">{</span><span class="w">
</span><span class="ss">cash_digits</span><span class="p">:</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="w">
</span><span class="ss">cash_rounding</span><span class="p">:</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w">
</span><span class="ss">code</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;AUD&quot;</span><span class="p">,</span><span class="w">
</span><span class="ss">count</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="8353042572-4">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;Australian dollar&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">other</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;Australian dollars&quot;</span><span class="p" data-group-id="8353042572-4">}</span><span class="p">,</span><span class="w">
</span><span class="ss">count</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="3123253904-4">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;Australian dollar&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">other</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;Australian dollars&quot;</span><span class="p" data-group-id="3123253904-4">}</span><span class="p">,</span><span class="w">
</span><span class="ss">digits</span><span class="p">:</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="w">
</span><span class="ss">iso_digits</span><span class="p">:</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="w">
</span><span class="ss">name</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;Australian Dollar&quot;</span><span class="p">,</span><span class="w">
@ -600,15 +600,15 @@ or a <a href="https://hexdocs.pm/ex_cldr/2.37.5/Cldr.LanguageTag.html"><code cla
</span><span class="ss">rounding</span><span class="p">:</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w">
</span><span class="ss">symbol</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;A$&quot;</span><span class="p">,</span><span class="w">
</span><span class="ss">tender</span><span class="p">:</span><span class="w"> </span><span class="no">true</span><span class="w">
</span><span class="p" data-group-id="8353042572-3">}</span><span class="p" data-group-id="8353042572-2">}</span><span class="w">
</span><span class="p" data-group-id="3123253904-3">}</span><span class="p" data-group-id="3123253904-2">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Currency</span><span class="o">.</span><span class="n">currency_for_code</span><span class="p" data-group-id="8353042572-5">(</span><span class="s">&quot;THB&quot;</span><span class="p" data-group-id="8353042572-5">)</span><span class="w">
</span><span class="p" data-group-id="8353042572-6">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="8353042572-7">%</span><span class="nc" data-group-id="8353042572-7">Cldr.Currency</span><span class="p" data-group-id="8353042572-7">{</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Currency</span><span class="o">.</span><span class="n">currency_for_code</span><span class="p" data-group-id="3123253904-5">(</span><span class="s">&quot;THB&quot;</span><span class="p" data-group-id="3123253904-5">)</span><span class="w">
</span><span class="p" data-group-id="3123253904-6">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="3123253904-7">%</span><span class="nc" data-group-id="3123253904-7">Cldr.Currency</span><span class="p" data-group-id="3123253904-7">{</span><span class="w">
</span><span class="ss">cash_digits</span><span class="p">:</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="w">
</span><span class="ss">cash_rounding</span><span class="p">:</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w">
</span><span class="ss">code</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;THB&quot;</span><span class="p">,</span><span class="w">
</span><span class="ss">count</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="8353042572-8">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;Thai baht&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">other</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;Thai baht&quot;</span><span class="p" data-group-id="8353042572-8">}</span><span class="p">,</span><span class="w">
</span><span class="ss">count</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="3123253904-8">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;Thai baht&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">other</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;Thai baht&quot;</span><span class="p" data-group-id="3123253904-8">}</span><span class="p">,</span><span class="w">
</span><span class="ss">digits</span><span class="p">:</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="w">
</span><span class="ss">iso_digits</span><span class="p">:</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="w">
</span><span class="ss">name</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;Thai Baht&quot;</span><span class="p">,</span><span class="w">
@ -616,7 +616,7 @@ or a <a href="https://hexdocs.pm/ex_cldr/2.37.5/Cldr.LanguageTag.html"><code cla
</span><span class="ss">rounding</span><span class="p">:</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w">
</span><span class="ss">symbol</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;THB&quot;</span><span class="p">,</span><span class="w">
</span><span class="ss">tender</span><span class="p">:</span><span class="w"> </span><span class="no">true</span><span class="w">
</span><span class="p" data-group-id="8353042572-7">}</span><span class="p" data-group-id="8353042572-6">}</span></code></pre>
</span><span class="p" data-group-id="3123253904-7">}</span><span class="p" data-group-id="3123253904-6">}</span></code></pre>
</section>
</section>
<section class="detail" id="currency_for_code!/2">
@ -675,12 +675,12 @@ or a <a href="https://hexdocs.pm/ex_cldr/2.37.5/Cldr.LanguageTag.html"><code cla
</a>
<span class="text">Examples</span>
</h2>
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Currency</span><span class="o">.</span><span class="n">currency_for_code!</span><span class="p" data-group-id="6613531879-1">(</span><span class="s">&quot;AUD&quot;</span><span class="p" data-group-id="6613531879-1">)</span><span class="w">
</span><span class="p" data-group-id="6613531879-2">%</span><span class="nc" data-group-id="6613531879-2">Cldr.Currency</span><span class="p" data-group-id="6613531879-2">{</span><span class="w">
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Currency</span><span class="o">.</span><span class="n">currency_for_code!</span><span class="p" data-group-id="0050237510-1">(</span><span class="s">&quot;AUD&quot;</span><span class="p" data-group-id="0050237510-1">)</span><span class="w">
</span><span class="p" data-group-id="0050237510-2">%</span><span class="nc" data-group-id="0050237510-2">Cldr.Currency</span><span class="p" data-group-id="0050237510-2">{</span><span class="w">
</span><span class="ss">cash_digits</span><span class="p">:</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="w">
</span><span class="ss">cash_rounding</span><span class="p">:</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w">
</span><span class="ss">code</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;AUD&quot;</span><span class="p">,</span><span class="w">
</span><span class="ss">count</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="6613531879-3">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;Australian dollar&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">other</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;Australian dollars&quot;</span><span class="p" data-group-id="6613531879-3">}</span><span class="p">,</span><span class="w">
</span><span class="ss">count</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="0050237510-3">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;Australian dollar&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">other</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;Australian dollars&quot;</span><span class="p" data-group-id="0050237510-3">}</span><span class="p">,</span><span class="w">
</span><span class="ss">digits</span><span class="p">:</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="w">
</span><span class="ss">iso_digits</span><span class="p">:</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="w">
</span><span class="ss">name</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;Australian Dollar&quot;</span><span class="p">,</span><span class="w">
@ -688,14 +688,14 @@ or a <a href="https://hexdocs.pm/ex_cldr/2.37.5/Cldr.LanguageTag.html"><code cla
</span><span class="ss">rounding</span><span class="p">:</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w">
</span><span class="ss">symbol</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;A$&quot;</span><span class="p">,</span><span class="w">
</span><span class="ss">tender</span><span class="p">:</span><span class="w"> </span><span class="no">true</span><span class="w">
</span><span class="p" data-group-id="6613531879-2">}</span><span class="w">
</span><span class="p" data-group-id="0050237510-2">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Currency</span><span class="o">.</span><span class="n">currency_for_code!</span><span class="p" data-group-id="6613531879-4">(</span><span class="s">&quot;THB&quot;</span><span class="p" data-group-id="6613531879-4">)</span><span class="w">
</span><span class="p" data-group-id="6613531879-5">%</span><span class="nc" data-group-id="6613531879-5">Cldr.Currency</span><span class="p" data-group-id="6613531879-5">{</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Currency</span><span class="o">.</span><span class="n">currency_for_code!</span><span class="p" data-group-id="0050237510-4">(</span><span class="s">&quot;THB&quot;</span><span class="p" data-group-id="0050237510-4">)</span><span class="w">
</span><span class="p" data-group-id="0050237510-5">%</span><span class="nc" data-group-id="0050237510-5">Cldr.Currency</span><span class="p" data-group-id="0050237510-5">{</span><span class="w">
</span><span class="ss">cash_digits</span><span class="p">:</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="w">
</span><span class="ss">cash_rounding</span><span class="p">:</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w">
</span><span class="ss">code</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;THB&quot;</span><span class="p">,</span><span class="w">
</span><span class="ss">count</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="6613531879-6">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;Thai baht&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">other</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;Thai baht&quot;</span><span class="p" data-group-id="6613531879-6">}</span><span class="p">,</span><span class="w">
</span><span class="ss">count</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="0050237510-6">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;Thai baht&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">other</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;Thai baht&quot;</span><span class="p" data-group-id="0050237510-6">}</span><span class="p">,</span><span class="w">
</span><span class="ss">digits</span><span class="p">:</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="w">
</span><span class="ss">iso_digits</span><span class="p">:</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="w">
</span><span class="ss">name</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;Thai Baht&quot;</span><span class="p">,</span><span class="w">
@ -703,7 +703,7 @@ or a <a href="https://hexdocs.pm/ex_cldr/2.37.5/Cldr.LanguageTag.html"><code cla
</span><span class="ss">rounding</span><span class="p">:</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w">
</span><span class="ss">symbol</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;THB&quot;</span><span class="p">,</span><span class="w">
</span><span class="ss">tender</span><span class="p">:</span><span class="w"> </span><span class="no">true</span><span class="w">
</span><span class="p" data-group-id="6613531879-5">}</span></code></pre>
</span><span class="p" data-group-id="0050237510-5">}</span></code></pre>
</section>
</section>
<section class="detail" id="currency_from_locale/1">
@ -744,15 +744,15 @@ or a <a href="https://hexdocs.pm/ex_cldr/2.37.5/Cldr.LanguageTag.html"><code cla
</a>
<span class="text">Examples</span>
</h2>
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="p" data-group-id="4653309211-1">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="n">locale</span><span class="p" data-group-id="4653309211-1">}</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">validate_locale</span><span class="p" data-group-id="4653309211-2">(</span><span class="s">&quot;en&quot;</span><span class="p" data-group-id="4653309211-2">)</span><span class="w">
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="p" data-group-id="9558009034-1">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="n">locale</span><span class="p" data-group-id="9558009034-1">}</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">validate_locale</span><span class="p" data-group-id="9558009034-2">(</span><span class="s">&quot;en&quot;</span><span class="p" data-group-id="9558009034-2">)</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Currency</span><span class="o">.</span><span class="n">currency_from_locale</span><span class="w"> </span><span class="n">locale</span><span class="w">
</span><span class="ss">:USD</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="p" data-group-id="4653309211-3">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="n">locale</span><span class="p" data-group-id="4653309211-3">}</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">validate_locale</span><span class="p" data-group-id="4653309211-4">(</span><span class="s">&quot;en-AU&quot;</span><span class="p" data-group-id="4653309211-4">)</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="p" data-group-id="9558009034-3">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="n">locale</span><span class="p" data-group-id="9558009034-3">}</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">validate_locale</span><span class="p" data-group-id="9558009034-4">(</span><span class="s">&quot;en-AU&quot;</span><span class="p" data-group-id="9558009034-4">)</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Currency</span><span class="o">.</span><span class="n">currency_from_locale</span><span class="w"> </span><span class="n">locale</span><span class="w">
</span><span class="ss">:AUD</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Currency</span><span class="o">.</span><span class="n">currency_from_locale</span><span class="p" data-group-id="4653309211-5">(</span><span class="s">&quot;en-GB&quot;</span><span class="p" data-group-id="4653309211-5">)</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Currency</span><span class="o">.</span><span class="n">currency_from_locale</span><span class="p" data-group-id="9558009034-5">(</span><span class="s">&quot;en-GB&quot;</span><span class="p" data-group-id="9558009034-5">)</span><span class="w">
</span><span class="ss">:GBP</span></code></pre>
</section>
</section>
@ -796,14 +796,14 @@ or a <a href="https://hexdocs.pm/ex_cldr/2.37.5/Cldr.LanguageTag.html"><code cla
</a>
<span class="text">Example</span>
</h2>
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">MyApp.Cldr.Currency</span><span class="o">.</span><span class="n">currency_history_for_locale</span><span class="p" data-group-id="3221256210-1">(</span><span class="s">&quot;en&quot;</span><span class="p" data-group-id="3221256210-1">)</span><span class="w">
</span><span class="p" data-group-id="3221256210-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="3221256210-3">%{</span><span class="w">
</span><span class="ss">USD</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="3221256210-4">%{</span><span class="ss">from</span><span class="p">:</span><span class="w"> </span><span class="ld">~D[1792-01-01]</span><span class="p">,</span><span class="w"> </span><span class="ss">to</span><span class="p">:</span><span class="w"> </span><span class="no">nil</span><span class="p" data-group-id="3221256210-4">}</span><span class="p">,</span><span class="w">
</span><span class="ss">USN</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="3221256210-5">%{</span><span class="ss">tender</span><span class="p">:</span><span class="w"> </span><span class="no">false</span><span class="p" data-group-id="3221256210-5">}</span><span class="p">,</span><span class="w">
</span><span class="ss">USS</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="3221256210-6">%{</span><span class="ss">from</span><span class="p">:</span><span class="w"> </span><span class="no">nil</span><span class="p">,</span><span class="w"> </span><span class="ss">tender</span><span class="p">:</span><span class="w"> </span><span class="no">false</span><span class="p">,</span><span class="w"> </span><span class="ss">to</span><span class="p">:</span><span class="w"> </span><span class="ld">~D[2014-03-01]</span><span class="p" data-group-id="3221256210-6">}</span><span class="w">
</span><span class="p" data-group-id="3221256210-3">}</span><span class="w">
</span><span class="p" data-group-id="3221256210-2">}</span></code></pre>
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">MyApp.Cldr.Currency</span><span class="o">.</span><span class="n">currency_history_for_locale</span><span class="p" data-group-id="0278183319-1">(</span><span class="s">&quot;en&quot;</span><span class="p" data-group-id="0278183319-1">)</span><span class="w">
</span><span class="p" data-group-id="0278183319-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="0278183319-3">%{</span><span class="w">
</span><span class="ss">USD</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="0278183319-4">%{</span><span class="ss">from</span><span class="p">:</span><span class="w"> </span><span class="ld">~D[1792-01-01]</span><span class="p">,</span><span class="w"> </span><span class="ss">to</span><span class="p">:</span><span class="w"> </span><span class="no">nil</span><span class="p" data-group-id="0278183319-4">}</span><span class="p">,</span><span class="w">
</span><span class="ss">USN</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="0278183319-5">%{</span><span class="ss">tender</span><span class="p">:</span><span class="w"> </span><span class="no">false</span><span class="p" data-group-id="0278183319-5">}</span><span class="p">,</span><span class="w">
</span><span class="ss">USS</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="0278183319-6">%{</span><span class="ss">from</span><span class="p">:</span><span class="w"> </span><span class="no">nil</span><span class="p">,</span><span class="w"> </span><span class="ss">tender</span><span class="p">:</span><span class="w"> </span><span class="no">false</span><span class="p">,</span><span class="w"> </span><span class="ss">to</span><span class="p">:</span><span class="w"> </span><span class="ld">~D[2014-03-01]</span><span class="p" data-group-id="0278183319-6">}</span><span class="w">
</span><span class="p" data-group-id="0278183319-3">}</span><span class="w">
</span><span class="p" data-group-id="0278183319-2">}</span></code></pre>
</section>
</section>
<section class="detail" id="currency_strings/3">
@ -862,9 +862,9 @@ The default is <code class="inline">:all</code>. See <a href="https://hexdocs.pm
</a>
<span class="text">Example</span>
</h2>
<pre><code class="makeup elixir" translate="no"><span class="nc">MyApp.Cldr.Currency</span><span class="o">.</span><span class="n">currency_strings</span><span class="p" data-group-id="9508477093-1">(</span><span class="s">&quot;en&quot;</span><span class="p" data-group-id="9508477093-1">)</span><span class="w">
</span><span class="p">=&gt;</span><span class="w"> </span><span class="p" data-group-id="9508477093-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="9508477093-3">%{</span><span class="w">
<pre><code class="makeup elixir" translate="no"><span class="nc">MyApp.Cldr.Currency</span><span class="o">.</span><span class="n">currency_strings</span><span class="p" data-group-id="7524597247-1">(</span><span class="s">&quot;en&quot;</span><span class="p" data-group-id="7524597247-1">)</span><span class="w">
</span><span class="p">=&gt;</span><span class="w"> </span><span class="p" data-group-id="7524597247-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="7524597247-3">%{</span><span class="w">
</span><span class="s">&quot;mexican silver pesos&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="ss">:MXP</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;sudanese dinar&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="ss">:SDD</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;bad&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="ss">:BAD</span><span class="p">,</span><span class="w">
@ -874,7 +874,7 @@ The default is <code class="inline">:all</code>. See <a href="https://hexdocs.pm
</span><span class="s">&quot;guyanaese dollars&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="ss">:GYD</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;equatorial guinean ekwele&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="ss">:GQE</span><span class="p">,</span><span class="w">
</span><span class="n">...</span><span class="w">
</span><span class="p" data-group-id="9508477093-3">}</span><span class="p" data-group-id="9508477093-2">}</span></code></pre>
</span><span class="p" data-group-id="7524597247-3">}</span><span class="p" data-group-id="7524597247-2">}</span></code></pre>
</section>
</section>
<section class="detail" id="currency_strings!/3">
@ -933,8 +933,8 @@ The default is <code class="inline">:all</code>. See <a href="https://hexdocs.pm
</a>
<span class="text">Example</span>
</h2>
<pre><code class="makeup elixir" translate="no"><span class="nc">MyApp.Cldr.Currency</span><span class="o">.</span><span class="n">currency_strings!</span><span class="p" data-group-id="3441464164-1">(</span><span class="s">&quot;en&quot;</span><span class="p" data-group-id="3441464164-1">)</span><span class="w">
</span><span class="p">=&gt;</span><span class="w"> </span><span class="p" data-group-id="3441464164-2">%{</span><span class="w">
<pre><code class="makeup elixir" translate="no"><span class="nc">MyApp.Cldr.Currency</span><span class="o">.</span><span class="n">currency_strings!</span><span class="p" data-group-id="8295980727-1">(</span><span class="s">&quot;en&quot;</span><span class="p" data-group-id="8295980727-1">)</span><span class="w">
</span><span class="p">=&gt;</span><span class="w"> </span><span class="p" data-group-id="8295980727-2">%{</span><span class="w">
</span><span class="s">&quot;mexican silver pesos&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="ss">:MXP</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;sudanese dinar&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="ss">:SDD</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;bad&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="ss">:BAD</span><span class="p">,</span><span class="w">
@ -944,7 +944,7 @@ The default is <code class="inline">:all</code>. See <a href="https://hexdocs.pm
</span><span class="s">&quot;guyanaese dollars&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="ss">:GYD</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;equatorial guinean ekwele&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="ss">:GQE</span><span class="p">,</span><span class="w">
</span><span class="n">...</span><span class="w">
</span><span class="p" data-group-id="3441464164-2">}</span></code></pre>
</span><span class="p" data-group-id="8295980727-2">}</span></code></pre>
</section>
</section>
<section class="detail" id="current_currency_from_locale/1">
@ -982,10 +982,10 @@ or a <a href="https://hexdocs.pm/ex_cldr/2.37.5/Cldr.LanguageTag.html"><code cla
</a>
<span class="text">Example</span>
</h2>
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">MyApp.Cldr.Currency</span><span class="o">.</span><span class="n">current_currency_from_locale</span><span class="p" data-group-id="3797103397-1">(</span><span class="s">&quot;en&quot;</span><span class="p" data-group-id="3797103397-1">)</span><span class="w">
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">MyApp.Cldr.Currency</span><span class="o">.</span><span class="n">current_currency_from_locale</span><span class="p" data-group-id="4704155352-1">(</span><span class="s">&quot;en&quot;</span><span class="p" data-group-id="4704155352-1">)</span><span class="w">
</span><span class="ss">:USD</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">MyApp.Cldr.Currency</span><span class="o">.</span><span class="n">current_currency_from_locale</span><span class="p" data-group-id="3797103397-2">(</span><span class="s">&quot;en-AU&quot;</span><span class="p" data-group-id="3797103397-2">)</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">MyApp.Cldr.Currency</span><span class="o">.</span><span class="n">current_currency_from_locale</span><span class="p" data-group-id="4704155352-2">(</span><span class="s">&quot;en-AU&quot;</span><span class="p" data-group-id="4704155352-2">)</span><span class="w">
</span><span class="ss">:AUD</span></code></pre>
</section>
</section>
@ -1033,7 +1033,7 @@ mapping is returned for that territory.</p><h2 id="current_territory_currencies/
</a>
<span class="text">Example</span>
</h2>
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Currency</span><span class="o">.</span><span class="n">current_territory_currencies</span><span class="p" data-group-id="3906754279-1">(</span><span class="p" data-group-id="3906754279-1">)</span></code></pre>
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Currency</span><span class="o">.</span><span class="n">current_territory_currencies</span><span class="p" data-group-id="1314747343-1">(</span><span class="p" data-group-id="1314747343-1">)</span></code></pre>
</section>
</section>
<section class="detail" id="known_currencies/0">
@ -1125,11 +1125,11 @@ currency code</li></ul><h2 id="known_currency_code/1-returns" class="section-hea
</a>
<span class="text">Examples</span>
</h2>
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Currency</span><span class="o">.</span><span class="n">known_currency_code</span><span class="p" data-group-id="3657611658-1">(</span><span class="s">&quot;AUD&quot;</span><span class="p" data-group-id="3657611658-1">)</span><span class="w">
</span><span class="p" data-group-id="3657611658-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="ss">:AUD</span><span class="p" data-group-id="3657611658-2">}</span><span class="w">
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Currency</span><span class="o">.</span><span class="n">known_currency_code</span><span class="p" data-group-id="3346167648-1">(</span><span class="s">&quot;AUD&quot;</span><span class="p" data-group-id="3346167648-1">)</span><span class="w">
</span><span class="p" data-group-id="3346167648-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="ss">:AUD</span><span class="p" data-group-id="3346167648-2">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Currency</span><span class="o">.</span><span class="n">known_currency_code</span><span class="p" data-group-id="3657611658-3">(</span><span class="s">&quot;GGG&quot;</span><span class="p" data-group-id="3657611658-3">)</span><span class="w">
</span><span class="p" data-group-id="3657611658-4">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="3657611658-5">{</span><span class="nc">Cldr.UnknownCurrencyError</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;The currency </span><span class="se">\&quot;</span><span class="s">GGG</span><span class="se">\&quot;</span><span class="s"> is invalid&quot;</span><span class="p" data-group-id="3657611658-5">}</span><span class="p" data-group-id="3657611658-4">}</span></code></pre>
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Currency</span><span class="o">.</span><span class="n">known_currency_code</span><span class="p" data-group-id="3346167648-3">(</span><span class="s">&quot;GGG&quot;</span><span class="p" data-group-id="3346167648-3">)</span><span class="w">
</span><span class="p" data-group-id="3346167648-4">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="3346167648-5">{</span><span class="nc">Cldr.UnknownCurrencyError</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;The currency </span><span class="se">\&quot;</span><span class="s">GGG</span><span class="se">\&quot;</span><span class="s"> is invalid&quot;</span><span class="p" data-group-id="3346167648-5">}</span><span class="p" data-group-id="3346167648-4">}</span></code></pre>
</section>
</section>
<section class="detail" id="known_currency_code?/1">
@ -1176,13 +1176,13 @@ currency code</li></ul><h2 id="known_currency_code?/1-returns" class="section-he
</a>
<span class="text">Examples</span>
</h2>
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Currency</span><span class="o">.</span><span class="n">known_currency_code?</span><span class="p" data-group-id="4886830163-1">(</span><span class="s">&quot;AUD&quot;</span><span class="p" data-group-id="4886830163-1">)</span><span class="w">
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Currency</span><span class="o">.</span><span class="n">known_currency_code?</span><span class="p" data-group-id="5833350824-1">(</span><span class="s">&quot;AUD&quot;</span><span class="p" data-group-id="5833350824-1">)</span><span class="w">
</span><span class="no">true</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Currency</span><span class="o">.</span><span class="n">known_currency_code?</span><span class="p" data-group-id="4886830163-2">(</span><span class="s">&quot;GGG&quot;</span><span class="p" data-group-id="4886830163-2">)</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Currency</span><span class="o">.</span><span class="n">known_currency_code?</span><span class="p" data-group-id="5833350824-2">(</span><span class="s">&quot;GGG&quot;</span><span class="p" data-group-id="5833350824-2">)</span><span class="w">
</span><span class="no">false</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Currency</span><span class="o">.</span><span class="n">known_currency_code?</span><span class="p" data-group-id="4886830163-3">(</span><span class="ss">:XCV</span><span class="p" data-group-id="4886830163-3">)</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Currency</span><span class="o">.</span><span class="n">known_currency_code?</span><span class="p" data-group-id="5833350824-3">(</span><span class="ss">:XCV</span><span class="p" data-group-id="5833350824-3">)</span><span class="w">
</span><span class="no">false</span></code></pre>
</section>
</section>
@ -1217,7 +1217,7 @@ currency code</li></ul><h2 id="known_currency_code?/1-returns" class="section-he
</a>
<span class="text">Example</span>
</h2>
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Currency</span><span class="o">.</span><span class="n">known_currency_codes</span><span class="p" data-group-id="7746997496-1">(</span><span class="p" data-group-id="7746997496-1">)</span></code></pre>
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Currency</span><span class="o">.</span><span class="n">known_currency_codes</span><span class="p" data-group-id="9291819482-1">(</span><span class="p" data-group-id="9291819482-1">)</span></code></pre>
</section>
</section>
<section class="detail" id="new/2">
@ -1276,14 +1276,14 @@ such as <code class="inline">0.05</code>. Optional.</li></ul><h2 id="new/2-retur
</a>
<span class="text">Example</span>
</h2>
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Currency</span><span class="o">.</span><span class="n">new</span><span class="p" data-group-id="5847146244-1">(</span><span class="ss">:XAE</span><span class="p">,</span><span class="w"> </span><span class="ss">name</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;Custom Name&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">digits</span><span class="p">:</span><span class="w"> </span><span class="mi">0</span><span class="p" data-group-id="5847146244-1">)</span><span class="w">
</span><span class="p" data-group-id="5847146244-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="5847146244-3">%</span><span class="nc" data-group-id="5847146244-3">Cldr.Currency</span><span class="p" data-group-id="5847146244-3">{</span><span class="w">
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Currency</span><span class="o">.</span><span class="n">new</span><span class="p" data-group-id="7173217992-1">(</span><span class="ss">:XAE</span><span class="p">,</span><span class="w"> </span><span class="ss">name</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;Custom Name&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">digits</span><span class="p">:</span><span class="w"> </span><span class="mi">0</span><span class="p" data-group-id="7173217992-1">)</span><span class="w">
</span><span class="p" data-group-id="7173217992-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="7173217992-3">%</span><span class="nc" data-group-id="7173217992-3">Cldr.Currency</span><span class="p" data-group-id="7173217992-3">{</span><span class="w">
</span><span class="ss">alt_code</span><span class="p">:</span><span class="w"> </span><span class="ss">:XAE</span><span class="p">,</span><span class="w">
</span><span class="ss">cash_digits</span><span class="p">:</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w">
</span><span class="ss">cash_rounding</span><span class="p">:</span><span class="w"> </span><span class="no">nil</span><span class="p">,</span><span class="w">
</span><span class="ss">code</span><span class="p">:</span><span class="w"> </span><span class="ss">:XAE</span><span class="p">,</span><span class="w">
</span><span class="ss">count</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="5847146244-4">%{</span><span class="ss">other</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;Custom Name&quot;</span><span class="p" data-group-id="5847146244-4">}</span><span class="p">,</span><span class="w">
</span><span class="ss">count</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="7173217992-4">%{</span><span class="ss">other</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;Custom Name&quot;</span><span class="p" data-group-id="7173217992-4">}</span><span class="p">,</span><span class="w">
</span><span class="ss">digits</span><span class="p">:</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w">
</span><span class="ss">from</span><span class="p">:</span><span class="w"> </span><span class="no">nil</span><span class="p">,</span><span class="w">
</span><span class="ss">iso_digits</span><span class="p">:</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w">
@ -1293,11 +1293,11 @@ such as <code class="inline">0.05</code>. Optional.</li></ul><h2 id="new/2-retur
</span><span class="ss">symbol</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;XAE&quot;</span><span class="p">,</span><span class="w">
</span><span class="ss">tender</span><span class="p">:</span><span class="w"> </span><span class="no">false</span><span class="p">,</span><span class="w">
</span><span class="ss">to</span><span class="p">:</span><span class="w"> </span><span class="no">nil</span><span class="w">
</span><span class="p" data-group-id="5847146244-3">}</span><span class="p" data-group-id="5847146244-2">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">MyApp.Cldr.Currency</span><span class="o">.</span><span class="n">new</span><span class="p" data-group-id="5847146244-5">(</span><span class="ss">:XAH</span><span class="p">,</span><span class="w"> </span><span class="ss">name</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;Custom Name&quot;</span><span class="p" data-group-id="5847146244-5">)</span><span class="w">
</span><span class="p" data-group-id="5847146244-6">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Required options are missing. Required options are [:name, :digits]&quot;</span><span class="p" data-group-id="5847146244-6">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Currency</span><span class="o">.</span><span class="n">new</span><span class="p" data-group-id="5847146244-7">(</span><span class="ss">:XAE</span><span class="p">,</span><span class="w"> </span><span class="ss">name</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;XAE&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">digits</span><span class="p">:</span><span class="w"> </span><span class="mi">0</span><span class="p" data-group-id="5847146244-7">)</span><span class="w">
</span><span class="p" data-group-id="5847146244-8">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="5847146244-9">{</span><span class="nc">Cldr.CurrencyAlreadyDefined</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Currency :XAE is already defined.&quot;</span><span class="p" data-group-id="5847146244-9">}</span><span class="p" data-group-id="5847146244-8">}</span></code></pre>
</span><span class="p" data-group-id="7173217992-3">}</span><span class="p" data-group-id="7173217992-2">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">MyApp.Cldr.Currency</span><span class="o">.</span><span class="n">new</span><span class="p" data-group-id="7173217992-5">(</span><span class="ss">:XAH</span><span class="p">,</span><span class="w"> </span><span class="ss">name</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;Custom Name&quot;</span><span class="p" data-group-id="7173217992-5">)</span><span class="w">
</span><span class="p" data-group-id="7173217992-6">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Required options are missing. Required options are [:name, :digits]&quot;</span><span class="p" data-group-id="7173217992-6">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Currency</span><span class="o">.</span><span class="n">new</span><span class="p" data-group-id="7173217992-7">(</span><span class="ss">:XAE</span><span class="p">,</span><span class="w"> </span><span class="ss">name</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;XAE&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">digits</span><span class="p">:</span><span class="w"> </span><span class="mi">0</span><span class="p" data-group-id="7173217992-7">)</span><span class="w">
</span><span class="p" data-group-id="7173217992-8">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="7173217992-9">{</span><span class="nc">Cldr.CurrencyAlreadyDefined</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Currency :XAE is already defined.&quot;</span><span class="p" data-group-id="7173217992-9">}</span><span class="p" data-group-id="7173217992-8">}</span></code></pre>
</section>
</section>
<section class="detail" id="pluralize/3">
@ -1355,20 +1355,20 @@ default is <a href="Plausible.Cldr.html#get_locale/0"><code class="inline">Plaus
</a>
<span class="text">Examples</span>
</h2>
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Currency</span><span class="o">.</span><span class="n">pluralize</span><span class="p" data-group-id="9568086797-1">(</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="ss">:USD</span><span class="p" data-group-id="9568086797-1">)</span><span class="w">
</span><span class="p" data-group-id="9568086797-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;US dollar&quot;</span><span class="p" data-group-id="9568086797-2">}</span><span class="w">
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Currency</span><span class="o">.</span><span class="n">pluralize</span><span class="p" data-group-id="4700510714-1">(</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="ss">:USD</span><span class="p" data-group-id="4700510714-1">)</span><span class="w">
</span><span class="p" data-group-id="4700510714-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;US dollar&quot;</span><span class="p" data-group-id="4700510714-2">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Currency</span><span class="o">.</span><span class="n">pluralize</span><span class="p" data-group-id="9568086797-3">(</span><span class="mi">3</span><span class="p">,</span><span class="w"> </span><span class="ss">:USD</span><span class="p" data-group-id="9568086797-3">)</span><span class="w">
</span><span class="p" data-group-id="9568086797-4">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;US dollars&quot;</span><span class="p" data-group-id="9568086797-4">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Currency</span><span class="o">.</span><span class="n">pluralize</span><span class="p" data-group-id="4700510714-3">(</span><span class="mi">3</span><span class="p">,</span><span class="w"> </span><span class="ss">:USD</span><span class="p" data-group-id="4700510714-3">)</span><span class="w">
</span><span class="p" data-group-id="4700510714-4">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;US dollars&quot;</span><span class="p" data-group-id="4700510714-4">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Currency</span><span class="o">.</span><span class="n">pluralize</span><span class="p" data-group-id="9568086797-5">(</span><span class="mi">12</span><span class="p">,</span><span class="w"> </span><span class="ss">:USD</span><span class="p">,</span><span class="w"> </span><span class="ss">locale</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;zh&quot;</span><span class="p" data-group-id="9568086797-5">)</span><span class="w">
</span><span class="p" data-group-id="9568086797-6">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;美元&quot;</span><span class="p" data-group-id="9568086797-6">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Currency</span><span class="o">.</span><span class="n">pluralize</span><span class="p" data-group-id="4700510714-5">(</span><span class="mi">12</span><span class="p">,</span><span class="w"> </span><span class="ss">:USD</span><span class="p">,</span><span class="w"> </span><span class="ss">locale</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;zh&quot;</span><span class="p" data-group-id="4700510714-5">)</span><span class="w">
</span><span class="p" data-group-id="4700510714-6">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;美元&quot;</span><span class="p" data-group-id="4700510714-6">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Currency</span><span class="o">.</span><span class="n">pluralize</span><span class="p" data-group-id="9568086797-7">(</span><span class="mi">12</span><span class="p">,</span><span class="w"> </span><span class="ss">:USD</span><span class="p">,</span><span class="w"> </span><span class="ss">locale</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;fr&quot;</span><span class="p" data-group-id="9568086797-7">)</span><span class="w">
</span><span class="p" data-group-id="9568086797-8">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;dollars des États-Unis&quot;</span><span class="p" data-group-id="9568086797-8">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Currency</span><span class="o">.</span><span class="n">pluralize</span><span class="p" data-group-id="4700510714-7">(</span><span class="mi">12</span><span class="p">,</span><span class="w"> </span><span class="ss">:USD</span><span class="p">,</span><span class="w"> </span><span class="ss">locale</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;fr&quot;</span><span class="p" data-group-id="4700510714-7">)</span><span class="w">
</span><span class="p" data-group-id="4700510714-8">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;dollars des États-Unis&quot;</span><span class="p" data-group-id="4700510714-8">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Currency</span><span class="o">.</span><span class="n">pluralize</span><span class="p" data-group-id="9568086797-9">(</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="ss">:USD</span><span class="p">,</span><span class="w"> </span><span class="ss">locale</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;fr&quot;</span><span class="p" data-group-id="9568086797-9">)</span><span class="w">
</span><span class="p" data-group-id="9568086797-10">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;dollar des États-Unis&quot;</span><span class="p" data-group-id="9568086797-10">}</span></code></pre>
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Currency</span><span class="o">.</span><span class="n">pluralize</span><span class="p" data-group-id="4700510714-9">(</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="ss">:USD</span><span class="p">,</span><span class="w"> </span><span class="ss">locale</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;fr&quot;</span><span class="p" data-group-id="4700510714-9">)</span><span class="w">
</span><span class="p" data-group-id="4700510714-10">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;dollar des États-Unis&quot;</span><span class="p" data-group-id="4700510714-10">}</span></code></pre>
</section>
</section>
<section class="detail" id="strings_for_currency/2">
@ -1410,8 +1410,8 @@ or a <a href="https://hexdocs.pm/ex_cldr/2.37.5/Cldr.LanguageTag.html"><code cla
</a>
<span class="text">Example</span>
</h2>
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">MyApp.Cldr.Currency</span><span class="o">.</span><span class="n">strings_for_currency</span><span class="p" data-group-id="8827790581-1">(</span><span class="ss">:AUD</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;en&quot;</span><span class="p" data-group-id="8827790581-1">)</span><span class="w">
</span><span class="p" data-group-id="8827790581-2">[</span><span class="s">&quot;a$&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;australian dollars&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;aud&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;australian dollar&quot;</span><span class="p" data-group-id="8827790581-2">]</span></code></pre>
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">MyApp.Cldr.Currency</span><span class="o">.</span><span class="n">strings_for_currency</span><span class="p" data-group-id="5374291538-1">(</span><span class="ss">:AUD</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;en&quot;</span><span class="p" data-group-id="5374291538-1">)</span><span class="w">
</span><span class="p" data-group-id="5374291538-2">[</span><span class="s">&quot;a$&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;australian dollars&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;aud&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;australian dollar&quot;</span><span class="p" data-group-id="5374291538-2">]</span></code></pre>
</section>
</section>

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>
@ -326,16 +326,16 @@ this specific locale..</p><h2 id="fallback_locale_names/1-arguments" class="sect
</a>
<span class="text">Examples</span>
</h2>
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Locale</span><span class="o">.</span><span class="n">fallback_locale_names</span><span class="p" data-group-id="0395504321-1">(</span><span class="ss">:&quot;fr-CA&quot;</span><span class="p" data-group-id="0395504321-1">)</span><span class="w">
</span><span class="p" data-group-id="0395504321-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="0395504321-3">[</span><span class="ss">:&quot;fr-CA&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">:fr</span><span class="p">,</span><span class="w"> </span><span class="ss">:und</span><span class="p" data-group-id="0395504321-3">]</span><span class="p" data-group-id="0395504321-2">}</span><span class="w">
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Locale</span><span class="o">.</span><span class="n">fallback_locale_names</span><span class="p" data-group-id="2339890337-1">(</span><span class="ss">:&quot;fr-CA&quot;</span><span class="p" data-group-id="2339890337-1">)</span><span class="w">
</span><span class="p" data-group-id="2339890337-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="2339890337-3">[</span><span class="ss">:&quot;fr-CA&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">:fr</span><span class="p">,</span><span class="w"> </span><span class="ss">:und</span><span class="p" data-group-id="2339890337-3">]</span><span class="p" data-group-id="2339890337-2">}</span><span class="w">
</span><span class="c1"># Fallbacks are typically formed by progressively</span><span class="w">
</span><span class="c1"># stripping variant, territory and script from the</span><span class="w">
</span><span class="c1"># given locale name. But not always - there are</span><span class="w">
</span><span class="c1"># certain fallbacks that take a different path.</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Locale</span><span class="o">.</span><span class="n">fallback_locale_names</span><span class="p" data-group-id="0395504321-4">(</span><span class="ss">:nb</span><span class="p" data-group-id="0395504321-4">)</span><span class="w">
</span><span class="p" data-group-id="0395504321-5">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="0395504321-6">[</span><span class="ss">:nb</span><span class="p">,</span><span class="w"> </span><span class="ss">:no</span><span class="p">,</span><span class="w"> </span><span class="ss">:und</span><span class="p" data-group-id="0395504321-6">]</span><span class="p" data-group-id="0395504321-5">}</span></code></pre>
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Locale</span><span class="o">.</span><span class="n">fallback_locale_names</span><span class="p" data-group-id="2339890337-4">(</span><span class="ss">:nb</span><span class="p" data-group-id="2339890337-4">)</span><span class="w">
</span><span class="p" data-group-id="2339890337-5">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="2339890337-6">[</span><span class="ss">:nb</span><span class="p">,</span><span class="w"> </span><span class="ss">:no</span><span class="p">,</span><span class="w"> </span><span class="ss">:und</span><span class="p" data-group-id="2339890337-6">]</span><span class="p" data-group-id="2339890337-5">}</span></code></pre>
</section>
</section>
<section class="detail" id="fallback_locales/1">
@ -389,20 +389,20 @@ this specific locale.</p><h2 id="fallback_locales/1-arguments" class="section-he
</a>
<span class="text">Examples</span>
</h2>
<pre><code class="makeup elixir" translate="no"><span class="nc">Plausible.Cldr.Locale</span><span class="o">.</span><span class="n">fallback_locales</span><span class="p" data-group-id="4463340221-1">(</span><span class="ss">:&quot;fr-CA&quot;</span><span class="p" data-group-id="4463340221-1">)</span><span class="w">
</span><span class="p">=&gt;</span><span class="w"> </span><span class="p" data-group-id="4463340221-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="4463340221-3">[</span><span class="p" data-group-id="4463340221-4">#</span><span class="nc" data-group-id="4463340221-4">Cldr.LanguageTag</span><span class="p" data-group-id="4463340221-4">&lt;</span><span class="n">fr</span><span class="o">-</span><span class="nc">CA</span><span class="w"> </span><span class="p" data-group-id="4463340221-5">[</span><span class="n">validated</span><span class="p" data-group-id="4463340221-5">]</span><span class="p" data-group-id="4463340221-4">&gt;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="4463340221-6">#</span><span class="nc" data-group-id="4463340221-6">Cldr.LanguageTag</span><span class="p" data-group-id="4463340221-6">&lt;</span><span class="n">fr</span><span class="w"> </span><span class="p" data-group-id="4463340221-7">[</span><span class="n">validated</span><span class="p" data-group-id="4463340221-7">]</span><span class="p" data-group-id="4463340221-6">&gt;</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="4463340221-8">#</span><span class="nc" data-group-id="4463340221-8">Cldr.LanguageTag</span><span class="p" data-group-id="4463340221-8">&lt;</span><span class="n">und</span><span class="w"> </span><span class="p" data-group-id="4463340221-9">[</span><span class="n">validated</span><span class="p" data-group-id="4463340221-9">]</span><span class="p" data-group-id="4463340221-8">&gt;</span><span class="p" data-group-id="4463340221-3">]</span><span class="p" data-group-id="4463340221-2">}</span><span class="w">
<pre><code class="makeup elixir" translate="no"><span class="nc">Plausible.Cldr.Locale</span><span class="o">.</span><span class="n">fallback_locales</span><span class="p" data-group-id="7610474989-1">(</span><span class="ss">:&quot;fr-CA&quot;</span><span class="p" data-group-id="7610474989-1">)</span><span class="w">
</span><span class="p">=&gt;</span><span class="w"> </span><span class="p" data-group-id="7610474989-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="7610474989-3">[</span><span class="p" data-group-id="7610474989-4">#</span><span class="nc" data-group-id="7610474989-4">Cldr.LanguageTag</span><span class="p" data-group-id="7610474989-4">&lt;</span><span class="n">fr</span><span class="o">-</span><span class="nc">CA</span><span class="w"> </span><span class="p" data-group-id="7610474989-5">[</span><span class="n">validated</span><span class="p" data-group-id="7610474989-5">]</span><span class="p" data-group-id="7610474989-4">&gt;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="7610474989-6">#</span><span class="nc" data-group-id="7610474989-6">Cldr.LanguageTag</span><span class="p" data-group-id="7610474989-6">&lt;</span><span class="n">fr</span><span class="w"> </span><span class="p" data-group-id="7610474989-7">[</span><span class="n">validated</span><span class="p" data-group-id="7610474989-7">]</span><span class="p" data-group-id="7610474989-6">&gt;</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="7610474989-8">#</span><span class="nc" data-group-id="7610474989-8">Cldr.LanguageTag</span><span class="p" data-group-id="7610474989-8">&lt;</span><span class="n">und</span><span class="w"> </span><span class="p" data-group-id="7610474989-9">[</span><span class="n">validated</span><span class="p" data-group-id="7610474989-9">]</span><span class="p" data-group-id="7610474989-8">&gt;</span><span class="p" data-group-id="7610474989-3">]</span><span class="p" data-group-id="7610474989-2">}</span><span class="w">
</span><span class="c1"># Fallbacks are typically formed by progressively</span><span class="w">
</span><span class="c1"># stripping variant, territory and script from the</span><span class="w">
</span><span class="c1"># given locale name. But not always - there are</span><span class="w">
</span><span class="c1"># certain fallbacks that take a different path.</span><span class="w">
</span><span class="nc">Plausible.Cldr.Locale</span><span class="o">.</span><span class="n">fallback_locales</span><span class="p" data-group-id="4463340221-10">(</span><span class="ss">:nb</span><span class="p" data-group-id="4463340221-10">)</span><span class="p">)</span><span class="w">
</span><span class="p">=&gt;</span><span class="w"> </span><span class="p" data-group-id="4463340221-11">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="4463340221-12">[</span><span class="p" data-group-id="4463340221-13">#</span><span class="nc" data-group-id="4463340221-13">Cldr.LanguageTag</span><span class="p" data-group-id="4463340221-13">&lt;</span><span class="n">nb</span><span class="w"> </span><span class="p" data-group-id="4463340221-14">[</span><span class="n">validated</span><span class="p" data-group-id="4463340221-14">]</span><span class="p" data-group-id="4463340221-13">&gt;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="4463340221-15">#</span><span class="nc" data-group-id="4463340221-15">Cldr.LanguageTag</span><span class="p" data-group-id="4463340221-15">&lt;</span><span class="n">no</span><span class="w"> </span><span class="p" data-group-id="4463340221-16">[</span><span class="n">validated</span><span class="p" data-group-id="4463340221-16">]</span><span class="p" data-group-id="4463340221-15">&gt;</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="4463340221-17">#</span><span class="nc" data-group-id="4463340221-17">Cldr.LanguageTag</span><span class="p" data-group-id="4463340221-17">&lt;</span><span class="n">und</span><span class="w"> </span><span class="p" data-group-id="4463340221-18">[</span><span class="n">validated</span><span class="p" data-group-id="4463340221-18">]</span><span class="p" data-group-id="4463340221-17">&gt;</span><span class="p" data-group-id="4463340221-12">]</span><span class="p" data-group-id="4463340221-11">}</span></code></pre>
</span><span class="nc">Plausible.Cldr.Locale</span><span class="o">.</span><span class="n">fallback_locales</span><span class="p" data-group-id="7610474989-10">(</span><span class="ss">:nb</span><span class="p" data-group-id="7610474989-10">)</span><span class="p">)</span><span class="w">
</span><span class="p">=&gt;</span><span class="w"> </span><span class="p" data-group-id="7610474989-11">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="7610474989-12">[</span><span class="p" data-group-id="7610474989-13">#</span><span class="nc" data-group-id="7610474989-13">Cldr.LanguageTag</span><span class="p" data-group-id="7610474989-13">&lt;</span><span class="n">nb</span><span class="w"> </span><span class="p" data-group-id="7610474989-14">[</span><span class="n">validated</span><span class="p" data-group-id="7610474989-14">]</span><span class="p" data-group-id="7610474989-13">&gt;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="7610474989-15">#</span><span class="nc" data-group-id="7610474989-15">Cldr.LanguageTag</span><span class="p" data-group-id="7610474989-15">&lt;</span><span class="n">no</span><span class="w"> </span><span class="p" data-group-id="7610474989-16">[</span><span class="n">validated</span><span class="p" data-group-id="7610474989-16">]</span><span class="p" data-group-id="7610474989-15">&gt;</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="7610474989-17">#</span><span class="nc" data-group-id="7610474989-17">Cldr.LanguageTag</span><span class="p" data-group-id="7610474989-17">&lt;</span><span class="n">und</span><span class="w"> </span><span class="p" data-group-id="7610474989-18">[</span><span class="n">validated</span><span class="p" data-group-id="7610474989-18">]</span><span class="p" data-group-id="7610474989-17">&gt;</span><span class="p" data-group-id="7610474989-12">]</span><span class="p" data-group-id="7610474989-11">}</span></code></pre>
</section>
</section>
<section class="detail" id="locale_for_territory/1">
@ -533,15 +533,15 @@ generic top-level domain names.</p><h2 id="locale_from_host/2-examples" class="s
<span class="text">Examples</span>
</h2>
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Locale</span><span class="o">.</span><span class="n">locale_from_host</span><span class="w"> </span><span class="s">&quot;a.b.com.au&quot;</span><span class="w">
</span><span class="nc">Elixir.Plausible.Cldr</span><span class="o">.</span><span class="n">validate_locale</span><span class="p" data-group-id="5750641129-1">(</span><span class="ss">:&quot;en-AU&quot;</span><span class="p" data-group-id="5750641129-1">)</span><span class="w">
</span><span class="nc">Elixir.Plausible.Cldr</span><span class="o">.</span><span class="n">validate_locale</span><span class="p" data-group-id="2512327861-1">(</span><span class="ss">:&quot;en-AU&quot;</span><span class="p" data-group-id="2512327861-1">)</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Locale</span><span class="o">.</span><span class="n">locale_from_host</span><span class="p" data-group-id="5750641129-2">(</span><span class="s">&quot;a.b.com.tv&quot;</span><span class="p" data-group-id="5750641129-2">)</span><span class="w">
</span><span class="p" data-group-id="5750641129-3">{</span><span class="ss">:error</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="5750641129-4">{</span><span class="nc">Cldr.UnknownLocaleError</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;No locale was identified for territory </span><span class="se">\&quot;</span><span class="s">tv</span><span class="se">\&quot;</span><span class="s">&quot;</span><span class="p" data-group-id="5750641129-4">}</span><span class="p" data-group-id="5750641129-3">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Locale</span><span class="o">.</span><span class="n">locale_from_host</span><span class="p" data-group-id="2512327861-2">(</span><span class="s">&quot;a.b.com.tv&quot;</span><span class="p" data-group-id="2512327861-2">)</span><span class="w">
</span><span class="p" data-group-id="2512327861-3">{</span><span class="ss">:error</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="2512327861-4">{</span><span class="nc">Cldr.UnknownLocaleError</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;No locale was identified for territory </span><span class="se">\&quot;</span><span class="s">tv</span><span class="se">\&quot;</span><span class="s">&quot;</span><span class="p" data-group-id="2512327861-4">}</span><span class="p" data-group-id="2512327861-3">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Locale</span><span class="o">.</span><span class="n">locale_from_host</span><span class="p" data-group-id="5750641129-5">(</span><span class="s">&quot;a.b.com&quot;</span><span class="p" data-group-id="5750641129-5">)</span><span class="w">
</span><span class="p" data-group-id="5750641129-6">{</span><span class="ss">:error</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="5750641129-7">{</span><span class="nc">Cldr.UnknownLocaleError</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;No locale was identified for territory </span><span class="se">\&quot;</span><span class="s">com</span><span class="se">\&quot;</span><span class="s">&quot;</span><span class="p" data-group-id="5750641129-7">}</span><span class="p" data-group-id="5750641129-6">}</span></code></pre>
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Locale</span><span class="o">.</span><span class="n">locale_from_host</span><span class="p" data-group-id="2512327861-5">(</span><span class="s">&quot;a.b.com&quot;</span><span class="p" data-group-id="2512327861-5">)</span><span class="w">
</span><span class="p" data-group-id="2512327861-6">{</span><span class="ss">:error</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="2512327861-7">{</span><span class="nc">Cldr.UnknownLocaleError</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;No locale was identified for territory </span><span class="se">\&quot;</span><span class="s">com</span><span class="se">\&quot;</span><span class="s">&quot;</span><span class="p" data-group-id="2512327861-7">}</span><span class="p" data-group-id="2512327861-6">}</span></code></pre>
</section>
</section>
<section class="detail" id="new/1">
@ -683,12 +683,12 @@ be a territory.</p><h2 id="territory_from_host/1-arguments" class="section-headi
</a>
<span class="text">Examples</span>
</h2>
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Cldr.Locale</span><span class="o">.</span><span class="n">territory_from_host</span><span class="p" data-group-id="1446410920-1">(</span><span class="s">&quot;a.b.com.au&quot;</span><span class="p" data-group-id="1446410920-1">)</span><span class="w">
</span><span class="p" data-group-id="1446410920-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="ss">:AU</span><span class="p" data-group-id="1446410920-2">}</span><span class="w">
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Cldr.Locale</span><span class="o">.</span><span class="n">territory_from_host</span><span class="p" data-group-id="2886202091-1">(</span><span class="s">&quot;a.b.com.au&quot;</span><span class="p" data-group-id="2886202091-1">)</span><span class="w">
</span><span class="p" data-group-id="2886202091-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="ss">:AU</span><span class="p" data-group-id="2886202091-2">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Cldr.Locale</span><span class="o">.</span><span class="n">territory_from_host</span><span class="p" data-group-id="1446410920-3">(</span><span class="s">&quot;a.b.com&quot;</span><span class="p" data-group-id="1446410920-3">)</span><span class="w">
</span><span class="p" data-group-id="1446410920-4">{</span><span class="ss">:error</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="1446410920-5">{</span><span class="nc">Cldr.UnknownLocaleError</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;No locale was identified for territory </span><span class="se">\&quot;</span><span class="s">com</span><span class="se">\&quot;</span><span class="s">&quot;</span><span class="p" data-group-id="1446410920-5">}</span><span class="p" data-group-id="1446410920-4">}</span></code></pre>
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Cldr.Locale</span><span class="o">.</span><span class="n">territory_from_host</span><span class="p" data-group-id="2886202091-3">(</span><span class="s">&quot;a.b.com&quot;</span><span class="p" data-group-id="2886202091-3">)</span><span class="w">
</span><span class="p" data-group-id="2886202091-4">{</span><span class="ss">:error</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="2886202091-5">{</span><span class="nc">Cldr.UnknownLocaleError</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;No locale was identified for territory </span><span class="se">\&quot;</span><span class="s">com</span><span class="se">\&quot;</span><span class="s">&quot;</span><span class="p" data-group-id="2886202091-5">}</span><span class="p" data-group-id="2886202091-4">}</span></code></pre>
</section>
</section>
<section class="detail" id="territory_from_locale/1">

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>
@ -455,31 +455,31 @@ The valid substitution keys are <code class="inline">:zero</code>, <code class="
</a>
<span class="text">Examples</span>
</h2>
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number.Cardinal</span><span class="o">.</span><span class="n">pluralize</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;en&quot;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="6977066502-1">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;one&quot;</span><span class="p" data-group-id="6977066502-1">}</span><span class="w">
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number.Cardinal</span><span class="o">.</span><span class="n">pluralize</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;en&quot;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="4119690503-1">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;one&quot;</span><span class="p" data-group-id="4119690503-1">}</span><span class="w">
</span><span class="s">&quot;one&quot;</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number.Cardinal</span><span class="o">.</span><span class="n">pluralize</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;en&quot;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="6977066502-2">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;one&quot;</span><span class="p" data-group-id="6977066502-2">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number.Cardinal</span><span class="o">.</span><span class="n">pluralize</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;en&quot;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="4119690503-2">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;one&quot;</span><span class="p" data-group-id="4119690503-2">}</span><span class="w">
</span><span class="no">nil</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number.Cardinal</span><span class="o">.</span><span class="n">pluralize</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;en&quot;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="6977066502-3">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;one&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">two</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;two&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">other</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;other&quot;</span><span class="p" data-group-id="6977066502-3">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number.Cardinal</span><span class="o">.</span><span class="n">pluralize</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;en&quot;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="4119690503-3">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;one&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">two</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;two&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">other</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;other&quot;</span><span class="p" data-group-id="4119690503-3">}</span><span class="w">
</span><span class="s">&quot;other&quot;</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number.Cardinal</span><span class="o">.</span><span class="n">pluralize</span><span class="w"> </span><span class="mi">22</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;en&quot;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="6977066502-4">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;one&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">two</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;two&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">other</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;other&quot;</span><span class="p" data-group-id="6977066502-4">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number.Cardinal</span><span class="o">.</span><span class="n">pluralize</span><span class="w"> </span><span class="mi">22</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;en&quot;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="4119690503-4">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;one&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">two</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;two&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">other</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;other&quot;</span><span class="p" data-group-id="4119690503-4">}</span><span class="w">
</span><span class="s">&quot;other&quot;</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number.Cardinal</span><span class="o">.</span><span class="n">pluralize</span><span class="w"> </span><span class="nc">Decimal</span><span class="o">.</span><span class="n">new</span><span class="p" data-group-id="6977066502-5">(</span><span class="mi">1</span><span class="p" data-group-id="6977066502-5">)</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;en&quot;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="6977066502-6">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;one&quot;</span><span class="p" data-group-id="6977066502-6">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number.Cardinal</span><span class="o">.</span><span class="n">pluralize</span><span class="w"> </span><span class="nc">Decimal</span><span class="o">.</span><span class="n">new</span><span class="p" data-group-id="4119690503-5">(</span><span class="mi">1</span><span class="p" data-group-id="4119690503-5">)</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;en&quot;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="4119690503-6">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;one&quot;</span><span class="p" data-group-id="4119690503-6">}</span><span class="w">
</span><span class="s">&quot;one&quot;</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number.Cardinal</span><span class="o">.</span><span class="n">pluralize</span><span class="w"> </span><span class="nc">Decimal</span><span class="o">.</span><span class="n">new</span><span class="p" data-group-id="6977066502-7">(</span><span class="mi">2</span><span class="p" data-group-id="6977066502-7">)</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;en&quot;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="6977066502-8">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;one&quot;</span><span class="p" data-group-id="6977066502-8">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number.Cardinal</span><span class="o">.</span><span class="n">pluralize</span><span class="w"> </span><span class="nc">Decimal</span><span class="o">.</span><span class="n">new</span><span class="p" data-group-id="4119690503-7">(</span><span class="mi">2</span><span class="p" data-group-id="4119690503-7">)</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;en&quot;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="4119690503-8">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;one&quot;</span><span class="p" data-group-id="4119690503-8">}</span><span class="w">
</span><span class="no">nil</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number.Cardinal</span><span class="o">.</span><span class="n">pluralize</span><span class="w"> </span><span class="nc">Decimal</span><span class="o">.</span><span class="n">new</span><span class="p" data-group-id="6977066502-9">(</span><span class="mi">2</span><span class="p" data-group-id="6977066502-9">)</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;en&quot;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="6977066502-10">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;one&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">two</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;two&quot;</span><span class="p" data-group-id="6977066502-10">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number.Cardinal</span><span class="o">.</span><span class="n">pluralize</span><span class="w"> </span><span class="nc">Decimal</span><span class="o">.</span><span class="n">new</span><span class="p" data-group-id="4119690503-9">(</span><span class="mi">2</span><span class="p" data-group-id="4119690503-9">)</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;en&quot;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="4119690503-10">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;one&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">two</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;two&quot;</span><span class="p" data-group-id="4119690503-10">}</span><span class="w">
</span><span class="no">nil</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number.Cardinal</span><span class="o">.</span><span class="n">pluralize</span><span class="w"> </span><span class="mi">1</span><span class="o">..</span><span class="mi">10</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;ar&quot;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="6977066502-11">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;one&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">few</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;few&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">other</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;other&quot;</span><span class="p" data-group-id="6977066502-11">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number.Cardinal</span><span class="o">.</span><span class="n">pluralize</span><span class="w"> </span><span class="mi">1</span><span class="o">..</span><span class="mi">10</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;ar&quot;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="4119690503-11">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;one&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">few</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;few&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">other</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;other&quot;</span><span class="p" data-group-id="4119690503-11">}</span><span class="w">
</span><span class="s">&quot;few&quot;</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number.Cardinal</span><span class="o">.</span><span class="n">pluralize</span><span class="w"> </span><span class="mi">1</span><span class="o">..</span><span class="mi">10</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;en&quot;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="6977066502-12">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;one&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">few</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;few&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">other</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;other&quot;</span><span class="p" data-group-id="6977066502-12">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number.Cardinal</span><span class="o">.</span><span class="n">pluralize</span><span class="w"> </span><span class="mi">1</span><span class="o">..</span><span class="mi">10</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;en&quot;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="4119690503-12">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;one&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">few</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;few&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">other</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;other&quot;</span><span class="p" data-group-id="4119690503-12">}</span><span class="w">
</span><span class="s">&quot;other&quot;</span></code></pre>
</section>
</section>

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>
@ -468,7 +468,7 @@ to precompile all the known formats at compile time.</p><h2 id="decimal_format_l
<span class="text">Example</span>
</h2>
<pre><code class="makeup elixir" translate="no"><span class="c1">#=&gt; Plausible.Cldr.Number.Format.Format.decimal_format_list</span><span class="w">
</span><span class="p" data-group-id="6905691786-1">[</span><span class="s">&quot;#&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;#,##,##0%&quot;</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="0814871134-1">[</span><span class="s">&quot;#&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;#,##,##0%&quot;</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;#,##,##0.###&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;#,##,##0.00¤&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;#,##,##0.00¤;(#,##,##0.00¤)&quot;</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;#,##,##0 %&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;#,##0%&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;#,##0.###&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;#,##0.00 ¤&quot;</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;#,##0.00 ¤;(#,##0.00 ¤)&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;#,##0.00¤&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;#,##0.00¤;(#,##0.00¤)&quot;</span><span class="p">,</span><span class="w">
@ -478,7 +478,7 @@ to precompile all the known formats at compile time.</p><h2 id="decimal_format_l
</span><span class="s">&quot;000 B ¤&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;000 E ¤&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;000 K ¤&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;000 MRD ¤&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;000 Md ¤&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;000 Mio&#39;.&#39; ¤&quot;</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;000 Mio ¤&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;000 Mld ¤&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;000 Mln ¤&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;000 Mn ¤&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;000 Mrd&#39;.&#39; ¤&quot;</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;000 Mrd ¤&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;000 Mr ¤&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;000 M ¤&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;000 NT ¤&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;000 N ¤&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;000 Tn ¤&quot;</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;000 Tr ¤&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">...</span><span class="p" data-group-id="6905691786-1">]</span></code></pre>
</span><span class="s">&quot;000 Tr ¤&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">...</span><span class="p" data-group-id="0814871134-1">]</span></code></pre>
</section>
</section>
<section class="detail" id="decimal_format_list_for/1">
@ -526,8 +526,8 @@ the known formats at compile time. Its use is not otherwise recommended.</p><h2
</a>
<span class="text">Example</span>
</h2>
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number.Format</span><span class="o">.</span><span class="n">decimal_format_list_for</span><span class="p" data-group-id="0226629819-1">(</span><span class="ss">:en</span><span class="p" data-group-id="0226629819-1">)</span><span class="w">
</span><span class="p" data-group-id="0226629819-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="0226629819-3">[</span><span class="s">&quot;#,##0%&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;#,##0.###&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;#,##0.00&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;#,##0.00;(#,##0.00)&quot;</span><span class="p">,</span><span class="s">&quot;#E0&quot;</span><span class="p">,</span><span class="w">
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number.Format</span><span class="o">.</span><span class="n">decimal_format_list_for</span><span class="p" data-group-id="6961117894-1">(</span><span class="ss">:en</span><span class="p" data-group-id="6961117894-1">)</span><span class="w">
</span><span class="p" data-group-id="6961117894-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="6961117894-3">[</span><span class="s">&quot;#,##0%&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;#,##0.###&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;#,##0.00&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;#,##0.00;(#,##0.00)&quot;</span><span class="p">,</span><span class="s">&quot;#E0&quot;</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;0 billion&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;0 million&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;0 thousand&quot;</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;0 trillion&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;00 billion&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;00 million&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;00 thousand&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;00 trillion&quot;</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;000 billion&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;000 million&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;000 thousand&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;000 trillion&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;000B&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;000K&quot;</span><span class="p">,</span><span class="w">
@ -535,7 +535,7 @@ the known formats at compile time. Its use is not otherwise recommended.</p><h2
</span><span class="s">&quot;¤#,##0.00&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;¤#,##0.00;(¤#,##0.00)&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;¤000B&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;¤000K&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;¤000M&quot;</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;¤000T&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;¤00B&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;¤00K&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;¤00M&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;¤00T&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;¤0B&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;¤0K&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;¤0M&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;¤0T&quot;</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;¤ #,##0.00&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;¤ #,##0.00;(¤ #,##0.00)&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;¤ 000B&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;¤ 000K&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;¤ 000M&quot;</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;¤ 000T&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;¤ 00B&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;¤ 00K&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;¤ 00M&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;¤ 00T&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;¤ 0B&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;¤ 0K&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;¤ 0M&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;¤ 0T&quot;</span><span class="p" data-group-id="0226629819-3">]</span><span class="p" data-group-id="0226629819-2">}</span></code></pre>
</span><span class="s">&quot;¤ 000T&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;¤ 00B&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;¤ 00K&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;¤ 00M&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;¤ 00T&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;¤ 0B&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;¤ 0K&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;¤ 0M&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;¤ 0T&quot;</span><span class="p" data-group-id="6961117894-3">]</span><span class="p" data-group-id="6961117894-2">}</span></code></pre>
</section>
</section>
<section class="detail" id="default_grouping_for/1">
@ -588,8 +588,8 @@ is <a href="Plausible.Cldr.html#get_locale/0"><code class="inline">Plausible.Cld
</a>
<span class="text">Examples</span>
</h2>
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number.Format</span><span class="o">.</span><span class="n">default_grouping_for</span><span class="p" data-group-id="0868532914-1">(</span><span class="ss">:en</span><span class="p" data-group-id="0868532914-1">)</span><span class="w">
</span><span class="p" data-group-id="0868532914-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="0868532914-3">%{</span><span class="ss">fraction</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="0868532914-4">%{</span><span class="ss">first</span><span class="p">:</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="ss">rest</span><span class="p">:</span><span class="w"> </span><span class="mi">0</span><span class="p" data-group-id="0868532914-4">}</span><span class="p">,</span><span class="w"> </span><span class="ss">integer</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="0868532914-5">%{</span><span class="ss">first</span><span class="p">:</span><span class="w"> </span><span class="mi">3</span><span class="p">,</span><span class="w"> </span><span class="ss">rest</span><span class="p">:</span><span class="w"> </span><span class="mi">3</span><span class="p" data-group-id="0868532914-5">}</span><span class="p" data-group-id="0868532914-3">}</span><span class="p" data-group-id="0868532914-2">}</span></code></pre>
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number.Format</span><span class="o">.</span><span class="n">default_grouping_for</span><span class="p" data-group-id="7101792537-1">(</span><span class="ss">:en</span><span class="p" data-group-id="7101792537-1">)</span><span class="w">
</span><span class="p" data-group-id="7101792537-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="7101792537-3">%{</span><span class="ss">fraction</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="7101792537-4">%{</span><span class="ss">first</span><span class="p">:</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="ss">rest</span><span class="p">:</span><span class="w"> </span><span class="mi">0</span><span class="p" data-group-id="7101792537-4">}</span><span class="p">,</span><span class="w"> </span><span class="ss">integer</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="7101792537-5">%{</span><span class="ss">first</span><span class="p">:</span><span class="w"> </span><span class="mi">3</span><span class="p">,</span><span class="w"> </span><span class="ss">rest</span><span class="p">:</span><span class="w"> </span><span class="mi">3</span><span class="p" data-group-id="7101792537-5">}</span><span class="p" data-group-id="7101792537-3">}</span><span class="p" data-group-id="7101792537-2">}</span></code></pre>
</section>
</section>
<section class="detail" id="default_grouping_for!/1">
@ -641,8 +641,8 @@ is <a href="Plausible.Cldr.html#get_locale/0"><code class="inline">Plausible.Cld
</a>
<span class="text">Examples</span>
</h2>
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number.Format</span><span class="o">.</span><span class="n">default_grouping_for!</span><span class="p" data-group-id="5272880035-1">(</span><span class="ss">:en</span><span class="p" data-group-id="5272880035-1">)</span><span class="w">
</span><span class="p" data-group-id="5272880035-2">%{</span><span class="ss">fraction</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="5272880035-3">%{</span><span class="ss">first</span><span class="p">:</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="ss">rest</span><span class="p">:</span><span class="w"> </span><span class="mi">0</span><span class="p" data-group-id="5272880035-3">}</span><span class="p">,</span><span class="w"> </span><span class="ss">integer</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="5272880035-4">%{</span><span class="ss">first</span><span class="p">:</span><span class="w"> </span><span class="mi">3</span><span class="p">,</span><span class="w"> </span><span class="ss">rest</span><span class="p">:</span><span class="w"> </span><span class="mi">3</span><span class="p" data-group-id="5272880035-4">}</span><span class="p" data-group-id="5272880035-2">}</span></code></pre>
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number.Format</span><span class="o">.</span><span class="n">default_grouping_for!</span><span class="p" data-group-id="9648897049-1">(</span><span class="ss">:en</span><span class="p" data-group-id="9648897049-1">)</span><span class="w">
</span><span class="p" data-group-id="9648897049-2">%{</span><span class="ss">fraction</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="9648897049-3">%{</span><span class="ss">first</span><span class="p">:</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="ss">rest</span><span class="p">:</span><span class="w"> </span><span class="mi">0</span><span class="p" data-group-id="9648897049-3">}</span><span class="p">,</span><span class="w"> </span><span class="ss">integer</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="9648897049-4">%{</span><span class="ss">first</span><span class="p">:</span><span class="w"> </span><span class="mi">3</span><span class="p">,</span><span class="w"> </span><span class="ss">rest</span><span class="p">:</span><span class="w"> </span><span class="mi">3</span><span class="p" data-group-id="9648897049-4">}</span><span class="p" data-group-id="9648897049-2">}</span></code></pre>
</section>
</section>
<section class="detail" id="formats_for/2">
@ -699,18 +699,18 @@ by <a href="Plausible.Cldr.Number.System.html#number_systems_for/1"><code class=
</span><span class="ss">percent</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;#,##0 %&quot;</span><span class="p">,</span><span class="w">
</span><span class="ss">scientific</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;#E0&quot;</span><span class="p">,</span><span class="w">
</span><span class="ss">standard</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;#,##0.###&quot;</span><span class="w">
</span><span class="ss">currency_short</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="1170277018-1">[</span><span class="p" data-group-id="1170277018-2">{</span><span class="s">&quot;1000&quot;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1170277018-3">[</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;0 k ¤&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">other</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;0 k ¤&quot;</span><span class="p" data-group-id="1170277018-3">]</span><span class="p" data-group-id="1170277018-2">}</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="1170277018-4">{</span><span class="s">&quot;10000&quot;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1170277018-5">[</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;00 k ¤&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">other</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;00 k ¤&quot;</span><span class="p" data-group-id="1170277018-5">]</span><span class="p" data-group-id="1170277018-4">}</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="1170277018-6">{</span><span class="s">&quot;100000&quot;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1170277018-7">[</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;000 k ¤&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">other</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;000 k ¤&quot;</span><span class="p" data-group-id="1170277018-7">]</span><span class="p" data-group-id="1170277018-6">}</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="1170277018-8">{</span><span class="s">&quot;1000000&quot;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1170277018-9">[</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;0 M ¤&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">other</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;0 M ¤&quot;</span><span class="p" data-group-id="1170277018-9">]</span><span class="p" data-group-id="1170277018-8">}</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="1170277018-10">{</span><span class="s">&quot;10000000&quot;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1170277018-11">[</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;00 M ¤&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">other</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;00 M ¤&quot;</span><span class="p" data-group-id="1170277018-11">]</span><span class="p" data-group-id="1170277018-10">}</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="1170277018-12">{</span><span class="s">&quot;100000000&quot;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1170277018-13">[</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;000 M ¤&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">other</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;000 M ¤&quot;</span><span class="p" data-group-id="1170277018-13">]</span><span class="p" data-group-id="1170277018-12">}</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="1170277018-14">{</span><span class="s">&quot;1000000000&quot;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1170277018-15">[</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;0 Md ¤&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">other</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;0 Md ¤&quot;</span><span class="p" data-group-id="1170277018-15">]</span><span class="p" data-group-id="1170277018-14">}</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="1170277018-16">{</span><span class="s">&quot;10000000000&quot;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1170277018-17">[</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;00 Md ¤&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">other</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;00 Md ¤&quot;</span><span class="p" data-group-id="1170277018-17">]</span><span class="p" data-group-id="1170277018-16">}</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="1170277018-18">{</span><span class="s">&quot;100000000000&quot;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1170277018-19">[</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;000 Md ¤&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">other</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;000 Md ¤&quot;</span><span class="p" data-group-id="1170277018-19">]</span><span class="p" data-group-id="1170277018-18">}</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="1170277018-20">{</span><span class="s">&quot;1000000000000&quot;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1170277018-21">[</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;0 Bn ¤&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">other</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;0 Bn ¤&quot;</span><span class="p" data-group-id="1170277018-21">]</span><span class="p" data-group-id="1170277018-20">}</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="1170277018-22">{</span><span class="s">&quot;10000000000000&quot;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1170277018-23">[</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;00 Bn ¤&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">other</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;00 Bn ¤&quot;</span><span class="p" data-group-id="1170277018-23">]</span><span class="p" data-group-id="1170277018-22">}</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="1170277018-24">{</span><span class="s">&quot;100000000000000&quot;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1170277018-25">[</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;000 Bn ¤&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">other</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;000 Bn ¤&quot;</span><span class="p" data-group-id="1170277018-25">]</span><span class="p" data-group-id="1170277018-24">}</span><span class="p" data-group-id="1170277018-1">]</span><span class="p">,</span><span class="w">
</span><span class="ss">currency_short</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="4708449101-1">[</span><span class="p" data-group-id="4708449101-2">{</span><span class="s">&quot;1000&quot;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="4708449101-3">[</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;0 k ¤&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">other</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;0 k ¤&quot;</span><span class="p" data-group-id="4708449101-3">]</span><span class="p" data-group-id="4708449101-2">}</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="4708449101-4">{</span><span class="s">&quot;10000&quot;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="4708449101-5">[</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;00 k ¤&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">other</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;00 k ¤&quot;</span><span class="p" data-group-id="4708449101-5">]</span><span class="p" data-group-id="4708449101-4">}</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="4708449101-6">{</span><span class="s">&quot;100000&quot;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="4708449101-7">[</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;000 k ¤&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">other</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;000 k ¤&quot;</span><span class="p" data-group-id="4708449101-7">]</span><span class="p" data-group-id="4708449101-6">}</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="4708449101-8">{</span><span class="s">&quot;1000000&quot;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="4708449101-9">[</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;0 M ¤&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">other</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;0 M ¤&quot;</span><span class="p" data-group-id="4708449101-9">]</span><span class="p" data-group-id="4708449101-8">}</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="4708449101-10">{</span><span class="s">&quot;10000000&quot;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="4708449101-11">[</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;00 M ¤&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">other</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;00 M ¤&quot;</span><span class="p" data-group-id="4708449101-11">]</span><span class="p" data-group-id="4708449101-10">}</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="4708449101-12">{</span><span class="s">&quot;100000000&quot;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="4708449101-13">[</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;000 M ¤&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">other</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;000 M ¤&quot;</span><span class="p" data-group-id="4708449101-13">]</span><span class="p" data-group-id="4708449101-12">}</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="4708449101-14">{</span><span class="s">&quot;1000000000&quot;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="4708449101-15">[</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;0 Md ¤&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">other</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;0 Md ¤&quot;</span><span class="p" data-group-id="4708449101-15">]</span><span class="p" data-group-id="4708449101-14">}</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="4708449101-16">{</span><span class="s">&quot;10000000000&quot;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="4708449101-17">[</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;00 Md ¤&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">other</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;00 Md ¤&quot;</span><span class="p" data-group-id="4708449101-17">]</span><span class="p" data-group-id="4708449101-16">}</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="4708449101-18">{</span><span class="s">&quot;100000000000&quot;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="4708449101-19">[</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;000 Md ¤&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">other</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;000 Md ¤&quot;</span><span class="p" data-group-id="4708449101-19">]</span><span class="p" data-group-id="4708449101-18">}</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="4708449101-20">{</span><span class="s">&quot;1000000000000&quot;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="4708449101-21">[</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;0 Bn ¤&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">other</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;0 Bn ¤&quot;</span><span class="p" data-group-id="4708449101-21">]</span><span class="p" data-group-id="4708449101-20">}</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="4708449101-22">{</span><span class="s">&quot;10000000000000&quot;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="4708449101-23">[</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;00 Bn ¤&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">other</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;00 Bn ¤&quot;</span><span class="p" data-group-id="4708449101-23">]</span><span class="p" data-group-id="4708449101-22">}</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="4708449101-24">{</span><span class="s">&quot;100000000000000&quot;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="4708449101-25">[</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;000 Bn ¤&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">other</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;000 Bn ¤&quot;</span><span class="p" data-group-id="4708449101-25">]</span><span class="p" data-group-id="4708449101-24">}</span><span class="p" data-group-id="4708449101-1">]</span><span class="p">,</span><span class="w">
</span><span class="n">...</span><span class="w">
</span><span class="err">}</span></code></pre>
</section>
@ -801,8 +801,8 @@ is <a href="Plausible.Cldr.html#get_locale/0"><code class="inline">Plausible.Cld
</a>
<span class="text">Examples</span>
</h2>
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number.Format</span><span class="o">.</span><span class="n">minimum_grouping_digits_for</span><span class="p" data-group-id="6819221652-1">(</span><span class="s">&quot;en&quot;</span><span class="p" data-group-id="6819221652-1">)</span><span class="w">
</span><span class="p" data-group-id="6819221652-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p" data-group-id="6819221652-2">}</span></code></pre>
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number.Format</span><span class="o">.</span><span class="n">minimum_grouping_digits_for</span><span class="p" data-group-id="5042811348-1">(</span><span class="s">&quot;en&quot;</span><span class="p" data-group-id="5042811348-1">)</span><span class="w">
</span><span class="p" data-group-id="5042811348-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p" data-group-id="5042811348-2">}</span></code></pre>
</section>
</section>
<section class="detail" id="minimum_grouping_digits_for!/1">
@ -854,7 +854,7 @@ is <a href="Plausible.Cldr.html#get_locale/0"><code class="inline">Plausible.Cld
</a>
<span class="text">Examples</span>
</h2>
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number.Format</span><span class="o">.</span><span class="n">minimum_grouping_digits_for!</span><span class="p" data-group-id="5202441493-1">(</span><span class="s">&quot;en&quot;</span><span class="p" data-group-id="5202441493-1">)</span><span class="w">
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number.Format</span><span class="o">.</span><span class="n">minimum_grouping_digits_for!</span><span class="p" data-group-id="7780256049-1">(</span><span class="s">&quot;en&quot;</span><span class="p" data-group-id="7780256049-1">)</span><span class="w">
</span><span class="mi">1</span></code></pre>
</section>
</section>

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>
@ -458,31 +458,31 @@ The valid substitution keys are <code class="inline">:zero</code>, <code class="
</a>
<span class="text">Examples</span>
</h2>
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number.Ordinal</span><span class="o">.</span><span class="n">pluralize</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="ss">:en</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="2606219541-1">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;one&quot;</span><span class="p" data-group-id="2606219541-1">}</span><span class="w">
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number.Ordinal</span><span class="o">.</span><span class="n">pluralize</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="ss">:en</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="3918697406-1">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;one&quot;</span><span class="p" data-group-id="3918697406-1">}</span><span class="w">
</span><span class="s">&quot;one&quot;</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number.Ordinal</span><span class="o">.</span><span class="n">pluralize</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="ss">:en</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="2606219541-2">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;one&quot;</span><span class="p" data-group-id="2606219541-2">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number.Ordinal</span><span class="o">.</span><span class="n">pluralize</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="ss">:en</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="3918697406-2">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;one&quot;</span><span class="p" data-group-id="3918697406-2">}</span><span class="w">
</span><span class="no">nil</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number.Ordinal</span><span class="o">.</span><span class="n">pluralize</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="ss">:en</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="2606219541-3">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;one&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">two</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;two&quot;</span><span class="p" data-group-id="2606219541-3">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number.Ordinal</span><span class="o">.</span><span class="n">pluralize</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="ss">:en</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="3918697406-3">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;one&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">two</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;two&quot;</span><span class="p" data-group-id="3918697406-3">}</span><span class="w">
</span><span class="s">&quot;two&quot;</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number.Ordinal</span><span class="o">.</span><span class="n">pluralize</span><span class="w"> </span><span class="mi">22</span><span class="p">,</span><span class="w"> </span><span class="ss">:en</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="2606219541-4">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;one&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">two</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;two&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">other</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;other&quot;</span><span class="p" data-group-id="2606219541-4">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number.Ordinal</span><span class="o">.</span><span class="n">pluralize</span><span class="w"> </span><span class="mi">22</span><span class="p">,</span><span class="w"> </span><span class="ss">:en</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="3918697406-4">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;one&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">two</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;two&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">other</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;other&quot;</span><span class="p" data-group-id="3918697406-4">}</span><span class="w">
</span><span class="s">&quot;two&quot;</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number.Ordinal</span><span class="o">.</span><span class="n">pluralize</span><span class="w"> </span><span class="nc">Decimal</span><span class="o">.</span><span class="n">new</span><span class="p" data-group-id="2606219541-5">(</span><span class="mi">1</span><span class="p" data-group-id="2606219541-5">)</span><span class="p">,</span><span class="w"> </span><span class="ss">:en</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="2606219541-6">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;one&quot;</span><span class="p" data-group-id="2606219541-6">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number.Ordinal</span><span class="o">.</span><span class="n">pluralize</span><span class="w"> </span><span class="nc">Decimal</span><span class="o">.</span><span class="n">new</span><span class="p" data-group-id="3918697406-5">(</span><span class="mi">1</span><span class="p" data-group-id="3918697406-5">)</span><span class="p">,</span><span class="w"> </span><span class="ss">:en</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="3918697406-6">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;one&quot;</span><span class="p" data-group-id="3918697406-6">}</span><span class="w">
</span><span class="s">&quot;one&quot;</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number.Ordinal</span><span class="o">.</span><span class="n">pluralize</span><span class="w"> </span><span class="nc">Decimal</span><span class="o">.</span><span class="n">new</span><span class="p" data-group-id="2606219541-7">(</span><span class="mi">2</span><span class="p" data-group-id="2606219541-7">)</span><span class="p">,</span><span class="w"> </span><span class="ss">:en</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="2606219541-8">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;one&quot;</span><span class="p" data-group-id="2606219541-8">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number.Ordinal</span><span class="o">.</span><span class="n">pluralize</span><span class="w"> </span><span class="nc">Decimal</span><span class="o">.</span><span class="n">new</span><span class="p" data-group-id="3918697406-7">(</span><span class="mi">2</span><span class="p" data-group-id="3918697406-7">)</span><span class="p">,</span><span class="w"> </span><span class="ss">:en</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="3918697406-8">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;one&quot;</span><span class="p" data-group-id="3918697406-8">}</span><span class="w">
</span><span class="no">nil</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number.Ordinal</span><span class="o">.</span><span class="n">pluralize</span><span class="w"> </span><span class="nc">Decimal</span><span class="o">.</span><span class="n">new</span><span class="p" data-group-id="2606219541-9">(</span><span class="mi">2</span><span class="p" data-group-id="2606219541-9">)</span><span class="p">,</span><span class="w"> </span><span class="ss">:en</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="2606219541-10">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;one&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">two</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;two&quot;</span><span class="p" data-group-id="2606219541-10">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number.Ordinal</span><span class="o">.</span><span class="n">pluralize</span><span class="w"> </span><span class="nc">Decimal</span><span class="o">.</span><span class="n">new</span><span class="p" data-group-id="3918697406-9">(</span><span class="mi">2</span><span class="p" data-group-id="3918697406-9">)</span><span class="p">,</span><span class="w"> </span><span class="ss">:en</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="3918697406-10">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;one&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">two</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;two&quot;</span><span class="p" data-group-id="3918697406-10">}</span><span class="w">
</span><span class="s">&quot;two&quot;</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number.Ordinal</span><span class="o">.</span><span class="n">pluralize</span><span class="w"> </span><span class="mi">1</span><span class="o">..</span><span class="mi">10</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;ar&quot;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="2606219541-11">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;one&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">few</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;few&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">other</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;other&quot;</span><span class="p" data-group-id="2606219541-11">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number.Ordinal</span><span class="o">.</span><span class="n">pluralize</span><span class="w"> </span><span class="mi">1</span><span class="o">..</span><span class="mi">10</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;ar&quot;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="3918697406-11">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;one&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">few</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;few&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">other</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;other&quot;</span><span class="p" data-group-id="3918697406-11">}</span><span class="w">
</span><span class="s">&quot;other&quot;</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number.Ordinal</span><span class="o">.</span><span class="n">pluralize</span><span class="w"> </span><span class="mi">1</span><span class="o">..</span><span class="mi">10</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;en&quot;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="2606219541-12">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;one&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">few</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;few&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">other</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;other&quot;</span><span class="p" data-group-id="2606219541-12">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number.Ordinal</span><span class="o">.</span><span class="n">pluralize</span><span class="w"> </span><span class="mi">1</span><span class="o">..</span><span class="mi">10</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;en&quot;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="3918697406-12">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;one&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">few</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;few&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">other</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;other&quot;</span><span class="p" data-group-id="3918697406-12">}</span><span class="w">
</span><span class="s">&quot;other&quot;</span></code></pre>
</section>
</section>

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>
@ -378,9 +378,9 @@ is <a href="Plausible.Cldr.html#get_locale/0"><code class="inline">Plausible.Cld
</a>
<span class="text">Example:</span>
</h2>
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number.Symbol</span><span class="o">.</span><span class="n">number_symbols_for</span><span class="p" data-group-id="9601170882-1">(</span><span class="ss">:th</span><span class="p" data-group-id="9601170882-1">)</span><span class="w">
</span><span class="p" data-group-id="9601170882-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="9601170882-3">%{</span><span class="w">
</span><span class="ss">latn</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="9601170882-4">%</span><span class="nc" data-group-id="9601170882-4">Cldr.Number.Symbol</span><span class="p" data-group-id="9601170882-4">{</span><span class="w">
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number.Symbol</span><span class="o">.</span><span class="n">number_symbols_for</span><span class="p" data-group-id="9003115663-1">(</span><span class="ss">:th</span><span class="p" data-group-id="9003115663-1">)</span><span class="w">
</span><span class="p" data-group-id="9003115663-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="9003115663-3">%{</span><span class="w">
</span><span class="ss">latn</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="9003115663-4">%</span><span class="nc" data-group-id="9003115663-4">Cldr.Number.Symbol</span><span class="p" data-group-id="9003115663-4">{</span><span class="w">
</span><span class="ss">decimal</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;.&quot;</span><span class="p">,</span><span class="w">
</span><span class="ss">exponential</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;E&quot;</span><span class="p">,</span><span class="w">
</span><span class="ss">group</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;,&quot;</span><span class="p">,</span><span class="w">
@ -393,8 +393,8 @@ is <a href="Plausible.Cldr.html#get_locale/0"><code class="inline">Plausible.Cld
</span><span class="ss">plus_sign</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;+&quot;</span><span class="p">,</span><span class="w">
</span><span class="ss">superscripting_exponent</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;×&quot;</span><span class="p">,</span><span class="w">
</span><span class="ss">time_separator</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;:&quot;</span><span class="w">
</span><span class="p" data-group-id="9601170882-4">}</span><span class="p">,</span><span class="w">
</span><span class="ss">thai</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="9601170882-5">%</span><span class="nc" data-group-id="9601170882-5">Cldr.Number.Symbol</span><span class="p" data-group-id="9601170882-5">{</span><span class="w">
</span><span class="p" data-group-id="9003115663-4">}</span><span class="p">,</span><span class="w">
</span><span class="ss">thai</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="9003115663-5">%</span><span class="nc" data-group-id="9003115663-5">Cldr.Number.Symbol</span><span class="p" data-group-id="9003115663-5">{</span><span class="w">
</span><span class="ss">decimal</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;.&quot;</span><span class="p">,</span><span class="w">
</span><span class="ss">exponential</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;E&quot;</span><span class="p">,</span><span class="w">
</span><span class="ss">group</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;,&quot;</span><span class="p">,</span><span class="w">
@ -407,8 +407,8 @@ is <a href="Plausible.Cldr.html#get_locale/0"><code class="inline">Plausible.Cld
</span><span class="ss">plus_sign</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;+&quot;</span><span class="p">,</span><span class="w">
</span><span class="ss">superscripting_exponent</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;×&quot;</span><span class="p">,</span><span class="w">
</span><span class="ss">time_separator</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;:&quot;</span><span class="w">
</span><span class="p" data-group-id="9601170882-5">}</span><span class="w">
</span><span class="p" data-group-id="9601170882-3">}</span><span class="p" data-group-id="9601170882-2">}</span></code></pre>
</span><span class="p" data-group-id="9003115663-5">}</span><span class="w">
</span><span class="p" data-group-id="9003115663-3">}</span><span class="p" data-group-id="9003115663-2">}</span></code></pre>
</section>
</section>
<section class="detail" id="number_symbols_for/2">

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>
@ -317,23 +317,23 @@ it is returned as is.</p><h2 id="number_system_for/2-examples" class="section-he
<span class="text">Examples</span>
</h2>
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number.System</span><span class="o">.</span><span class="n">number_system_for</span><span class="w"> </span><span class="s">&quot;th&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">:latn</span><span class="w">
</span><span class="p" data-group-id="8679070677-1">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="8679070677-2">%{</span><span class="ss">digits</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;0123456789&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">type</span><span class="p">:</span><span class="w"> </span><span class="ss">:numeric</span><span class="p" data-group-id="8679070677-2">}</span><span class="p" data-group-id="8679070677-1">}</span><span class="w">
</span><span class="p" data-group-id="8134133396-1">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="8134133396-2">%{</span><span class="ss">digits</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;0123456789&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">type</span><span class="p">:</span><span class="w"> </span><span class="ss">:numeric</span><span class="p" data-group-id="8134133396-2">}</span><span class="p" data-group-id="8134133396-1">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number.System</span><span class="o">.</span><span class="n">number_system_for</span><span class="w"> </span><span class="s">&quot;en&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">:default</span><span class="w">
</span><span class="p" data-group-id="8679070677-3">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="8679070677-4">%{</span><span class="ss">digits</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;0123456789&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">type</span><span class="p">:</span><span class="w"> </span><span class="ss">:numeric</span><span class="p" data-group-id="8679070677-4">}</span><span class="p" data-group-id="8679070677-3">}</span><span class="w">
</span><span class="p" data-group-id="8134133396-3">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="8134133396-4">%{</span><span class="ss">digits</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;0123456789&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">type</span><span class="p">:</span><span class="w"> </span><span class="ss">:numeric</span><span class="p" data-group-id="8134133396-4">}</span><span class="p" data-group-id="8134133396-3">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number.System</span><span class="o">.</span><span class="n">number_system_for</span><span class="w"> </span><span class="s">&quot;he&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">:traditional</span><span class="w">
</span><span class="p" data-group-id="8679070677-5">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="8679070677-6">%{</span><span class="ss">rules</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;hebrew&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">type</span><span class="p">:</span><span class="w"> </span><span class="ss">:algorithmic</span><span class="p" data-group-id="8679070677-6">}</span><span class="p" data-group-id="8679070677-5">}</span><span class="w">
</span><span class="p" data-group-id="8134133396-5">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="8134133396-6">%{</span><span class="ss">rules</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;hebrew&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">type</span><span class="p">:</span><span class="w"> </span><span class="ss">:algorithmic</span><span class="p" data-group-id="8134133396-6">}</span><span class="p" data-group-id="8134133396-5">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number.System</span><span class="o">.</span><span class="n">number_system_for</span><span class="w"> </span><span class="s">&quot;en&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">:native</span><span class="w">
</span><span class="p" data-group-id="8679070677-7">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="8679070677-8">%{</span><span class="ss">digits</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;0123456789&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">type</span><span class="p">:</span><span class="w"> </span><span class="ss">:numeric</span><span class="p" data-group-id="8679070677-8">}</span><span class="p" data-group-id="8679070677-7">}</span><span class="w">
</span><span class="p" data-group-id="8134133396-7">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="8134133396-8">%{</span><span class="ss">digits</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;0123456789&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">type</span><span class="p">:</span><span class="w"> </span><span class="ss">:numeric</span><span class="p" data-group-id="8134133396-8">}</span><span class="p" data-group-id="8134133396-7">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number.System</span><span class="o">.</span><span class="n">number_system_for</span><span class="w"> </span><span class="s">&quot;en&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">:finance</span><span class="w">
</span><span class="p" data-group-id="8679070677-9">{</span><span class="w">
</span><span class="p" data-group-id="8134133396-9">{</span><span class="w">
</span><span class="ss">:error</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="8679070677-10">{</span><span class="nc">Cldr.UnknownNumberSystemError</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;The number system :finance is unknown for the locale named :en. Valid number systems are %{default: :latn, native: :latn}&quot;</span><span class="p" data-group-id="8679070677-10">}</span><span class="w">
</span><span class="p" data-group-id="8679070677-9">}</span></code></pre>
</span><span class="p" data-group-id="8134133396-10">{</span><span class="nc">Cldr.UnknownNumberSystemError</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;The number system :finance is unknown for the locale named :en. Valid number systems are %{default: :latn, native: :latn}&quot;</span><span class="p" data-group-id="8134133396-10">}</span><span class="w">
</span><span class="p" data-group-id="8134133396-9">}</span></code></pre>
</section>
</section>
<section class="detail" id="number_system_from_locale/1">
@ -424,10 +424,10 @@ or a <a href="https://hexdocs.pm/ex_cldr/2.37.5/Cldr.LanguageTag.html"><code cla
<span class="text">Examples</span>
</h2>
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number.System</span><span class="o">.</span><span class="n">number_system_names_for</span><span class="w"> </span><span class="s">&quot;en&quot;</span><span class="w">
</span><span class="p" data-group-id="3542821377-1">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="3542821377-2">[</span><span class="ss">:latn</span><span class="p" data-group-id="3542821377-2">]</span><span class="p" data-group-id="3542821377-1">}</span><span class="w">
</span><span class="p" data-group-id="0465984053-1">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="0465984053-2">[</span><span class="ss">:latn</span><span class="p" data-group-id="0465984053-2">]</span><span class="p" data-group-id="0465984053-1">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number.System</span><span class="o">.</span><span class="n">number_system_names_for</span><span class="w"> </span><span class="s">&quot;zz&quot;</span><span class="w">
</span><span class="p" data-group-id="3542821377-3">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="3542821377-4">{</span><span class="nc">Cldr.InvalidLanguageError</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;The language </span><span class="se">\&quot;</span><span class="s">zz</span><span class="se">\&quot;</span><span class="s"> is invalid&quot;</span><span class="p" data-group-id="3542821377-4">}</span><span class="p" data-group-id="3542821377-3">}</span></code></pre>
</span><span class="p" data-group-id="0465984053-3">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="0465984053-4">{</span><span class="nc">Cldr.InvalidLanguageError</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;The language </span><span class="se">\&quot;</span><span class="s">zz</span><span class="se">\&quot;</span><span class="s"> is invalid&quot;</span><span class="p" data-group-id="0465984053-4">}</span><span class="p" data-group-id="0465984053-3">}</span></code></pre>
</section>
</section>
<section class="detail" id="number_system_names_for!/1">
@ -509,13 +509,13 @@ or a <a href="https://hexdocs.pm/ex_cldr/2.37.5/Cldr.LanguageTag.html"><code cla
<span class="text">Examples</span>
</h2>
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number.System</span><span class="o">.</span><span class="n">number_systems_for</span><span class="w"> </span><span class="s">&quot;en&quot;</span><span class="w">
</span><span class="p" data-group-id="6365221305-1">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="6365221305-2">%{</span><span class="ss">default</span><span class="p">:</span><span class="w"> </span><span class="ss">:latn</span><span class="p">,</span><span class="w"> </span><span class="ss">native</span><span class="p">:</span><span class="w"> </span><span class="ss">:latn</span><span class="p" data-group-id="6365221305-2">}</span><span class="p" data-group-id="6365221305-1">}</span><span class="w">
</span><span class="p" data-group-id="3975475763-1">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="3975475763-2">%{</span><span class="ss">default</span><span class="p">:</span><span class="w"> </span><span class="ss">:latn</span><span class="p">,</span><span class="w"> </span><span class="ss">native</span><span class="p">:</span><span class="w"> </span><span class="ss">:latn</span><span class="p" data-group-id="3975475763-2">}</span><span class="p" data-group-id="3975475763-1">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number.System</span><span class="o">.</span><span class="n">number_systems_for</span><span class="w"> </span><span class="s">&quot;th&quot;</span><span class="w">
</span><span class="p" data-group-id="6365221305-3">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="6365221305-4">%{</span><span class="ss">default</span><span class="p">:</span><span class="w"> </span><span class="ss">:latn</span><span class="p">,</span><span class="w"> </span><span class="ss">native</span><span class="p">:</span><span class="w"> </span><span class="ss">:thai</span><span class="p" data-group-id="6365221305-4">}</span><span class="p" data-group-id="6365221305-3">}</span><span class="w">
</span><span class="p" data-group-id="3975475763-3">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="3975475763-4">%{</span><span class="ss">default</span><span class="p">:</span><span class="w"> </span><span class="ss">:latn</span><span class="p">,</span><span class="w"> </span><span class="ss">native</span><span class="p">:</span><span class="w"> </span><span class="ss">:thai</span><span class="p" data-group-id="3975475763-4">}</span><span class="p" data-group-id="3975475763-3">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number.System</span><span class="o">.</span><span class="n">number_systems_for</span><span class="w"> </span><span class="s">&quot;zz&quot;</span><span class="w">
</span><span class="p" data-group-id="6365221305-5">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="6365221305-6">{</span><span class="nc">Cldr.InvalidLanguageError</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;The language </span><span class="se">\&quot;</span><span class="s">zz</span><span class="se">\&quot;</span><span class="s"> is invalid&quot;</span><span class="p" data-group-id="6365221305-6">}</span><span class="p" data-group-id="6365221305-5">}</span></code></pre>
</span><span class="p" data-group-id="3975475763-5">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="3975475763-6">{</span><span class="nc">Cldr.InvalidLanguageError</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;The language </span><span class="se">\&quot;</span><span class="s">zz</span><span class="se">\&quot;</span><span class="s"> is invalid&quot;</span><span class="p" data-group-id="3975475763-6">}</span><span class="p" data-group-id="3975475763-5">}</span></code></pre>
</section>
</section>
<section class="detail" id="number_systems_for!/1">
@ -613,20 +613,20 @@ actual system name.</p><h2 id="system_name_from/2-examples" class="section-headi
</a>
<span class="text">Examples</span>
</h2>
<pre><code class="makeup elixir" translate="no"><span class="n">ex</span><span class="o">&gt;</span><span class="w"> </span><span class="nc">Plausible.Cldr.Number.System</span><span class="o">.</span><span class="n">system_name_from</span><span class="p" data-group-id="7110517914-1">(</span><span class="ss">:default</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;en&quot;</span><span class="p" data-group-id="7110517914-1">)</span><span class="w">
</span><span class="p" data-group-id="7110517914-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="ss">:latn</span><span class="p" data-group-id="7110517914-2">}</span><span class="w">
<pre><code class="makeup elixir" translate="no"><span class="n">ex</span><span class="o">&gt;</span><span class="w"> </span><span class="nc">Plausible.Cldr.Number.System</span><span class="o">.</span><span class="n">system_name_from</span><span class="p" data-group-id="7338571400-1">(</span><span class="ss">:default</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;en&quot;</span><span class="p" data-group-id="7338571400-1">)</span><span class="w">
</span><span class="p" data-group-id="7338571400-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="ss">:latn</span><span class="p" data-group-id="7338571400-2">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number.System</span><span class="o">.</span><span class="n">system_name_from</span><span class="p" data-group-id="7110517914-3">(</span><span class="s">&quot;latn&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;en&quot;</span><span class="p" data-group-id="7110517914-3">)</span><span class="w">
</span><span class="p" data-group-id="7110517914-4">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="ss">:latn</span><span class="p" data-group-id="7110517914-4">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number.System</span><span class="o">.</span><span class="n">system_name_from</span><span class="p" data-group-id="7338571400-3">(</span><span class="s">&quot;latn&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;en&quot;</span><span class="p" data-group-id="7338571400-3">)</span><span class="w">
</span><span class="p" data-group-id="7338571400-4">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="ss">:latn</span><span class="p" data-group-id="7338571400-4">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number.System</span><span class="o">.</span><span class="n">system_name_from</span><span class="p" data-group-id="7110517914-5">(</span><span class="ss">:native</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;en&quot;</span><span class="p" data-group-id="7110517914-5">)</span><span class="w">
</span><span class="p" data-group-id="7110517914-6">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="ss">:latn</span><span class="p" data-group-id="7110517914-6">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number.System</span><span class="o">.</span><span class="n">system_name_from</span><span class="p" data-group-id="7338571400-5">(</span><span class="ss">:native</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;en&quot;</span><span class="p" data-group-id="7338571400-5">)</span><span class="w">
</span><span class="p" data-group-id="7338571400-6">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="ss">:latn</span><span class="p" data-group-id="7338571400-6">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number.System</span><span class="o">.</span><span class="n">system_name_from</span><span class="p" data-group-id="7110517914-7">(</span><span class="ss">:nope</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;en&quot;</span><span class="p" data-group-id="7110517914-7">)</span><span class="w">
</span><span class="p" data-group-id="7110517914-8">{</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number.System</span><span class="o">.</span><span class="n">system_name_from</span><span class="p" data-group-id="7338571400-7">(</span><span class="ss">:nope</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;en&quot;</span><span class="p" data-group-id="7338571400-7">)</span><span class="w">
</span><span class="p" data-group-id="7338571400-8">{</span><span class="w">
</span><span class="ss">:error</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="7110517914-9">{</span><span class="nc">Cldr.UnknownNumberSystemError</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;The number system :nope is unknown&quot;</span><span class="p" data-group-id="7110517914-9">}</span><span class="w">
</span><span class="p" data-group-id="7110517914-8">}</span></code></pre><p>Note that return value is not guaranteed to be a valid
</span><span class="p" data-group-id="7338571400-9">{</span><span class="nc">Cldr.UnknownNumberSystemError</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;The number system :nope is unknown&quot;</span><span class="p" data-group-id="7338571400-9">}</span><span class="w">
</span><span class="p" data-group-id="7338571400-8">}</span></code></pre><p>Note that return value is not guaranteed to be a valid
number system for the given locale as demonstrated in the third example.</p>
</section>
</section>
@ -673,16 +673,16 @@ is recommended.</p></li></ul><h2 id="to_system/2-examples" class="section-headin
<span class="text">Examples</span>
</h2>
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number.System</span><span class="o">.</span><span class="n">to_system</span><span class="w"> </span><span class="mi">123456</span><span class="p">,</span><span class="w"> </span><span class="ss">:hebr</span><span class="w">
</span><span class="p" data-group-id="1189869856-1">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;קכ״ג׳תנ״ו&quot;</span><span class="p" data-group-id="1189869856-1">}</span><span class="w">
</span><span class="p" data-group-id="6913889228-1">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;קכ״ג׳תנ״ו&quot;</span><span class="p" data-group-id="6913889228-1">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number.System</span><span class="o">.</span><span class="n">to_system</span><span class="w"> </span><span class="mi">123</span><span class="p">,</span><span class="w"> </span><span class="ss">:hans</span><span class="w">
</span><span class="p" data-group-id="1189869856-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;一百二十三&quot;</span><span class="p" data-group-id="1189869856-2">}</span><span class="w">
</span><span class="p" data-group-id="6913889228-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;一百二十三&quot;</span><span class="p" data-group-id="6913889228-2">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number.System</span><span class="o">.</span><span class="n">to_system</span><span class="w"> </span><span class="mi">123</span><span class="p">,</span><span class="w"> </span><span class="ss">:hant</span><span class="w">
</span><span class="p" data-group-id="1189869856-3">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;一百二十三&quot;</span><span class="p" data-group-id="1189869856-3">}</span><span class="w">
</span><span class="p" data-group-id="6913889228-3">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;一百二十三&quot;</span><span class="p" data-group-id="6913889228-3">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number.System</span><span class="o">.</span><span class="n">to_system</span><span class="w"> </span><span class="mi">123</span><span class="p">,</span><span class="w"> </span><span class="ss">:hansfin</span><span class="w">
</span><span class="p" data-group-id="1189869856-4">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;壹佰贰拾叁&quot;</span><span class="p" data-group-id="1189869856-4">}</span></code></pre>
</span><span class="p" data-group-id="6913889228-4">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;壹佰贰拾叁&quot;</span><span class="p" data-group-id="6913889228-4">}</span></code></pre>
</section>
</section>
<section class="detail" id="to_system!/2">

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>
@ -162,12 +162,12 @@ digits between number systems. For example from :arabic to :latn. Since genera
transliteration map is slow, pairs of transliterations can be configured so that the
transliteration map is created at compile time and therefore speeding up transliteration at
run time.</p><p>To configure these transliteration pairs, add the to the <code class="inline">use Cldr</code> configuration
in a backend module:</p><pre><code class="makeup elixir" translate="no"><span class="kd">defmodule</span><span class="w"> </span><span class="nc">MyApp.Cldr</span><span class="w"> </span><span class="k" data-group-id="5565595646-1">do</span><span class="w">
in a backend module:</p><pre><code class="makeup elixir" translate="no"><span class="kd">defmodule</span><span class="w"> </span><span class="nc">MyApp.Cldr</span><span class="w"> </span><span class="k" data-group-id="1857053652-1">do</span><span class="w">
</span><span class="kn">use</span><span class="w"> </span><span class="nc">Cldr</span><span class="p">,</span><span class="w">
</span><span class="ss">locale</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="5565595646-2">[</span><span class="s">&quot;en&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;fr&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;th&quot;</span><span class="p" data-group-id="5565595646-2">]</span><span class="p">,</span><span class="w">
</span><span class="ss">locale</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="1857053652-2">[</span><span class="s">&quot;en&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;fr&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;th&quot;</span><span class="p" data-group-id="1857053652-2">]</span><span class="p">,</span><span class="w">
</span><span class="ss">default_locale</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;en&quot;</span><span class="p">,</span><span class="w">
</span><span class="ss">precompile_transliterations</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="5565595646-3">[</span><span class="p" data-group-id="5565595646-4">{</span><span class="ss">:latn</span><span class="p">,</span><span class="w"> </span><span class="ss">:thai</span><span class="p" data-group-id="5565595646-4">}</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="5565595646-5">{</span><span class="ss">:arab</span><span class="p">,</span><span class="w"> </span><span class="ss">:thai</span><span class="p" data-group-id="5565595646-5">}</span><span class="p" data-group-id="5565595646-3">]</span><span class="w">
</span><span class="k" data-group-id="5565595646-1">end</span></code></pre><p>Where each tuple in the list configures one transliteration map. In this example, two maps are
</span><span class="ss">precompile_transliterations</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="1857053652-3">[</span><span class="p" data-group-id="1857053652-4">{</span><span class="ss">:latn</span><span class="p">,</span><span class="w"> </span><span class="ss">:thai</span><span class="p" data-group-id="1857053652-4">}</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1857053652-5">{</span><span class="ss">:arab</span><span class="p">,</span><span class="w"> </span><span class="ss">:thai</span><span class="p" data-group-id="1857053652-5">}</span><span class="p" data-group-id="1857053652-3">]</span><span class="w">
</span><span class="k" data-group-id="1857053652-1">end</span></code></pre><p>Where each tuple in the list configures one transliteration map. In this example, two maps are
configured: from <code class="inline">:latn</code> to <code class="inline">:thai</code> and from <code class="inline">:arab</code> to <code class="inline">:thai</code>.</p><p>A list of configurable number systems is returned by <a href="https://hexdocs.pm/ex_cldr_numbers/2.32.3/Cldr.Number.System.html#numeric_systems/0"><code class="inline">Cldr.Number.System.numeric_systems/0</code></a>.</p><p>If a transliteration is requested between two number pairs that have not been configured for
precompilation, a warning is logged.</p>
</section>
@ -281,22 +281,22 @@ and <a href="Plausible.Cldr.Number.System.html#number_systems_for/1"><code class
</a>
<span class="text">Examples</span>
</h2>
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number.Transliterate</span><span class="o">.</span><span class="n">transliterate</span><span class="p" data-group-id="9261061928-1">(</span><span class="s">&quot;123556&quot;</span><span class="p" data-group-id="9261061928-1">)</span><span class="w">
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number.Transliterate</span><span class="o">.</span><span class="n">transliterate</span><span class="p" data-group-id="6835298283-1">(</span><span class="s">&quot;123556&quot;</span><span class="p" data-group-id="6835298283-1">)</span><span class="w">
</span><span class="s">&quot;123556&quot;</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number.Transliterate</span><span class="o">.</span><span class="n">transliterate</span><span class="p" data-group-id="9261061928-2">(</span><span class="s">&quot;123,556.000&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;fr&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">:default</span><span class="p" data-group-id="9261061928-2">)</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number.Transliterate</span><span class="o">.</span><span class="n">transliterate</span><span class="p" data-group-id="6835298283-2">(</span><span class="s">&quot;123,556.000&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;fr&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">:default</span><span class="p" data-group-id="6835298283-2">)</span><span class="w">
</span><span class="s">&quot;123556,000&quot;</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number.Transliterate</span><span class="o">.</span><span class="n">transliterate</span><span class="p" data-group-id="9261061928-3">(</span><span class="s">&quot;123556&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;th&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">:default</span><span class="p" data-group-id="9261061928-3">)</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number.Transliterate</span><span class="o">.</span><span class="n">transliterate</span><span class="p" data-group-id="6835298283-3">(</span><span class="s">&quot;123556&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;th&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">:default</span><span class="p" data-group-id="6835298283-3">)</span><span class="w">
</span><span class="s">&quot;123556&quot;</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number.Transliterate</span><span class="o">.</span><span class="n">transliterate</span><span class="p" data-group-id="9261061928-4">(</span><span class="s">&quot;123556&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;th&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;thai&quot;</span><span class="p" data-group-id="9261061928-4">)</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number.Transliterate</span><span class="o">.</span><span class="n">transliterate</span><span class="p" data-group-id="6835298283-4">(</span><span class="s">&quot;123556&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;th&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;thai&quot;</span><span class="p" data-group-id="6835298283-4">)</span><span class="w">
</span><span class="s">&quot;๑๒๓๕๕๖&quot;</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number.Transliterate</span><span class="o">.</span><span class="n">transliterate</span><span class="p" data-group-id="9261061928-5">(</span><span class="s">&quot;123556&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;th&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">:native</span><span class="p" data-group-id="9261061928-5">)</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number.Transliterate</span><span class="o">.</span><span class="n">transliterate</span><span class="p" data-group-id="6835298283-5">(</span><span class="s">&quot;123556&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;th&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">:native</span><span class="p" data-group-id="6835298283-5">)</span><span class="w">
</span><span class="s">&quot;๑๒๓๕๕๖&quot;</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number.Transliterate</span><span class="o">.</span><span class="n">transliterate</span><span class="p" data-group-id="9261061928-6">(</span><span class="s">&quot;Some number is: 123556&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;th&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;thai&quot;</span><span class="p" data-group-id="9261061928-6">)</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number.Transliterate</span><span class="o">.</span><span class="n">transliterate</span><span class="p" data-group-id="6835298283-6">(</span><span class="s">&quot;Some number is: 123556&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;th&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;thai&quot;</span><span class="p" data-group-id="6835298283-6">)</span><span class="w">
</span><span class="s">&quot;Some number is: ๑๒๓๕๕๖&quot;</span></code></pre>
</section>
</section>

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>
@ -441,19 +441,19 @@ using the Elixir standard library functions.</p><h2 id="parse/2-examples" class=
</a>
<span class="text">Examples</span>
</h2>
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">parse</span><span class="p" data-group-id="9156736341-1">(</span><span class="s">&quot;1.000,34&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">locale</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;de&quot;</span><span class="p" data-group-id="9156736341-1">)</span><span class="w">
</span><span class="p" data-group-id="9156736341-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="mf">1000.34</span><span class="p" data-group-id="9156736341-2">}</span><span class="w">
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">parse</span><span class="p" data-group-id="5394283579-1">(</span><span class="s">&quot;1.000,34&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">locale</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;de&quot;</span><span class="p" data-group-id="5394283579-1">)</span><span class="w">
</span><span class="p" data-group-id="5394283579-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="mf">1000.34</span><span class="p" data-group-id="5394283579-2">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">parse</span><span class="p" data-group-id="9156736341-3">(</span><span class="s">&quot;-1_000_000.34&quot;</span><span class="p" data-group-id="9156736341-3">)</span><span class="w">
</span><span class="p" data-group-id="9156736341-4">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="o">-</span><span class="mf">1000000.34</span><span class="p" data-group-id="9156736341-4">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">parse</span><span class="p" data-group-id="5394283579-3">(</span><span class="s">&quot;-1_000_000.34&quot;</span><span class="p" data-group-id="5394283579-3">)</span><span class="w">
</span><span class="p" data-group-id="5394283579-4">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="o">-</span><span class="mf">1000000.34</span><span class="p" data-group-id="5394283579-4">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">parse</span><span class="p" data-group-id="9156736341-5">(</span><span class="s">&quot;1.000&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">locale</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;de&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">number</span><span class="p">:</span><span class="w"> </span><span class="ss">:integer</span><span class="p" data-group-id="9156736341-5">)</span><span class="w">
</span><span class="p" data-group-id="9156736341-6">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="mi">1000</span><span class="p" data-group-id="9156736341-6">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">parse</span><span class="p" data-group-id="5394283579-5">(</span><span class="s">&quot;1.000&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">locale</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;de&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">number</span><span class="p">:</span><span class="w"> </span><span class="ss">:integer</span><span class="p" data-group-id="5394283579-5">)</span><span class="w">
</span><span class="p" data-group-id="5394283579-6">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="mi">1000</span><span class="p" data-group-id="5394283579-6">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">parse</span><span class="p" data-group-id="9156736341-7">(</span><span class="s">&quot;1.000,34&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">locale</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;de&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">number</span><span class="p">:</span><span class="w"> </span><span class="ss">:integer</span><span class="p" data-group-id="9156736341-7">)</span><span class="w">
</span><span class="p" data-group-id="9156736341-8">{</span><span class="ss">:error</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="9156736341-9">{</span><span class="nc">Cldr.Number.ParseError</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;The string </span><span class="se">\&quot;</span><span class="s">1.000,34</span><span class="se">\&quot;</span><span class="s"> could not be parsed as a number&quot;</span><span class="p" data-group-id="9156736341-9">}</span><span class="p" data-group-id="9156736341-8">}</span></code></pre>
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">parse</span><span class="p" data-group-id="5394283579-7">(</span><span class="s">&quot;1.000,34&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">locale</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;de&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">number</span><span class="p">:</span><span class="w"> </span><span class="ss">:integer</span><span class="p" data-group-id="5394283579-7">)</span><span class="w">
</span><span class="p" data-group-id="5394283579-8">{</span><span class="ss">:error</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="5394283579-9">{</span><span class="nc">Cldr.Number.ParseError</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;The string </span><span class="se">\&quot;</span><span class="s">1.000,34</span><span class="se">\&quot;</span><span class="s"> could not be parsed as a number&quot;</span><span class="p" data-group-id="5394283579-9">}</span><span class="p" data-group-id="5394283579-8">}</span></code></pre>
</section>
</section>
<section class="detail" id="resolve_currencies/2">
@ -525,17 +525,17 @@ financial instruments.</p></li></ul><h2 id="resolve_currencies/2-examples" class
</a>
<span class="text">Examples</span>
</h2>
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">scan</span><span class="p" data-group-id="3345474317-1">(</span><span class="s">&quot;100 US dollars&quot;</span><span class="p" data-group-id="3345474317-1">)</span><span class="w">
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">scan</span><span class="p" data-group-id="2368096480-1">(</span><span class="s">&quot;100 US dollars&quot;</span><span class="p" data-group-id="2368096480-1">)</span><span class="w">
</span><span class="gp unselectable">...&gt; </span><span class="o">|&gt;</span><span class="w"> </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">resolve_currencies</span><span class="w">
</span><span class="p" data-group-id="3345474317-2">[</span><span class="mi">100</span><span class="p">,</span><span class="w"> </span><span class="ss">:USD</span><span class="p" data-group-id="3345474317-2">]</span><span class="w">
</span><span class="p" data-group-id="2368096480-2">[</span><span class="mi">100</span><span class="p">,</span><span class="w"> </span><span class="ss">:USD</span><span class="p" data-group-id="2368096480-2">]</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">scan</span><span class="p" data-group-id="3345474317-3">(</span><span class="s">&quot;100 eurosports&quot;</span><span class="p" data-group-id="3345474317-3">)</span><span class="w">
</span><span class="gp unselectable">...&gt; </span><span class="o">|&gt;</span><span class="w"> </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">resolve_currencies</span><span class="p" data-group-id="3345474317-4">(</span><span class="ss">fuzzy</span><span class="p">:</span><span class="w"> </span><span class="mf">0.75</span><span class="p" data-group-id="3345474317-4">)</span><span class="w">
</span><span class="p" data-group-id="3345474317-5">[</span><span class="mi">100</span><span class="p">,</span><span class="w"> </span><span class="ss">:EUR</span><span class="p" data-group-id="3345474317-5">]</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">scan</span><span class="p" data-group-id="2368096480-3">(</span><span class="s">&quot;100 eurosports&quot;</span><span class="p" data-group-id="2368096480-3">)</span><span class="w">
</span><span class="gp unselectable">...&gt; </span><span class="o">|&gt;</span><span class="w"> </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">resolve_currencies</span><span class="p" data-group-id="2368096480-4">(</span><span class="ss">fuzzy</span><span class="p">:</span><span class="w"> </span><span class="mf">0.75</span><span class="p" data-group-id="2368096480-4">)</span><span class="w">
</span><span class="p" data-group-id="2368096480-5">[</span><span class="mi">100</span><span class="p">,</span><span class="w"> </span><span class="ss">:EUR</span><span class="p" data-group-id="2368096480-5">]</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">scan</span><span class="p" data-group-id="3345474317-6">(</span><span class="s">&quot;100 dollars des États-Unis&quot;</span><span class="p" data-group-id="3345474317-6">)</span><span class="w">
</span><span class="gp unselectable">...&gt; </span><span class="o">|&gt;</span><span class="w"> </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">resolve_currencies</span><span class="p" data-group-id="3345474317-7">(</span><span class="ss">locale</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;fr&quot;</span><span class="p" data-group-id="3345474317-7">)</span><span class="w">
</span><span class="p" data-group-id="3345474317-8">[</span><span class="mi">100</span><span class="p">,</span><span class="w"> </span><span class="ss">:USD</span><span class="p" data-group-id="3345474317-8">]</span></code></pre>
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">scan</span><span class="p" data-group-id="2368096480-6">(</span><span class="s">&quot;100 dollars des États-Unis&quot;</span><span class="p" data-group-id="2368096480-6">)</span><span class="w">
</span><span class="gp unselectable">...&gt; </span><span class="o">|&gt;</span><span class="w"> </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">resolve_currencies</span><span class="p" data-group-id="2368096480-7">(</span><span class="ss">locale</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;fr&quot;</span><span class="p" data-group-id="2368096480-7">)</span><span class="w">
</span><span class="p" data-group-id="2368096480-8">[</span><span class="mi">100</span><span class="p">,</span><span class="w"> </span><span class="ss">:USD</span><span class="p" data-group-id="2368096480-8">]</span></code></pre>
</section>
</section>
<section class="detail" id="resolve_currency/2">
@ -612,19 +612,19 @@ financial instruments.</p></li></ul><h2 id="resolve_currency/2-examples" class="
</a>
<span class="text">Examples</span>
</h2>
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">resolve_currency</span><span class="p" data-group-id="5938373942-1">(</span><span class="s">&quot;US dollars&quot;</span><span class="p" data-group-id="5938373942-1">)</span><span class="w">
</span><span class="p" data-group-id="5938373942-2">[</span><span class="ss">:USD</span><span class="p" data-group-id="5938373942-2">]</span><span class="w">
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">resolve_currency</span><span class="p" data-group-id="4357886679-1">(</span><span class="s">&quot;US dollars&quot;</span><span class="p" data-group-id="4357886679-1">)</span><span class="w">
</span><span class="p" data-group-id="4357886679-2">[</span><span class="ss">:USD</span><span class="p" data-group-id="4357886679-2">]</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">resolve_currency</span><span class="p" data-group-id="5938373942-3">(</span><span class="s">&quot;100 eurosports&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">fuzzy</span><span class="p">:</span><span class="w"> </span><span class="mf">0.75</span><span class="p" data-group-id="5938373942-3">)</span><span class="w">
</span><span class="p" data-group-id="5938373942-4">[</span><span class="ss">:EUR</span><span class="p" data-group-id="5938373942-4">]</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">resolve_currency</span><span class="p" data-group-id="4357886679-3">(</span><span class="s">&quot;100 eurosports&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">fuzzy</span><span class="p">:</span><span class="w"> </span><span class="mf">0.75</span><span class="p" data-group-id="4357886679-3">)</span><span class="w">
</span><span class="p" data-group-id="4357886679-4">[</span><span class="ss">:EUR</span><span class="p" data-group-id="4357886679-4">]</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">resolve_currency</span><span class="p" data-group-id="5938373942-5">(</span><span class="s">&quot;dollars des États-Unis&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">locale</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;fr&quot;</span><span class="p" data-group-id="5938373942-5">)</span><span class="w">
</span><span class="p" data-group-id="5938373942-6">[</span><span class="ss">:USD</span><span class="p" data-group-id="5938373942-6">]</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">resolve_currency</span><span class="p" data-group-id="4357886679-5">(</span><span class="s">&quot;dollars des États-Unis&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">locale</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;fr&quot;</span><span class="p" data-group-id="4357886679-5">)</span><span class="w">
</span><span class="p" data-group-id="4357886679-6">[</span><span class="ss">:USD</span><span class="p" data-group-id="4357886679-6">]</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">resolve_currency</span><span class="p" data-group-id="5938373942-7">(</span><span class="s">&quot;not a known currency&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">locale</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;fr&quot;</span><span class="p" data-group-id="5938373942-7">)</span><span class="w">
</span><span class="p" data-group-id="5938373942-8">{</span><span class="ss">:error</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="5938373942-9">{</span><span class="nc">Cldr.UnknownCurrencyError</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;The currency </span><span class="se">\&quot;</span><span class="s">not a known currency</span><span class="se">\&quot;</span><span class="s"> is unknown or not supported&quot;</span><span class="p" data-group-id="5938373942-9">}</span><span class="p" data-group-id="5938373942-8">}</span></code></pre>
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">resolve_currency</span><span class="p" data-group-id="4357886679-7">(</span><span class="s">&quot;not a known currency&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">locale</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;fr&quot;</span><span class="p" data-group-id="4357886679-7">)</span><span class="w">
</span><span class="p" data-group-id="4357886679-8">{</span><span class="ss">:error</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="4357886679-9">{</span><span class="nc">Cldr.UnknownCurrencyError</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;The currency </span><span class="se">\&quot;</span><span class="s">not a known currency</span><span class="se">\&quot;</span><span class="s"> is unknown or not supported&quot;</span><span class="p" data-group-id="4357886679-9">}</span><span class="p" data-group-id="4357886679-8">}</span></code></pre>
</section>
</section>
<section class="detail" id="resolve_per/2">
@ -688,13 +688,13 @@ The default is <code class="inline">options[:backend].get_locale()</code></li></
<span class="text">Examples</span>
</h2>
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">resolve_per</span><span class="w"> </span><span class="s">&quot;11%&quot;</span><span class="w">
</span><span class="p" data-group-id="0304717583-1">[</span><span class="s">&quot;11&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">:percent</span><span class="p" data-group-id="0304717583-1">]</span><span class="w">
</span><span class="p" data-group-id="1663756149-1">[</span><span class="s">&quot;11&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">:percent</span><span class="p" data-group-id="1663756149-1">]</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">resolve_per</span><span class="w"> </span><span class="s">&quot;% of linguists&quot;</span><span class="w">
</span><span class="p" data-group-id="0304717583-2">[</span><span class="ss">:percent</span><span class="p">,</span><span class="w"> </span><span class="s">&quot; of linguists&quot;</span><span class="p" data-group-id="0304717583-2">]</span><span class="w">
</span><span class="p" data-group-id="1663756149-2">[</span><span class="ss">:percent</span><span class="p">,</span><span class="w"> </span><span class="s">&quot; of linguists&quot;</span><span class="p" data-group-id="1663756149-2">]</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">resolve_per</span><span class="w"> </span><span class="s">&quot;% of linguists %&quot;</span><span class="w">
</span><span class="p" data-group-id="0304717583-3">[</span><span class="ss">:percent</span><span class="p">,</span><span class="w"> </span><span class="s">&quot; of linguists &quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">:percent</span><span class="p" data-group-id="0304717583-3">]</span></code></pre>
</span><span class="p" data-group-id="1663756149-3">[</span><span class="ss">:percent</span><span class="p">,</span><span class="w"> </span><span class="s">&quot; of linguists &quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">:percent</span><span class="p" data-group-id="1663756149-3">]</span></code></pre>
</section>
</section>
<section class="detail" id="resolve_pers/2">
@ -751,9 +751,9 @@ The default is <code class="inline">options[:backend].get_locale()</code></li></
</a>
<span class="text">Examples</span>
</h2>
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">scan</span><span class="p" data-group-id="6469633295-1">(</span><span class="s">&quot;100%&quot;</span><span class="p" data-group-id="6469633295-1">)</span><span class="w">
</span><span class="gp unselectable">...&gt; </span><span class="o">|&gt;</span><span class="w"> </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">resolve_pers</span><span class="p" data-group-id="6469633295-2">(</span><span class="p" data-group-id="6469633295-2">)</span><span class="w">
</span><span class="p" data-group-id="6469633295-3">[</span><span class="mi">100</span><span class="p">,</span><span class="w"> </span><span class="ss">:percent</span><span class="p" data-group-id="6469633295-3">]</span></code></pre>
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">scan</span><span class="p" data-group-id="9955767002-1">(</span><span class="s">&quot;100%&quot;</span><span class="p" data-group-id="9955767002-1">)</span><span class="w">
</span><span class="gp unselectable">...&gt; </span><span class="o">|&gt;</span><span class="w"> </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">resolve_pers</span><span class="p" data-group-id="9955767002-2">(</span><span class="p" data-group-id="9955767002-2">)</span><span class="w">
</span><span class="p" data-group-id="9955767002-3">[</span><span class="mi">100</span><span class="p">,</span><span class="w"> </span><span class="ss">:percent</span><span class="p" data-group-id="9955767002-3">]</span></code></pre>
</section>
</section>
<section class="detail" id="scan/2">
@ -813,20 +813,20 @@ and any options provided are passed to that function.</p><h2 id="scan/2-examples
</a>
<span class="text">Examples</span>
</h2>
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">scan</span><span class="p" data-group-id="9281460906-1">(</span><span class="s">&quot;£1_000_000.34&quot;</span><span class="p" data-group-id="9281460906-1">)</span><span class="w">
</span><span class="p" data-group-id="9281460906-2">[</span><span class="s">&quot;£&quot;</span><span class="p">,</span><span class="w"> </span><span class="mf">1000000.34</span><span class="p" data-group-id="9281460906-2">]</span><span class="w">
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">scan</span><span class="p" data-group-id="0285534140-1">(</span><span class="s">&quot;£1_000_000.34&quot;</span><span class="p" data-group-id="0285534140-1">)</span><span class="w">
</span><span class="p" data-group-id="0285534140-2">[</span><span class="s">&quot;£&quot;</span><span class="p">,</span><span class="w"> </span><span class="mf">1000000.34</span><span class="p" data-group-id="0285534140-2">]</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">scan</span><span class="p" data-group-id="9281460906-3">(</span><span class="s">&quot;I want £1_000_000 dollars&quot;</span><span class="p" data-group-id="9281460906-3">)</span><span class="w">
</span><span class="p" data-group-id="9281460906-4">[</span><span class="s">&quot;I want £&quot;</span><span class="p">,</span><span class="w"> </span><span class="mi">1000000</span><span class="p">,</span><span class="w"> </span><span class="s">&quot; dollars&quot;</span><span class="p" data-group-id="9281460906-4">]</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">scan</span><span class="p" data-group-id="0285534140-3">(</span><span class="s">&quot;I want £1_000_000 dollars&quot;</span><span class="p" data-group-id="0285534140-3">)</span><span class="w">
</span><span class="p" data-group-id="0285534140-4">[</span><span class="s">&quot;I want £&quot;</span><span class="p">,</span><span class="w"> </span><span class="mi">1000000</span><span class="p">,</span><span class="w"> </span><span class="s">&quot; dollars&quot;</span><span class="p" data-group-id="0285534140-4">]</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">scan</span><span class="p" data-group-id="9281460906-5">(</span><span class="s">&quot;The prize is 23&quot;</span><span class="p" data-group-id="9281460906-5">)</span><span class="w">
</span><span class="p" data-group-id="9281460906-6">[</span><span class="s">&quot;The prize is &quot;</span><span class="p">,</span><span class="w"> </span><span class="mi">23</span><span class="p" data-group-id="9281460906-6">]</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">scan</span><span class="p" data-group-id="0285534140-5">(</span><span class="s">&quot;The prize is 23&quot;</span><span class="p" data-group-id="0285534140-5">)</span><span class="w">
</span><span class="p" data-group-id="0285534140-6">[</span><span class="s">&quot;The prize is &quot;</span><span class="p">,</span><span class="w"> </span><span class="mi">23</span><span class="p" data-group-id="0285534140-6">]</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">scan</span><span class="p" data-group-id="9281460906-7">(</span><span class="s">&quot;The lottery number is 23 for the next draw&quot;</span><span class="p" data-group-id="9281460906-7">)</span><span class="w">
</span><span class="p" data-group-id="9281460906-8">[</span><span class="s">&quot;The lottery number is &quot;</span><span class="p">,</span><span class="w"> </span><span class="mi">23</span><span class="p">,</span><span class="w"> </span><span class="s">&quot; for the next draw&quot;</span><span class="p" data-group-id="9281460906-8">]</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">scan</span><span class="p" data-group-id="0285534140-7">(</span><span class="s">&quot;The lottery number is 23 for the next draw&quot;</span><span class="p" data-group-id="0285534140-7">)</span><span class="w">
</span><span class="p" data-group-id="0285534140-8">[</span><span class="s">&quot;The lottery number is &quot;</span><span class="p">,</span><span class="w"> </span><span class="mi">23</span><span class="p">,</span><span class="w"> </span><span class="s">&quot; for the next draw&quot;</span><span class="p" data-group-id="0285534140-8">]</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">scan</span><span class="p" data-group-id="9281460906-9">(</span><span class="s">&quot;The loss is -1.000 euros&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">locale</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;de&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">number</span><span class="p">:</span><span class="w"> </span><span class="ss">:integer</span><span class="p" data-group-id="9281460906-9">)</span><span class="w">
</span><span class="p" data-group-id="9281460906-10">[</span><span class="s">&quot;The loss is &quot;</span><span class="p">,</span><span class="w"> </span><span class="o">-</span><span class="mi">1000</span><span class="p">,</span><span class="w"> </span><span class="s">&quot; euros&quot;</span><span class="p" data-group-id="9281460906-10">]</span></code></pre>
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">scan</span><span class="p" data-group-id="0285534140-9">(</span><span class="s">&quot;The loss is -1.000 euros&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">locale</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;de&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">number</span><span class="p">:</span><span class="w"> </span><span class="ss">:integer</span><span class="p" data-group-id="0285534140-9">)</span><span class="w">
</span><span class="p" data-group-id="0285534140-10">[</span><span class="s">&quot;The loss is &quot;</span><span class="p">,</span><span class="w"> </span><span class="o">-</span><span class="mi">1000</span><span class="p">,</span><span class="w"> </span><span class="s">&quot; euros&quot;</span><span class="p" data-group-id="0285534140-10">]</span></code></pre>
</section>
</section>
<section class="detail" id="to_approx_string/2">
@ -873,7 +873,7 @@ options.</p></li></ul><h2 id="to_approx_string/2-example" class="section-heading
<span class="text">Example</span>
</h2>
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">to_approx_string</span><span class="w"> </span><span class="mi">1234</span><span class="w">
</span><span class="p" data-group-id="8361036006-1">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;~1,234&quot;</span><span class="p" data-group-id="8361036006-1">}</span></code></pre>
</span><span class="p" data-group-id="0960551870-1">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;~1,234&quot;</span><span class="p" data-group-id="0960551870-1">}</span></code></pre>
</section>
</section>
<section class="detail" id="to_at_least_string/2">
@ -920,7 +920,7 @@ options.</p></li></ul><h2 id="to_at_least_string/2-example" class="section-headi
<span class="text">Example</span>
</h2>
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">to_at_least_string</span><span class="w"> </span><span class="mi">1234</span><span class="w">
</span><span class="p" data-group-id="7138276655-1">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;1,234+&quot;</span><span class="p" data-group-id="7138276655-1">}</span></code></pre>
</span><span class="p" data-group-id="8660836205-1">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;1,234+&quot;</span><span class="p" data-group-id="8660836205-1">}</span></code></pre>
</section>
</section>
<section class="detail" id="to_at_most_string/2">
@ -967,7 +967,7 @@ options.</p></li></ul><h2 id="to_at_most_string/2-example" class="section-headin
<span class="text">Example</span>
</h2>
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">to_at_most_string</span><span class="w"> </span><span class="mi">1234</span><span class="w">
</span><span class="p" data-group-id="8769370049-1">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;≤1,234&quot;</span><span class="p" data-group-id="8769370049-1">}</span></code></pre>
</span><span class="p" data-group-id="3428803171-1">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;≤1,234&quot;</span><span class="p" data-group-id="3428803171-1">}</span></code></pre>
</section>
</section>
<section class="detail" id="to_range_string/2">
@ -1014,7 +1014,7 @@ options.</p></li></ul><h2 id="to_range_string/2-example" class="section-heading"
<span class="text">Example</span>
</h2>
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">to_range_string</span><span class="w"> </span><span class="mi">1234</span><span class="o">..</span><span class="mi">5678</span><span class="w">
</span><span class="p" data-group-id="3557507581-1">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;1,2345,678&quot;</span><span class="p" data-group-id="3557507581-1">}</span></code></pre>
</span><span class="p" data-group-id="0652372022-1">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;1,2345,678&quot;</span><span class="p" data-group-id="0652372022-1">}</span></code></pre>
</section>
</section>
<section class="detail" id="to_string/2">
@ -1133,21 +1133,21 @@ extensions.</p><h2 id="to_string/2-wrapping-format-elements" class="section-head
</h2>
<p>Wrapping elements is particularly useful when formatting a number with a
currency symbol and the requirement is to have different HTML formatting
applied to the symbol than the number. For example:</p><pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Cldr.Number</span><span class="o">.</span><span class="n">to_string</span><span class="p" data-group-id="6408376453-1">(</span><span class="mi">100</span><span class="p">,</span><span class="w"> </span><span class="ss">format</span><span class="p">:</span><span class="w"> </span><span class="ss">:currency</span><span class="p">,</span><span class="w"> </span><span class="ss">currency</span><span class="p">:</span><span class="w"> </span><span class="ss">:USD</span><span class="p">,</span><span class="w"> </span><span class="ss">wrapper</span><span class="p">:</span><span class="w"> </span><span class="k" data-group-id="6408376453-2">fn</span><span class="w">
applied to the symbol than the number. For example:</p><pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Cldr.Number</span><span class="o">.</span><span class="n">to_string</span><span class="p" data-group-id="6833248793-1">(</span><span class="mi">100</span><span class="p">,</span><span class="w"> </span><span class="ss">format</span><span class="p">:</span><span class="w"> </span><span class="ss">:currency</span><span class="p">,</span><span class="w"> </span><span class="ss">currency</span><span class="p">:</span><span class="w"> </span><span class="ss">:USD</span><span class="p">,</span><span class="w"> </span><span class="ss">wrapper</span><span class="p">:</span><span class="w"> </span><span class="k" data-group-id="6833248793-2">fn</span><span class="w">
</span><span class="gp unselectable">...&gt; </span><span class="w"> </span><span class="n">string</span><span class="p">,</span><span class="w"> </span><span class="ss">:currency_symbol</span><span class="w"> </span><span class="o">-&gt;</span><span class="w"> </span><span class="s">&quot;&lt;span class=</span><span class="se">\&quot;</span><span class="s">symbol</span><span class="se">\&quot;</span><span class="s">&gt;&quot;</span><span class="w"> </span><span class="o">&lt;&gt;</span><span class="w"> </span><span class="n">string</span><span class="w"> </span><span class="o">&lt;&gt;</span><span class="w"> </span><span class="s">&quot;&lt;/span&gt;&quot;</span><span class="w">
</span><span class="gp unselectable">...&gt; </span><span class="w"> </span><span class="n">string</span><span class="p">,</span><span class="w"> </span><span class="ss">:number</span><span class="w"> </span><span class="o">-&gt;</span><span class="w"> </span><span class="s">&quot;&lt;span class=</span><span class="se">\&quot;</span><span class="s">number</span><span class="se">\&quot;</span><span class="s">&gt;&quot;</span><span class="w"> </span><span class="o">&lt;&gt;</span><span class="w"> </span><span class="n">string</span><span class="w"> </span><span class="o">&lt;&gt;</span><span class="w"> </span><span class="s">&quot;&lt;/span&gt;&quot;</span><span class="w">
</span><span class="gp unselectable">...&gt; </span><span class="w"> </span><span class="n">string</span><span class="p">,</span><span class="w"> </span><span class="ss">:currency_space</span><span class="w"> </span><span class="o">-&gt;</span><span class="w"> </span><span class="s">&quot;&lt;span&gt;&quot;</span><span class="w"> </span><span class="o">&lt;&gt;</span><span class="w"> </span><span class="n">string</span><span class="w"> </span><span class="o">&lt;&gt;</span><span class="w"> </span><span class="s">&quot;&lt;/span&gt;&quot;</span><span class="w">
</span><span class="gp unselectable">...&gt; </span><span class="w"> </span><span class="n">string</span><span class="p">,</span><span class="w"> </span><span class="c">_other</span><span class="w"> </span><span class="o">-&gt;</span><span class="w"> </span><span class="n">string</span><span class="w">
</span><span class="gp unselectable">...&gt; </span><span class="k" data-group-id="6408376453-2">end</span><span class="p" data-group-id="6408376453-1">)</span><span class="w">
</span><span class="p" data-group-id="6408376453-3">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;&lt;span class=</span><span class="se">\&quot;</span><span class="s">symbol</span><span class="se">\&quot;</span><span class="s">&gt;$&lt;/span&gt;&lt;span class=</span><span class="se">\&quot;</span><span class="s">number</span><span class="se">\&quot;</span><span class="s">&gt;100.00&lt;/span&gt;&quot;</span><span class="p" data-group-id="6408376453-3">}</span></code></pre><p>It is also possible and recommended to use the <a href="https://hexdocs.pm/phoenix_html/3.3.3/Phoenix.HTML.Tag.html#content_tag/3"><code class="inline">Phoenix.HTML.Tag.content_tag/3</code></a>
</span><span class="gp unselectable">...&gt; </span><span class="k" data-group-id="6833248793-2">end</span><span class="p" data-group-id="6833248793-1">)</span><span class="w">
</span><span class="p" data-group-id="6833248793-3">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;&lt;span class=</span><span class="se">\&quot;</span><span class="s">symbol</span><span class="se">\&quot;</span><span class="s">&gt;$&lt;/span&gt;&lt;span class=</span><span class="se">\&quot;</span><span class="s">number</span><span class="se">\&quot;</span><span class="s">&gt;100.00&lt;/span&gt;&quot;</span><span class="p" data-group-id="6833248793-3">}</span></code></pre><p>It is also possible and recommended to use the <a href="https://hexdocs.pm/phoenix_html/3.3.3/Phoenix.HTML.Tag.html#content_tag/3"><code class="inline">Phoenix.HTML.Tag.content_tag/3</code></a>
function if wrapping HTML tags since these will ensure HTML entities are
correctly encoded. For example:</p><pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Cldr.Number</span><span class="o">.</span><span class="n">to_string</span><span class="p" data-group-id="6721155079-1">(</span><span class="mi">100</span><span class="p">,</span><span class="w"> </span><span class="ss">format</span><span class="p">:</span><span class="w"> </span><span class="ss">:currency</span><span class="p">,</span><span class="w"> </span><span class="ss">currency</span><span class="p">:</span><span class="w"> </span><span class="ss">:USD</span><span class="p">,</span><span class="w"> </span><span class="ss">wrapper</span><span class="p">:</span><span class="w"> </span><span class="k" data-group-id="6721155079-2">fn</span><span class="w">
</span><span class="gp unselectable">...&gt; </span><span class="w"> </span><span class="n">string</span><span class="p">,</span><span class="w"> </span><span class="ss">:currency_symbol</span><span class="w"> </span><span class="o">-&gt;</span><span class="w"> </span><span class="nc">Phoenix.HTML.Tag</span><span class="o">.</span><span class="n">content_tag</span><span class="p" data-group-id="6721155079-3">(</span><span class="ss">:span</span><span class="p">,</span><span class="w"> </span><span class="n">string</span><span class="p">,</span><span class="w"> </span><span class="ss">class</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;symbol&quot;</span><span class="p" data-group-id="6721155079-3">)</span><span class="w">
</span><span class="gp unselectable">...&gt; </span><span class="w"> </span><span class="n">string</span><span class="p">,</span><span class="w"> </span><span class="ss">:number</span><span class="w"> </span><span class="o">-&gt;</span><span class="w"> </span><span class="nc">Phoenix.HTML.Tag</span><span class="o">.</span><span class="n">content_tag</span><span class="p" data-group-id="6721155079-4">(</span><span class="ss">:span</span><span class="p">,</span><span class="w"> </span><span class="n">string</span><span class="p">,</span><span class="w"> </span><span class="ss">class</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;number&quot;</span><span class="p" data-group-id="6721155079-4">)</span><span class="w">
</span><span class="gp unselectable">...&gt; </span><span class="w"> </span><span class="n">string</span><span class="p">,</span><span class="w"> </span><span class="ss">:currency_space</span><span class="w"> </span><span class="o">-&gt;</span><span class="w"> </span><span class="nc">Phoenix.HTML.Tag</span><span class="o">.</span><span class="n">content_tag</span><span class="p" data-group-id="6721155079-5">(</span><span class="ss">:span</span><span class="p">,</span><span class="w"> </span><span class="n">string</span><span class="p" data-group-id="6721155079-5">)</span><span class="w">
correctly encoded. For example:</p><pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Cldr.Number</span><span class="o">.</span><span class="n">to_string</span><span class="p" data-group-id="0714416037-1">(</span><span class="mi">100</span><span class="p">,</span><span class="w"> </span><span class="ss">format</span><span class="p">:</span><span class="w"> </span><span class="ss">:currency</span><span class="p">,</span><span class="w"> </span><span class="ss">currency</span><span class="p">:</span><span class="w"> </span><span class="ss">:USD</span><span class="p">,</span><span class="w"> </span><span class="ss">wrapper</span><span class="p">:</span><span class="w"> </span><span class="k" data-group-id="0714416037-2">fn</span><span class="w">
</span><span class="gp unselectable">...&gt; </span><span class="w"> </span><span class="n">string</span><span class="p">,</span><span class="w"> </span><span class="ss">:currency_symbol</span><span class="w"> </span><span class="o">-&gt;</span><span class="w"> </span><span class="nc">Phoenix.HTML.Tag</span><span class="o">.</span><span class="n">content_tag</span><span class="p" data-group-id="0714416037-3">(</span><span class="ss">:span</span><span class="p">,</span><span class="w"> </span><span class="n">string</span><span class="p">,</span><span class="w"> </span><span class="ss">class</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;symbol&quot;</span><span class="p" data-group-id="0714416037-3">)</span><span class="w">
</span><span class="gp unselectable">...&gt; </span><span class="w"> </span><span class="n">string</span><span class="p">,</span><span class="w"> </span><span class="ss">:number</span><span class="w"> </span><span class="o">-&gt;</span><span class="w"> </span><span class="nc">Phoenix.HTML.Tag</span><span class="o">.</span><span class="n">content_tag</span><span class="p" data-group-id="0714416037-4">(</span><span class="ss">:span</span><span class="p">,</span><span class="w"> </span><span class="n">string</span><span class="p">,</span><span class="w"> </span><span class="ss">class</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;number&quot;</span><span class="p" data-group-id="0714416037-4">)</span><span class="w">
</span><span class="gp unselectable">...&gt; </span><span class="w"> </span><span class="n">string</span><span class="p">,</span><span class="w"> </span><span class="ss">:currency_space</span><span class="w"> </span><span class="o">-&gt;</span><span class="w"> </span><span class="nc">Phoenix.HTML.Tag</span><span class="o">.</span><span class="n">content_tag</span><span class="p" data-group-id="0714416037-5">(</span><span class="ss">:span</span><span class="p">,</span><span class="w"> </span><span class="n">string</span><span class="p" data-group-id="0714416037-5">)</span><span class="w">
</span><span class="gp unselectable">...&gt; </span><span class="w"> </span><span class="n">string</span><span class="p">,</span><span class="w"> </span><span class="c">_other</span><span class="w"> </span><span class="o">-&gt;</span><span class="w"> </span><span class="n">string</span><span class="w">
</span><span class="gp unselectable">...&gt; </span><span class="k" data-group-id="6721155079-2">end</span><span class="p" data-group-id="6721155079-1">)</span><span class="w">
</span><span class="p" data-group-id="6721155079-6">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;&lt;span class=</span><span class="se">\&quot;</span><span class="s">symbol</span><span class="se">\&quot;</span><span class="s">&gt;$&lt;/span&gt;&lt;span class=</span><span class="se">\&quot;</span><span class="s">number</span><span class="se">\&quot;</span><span class="s">&gt;100.00&lt;/span&gt;&quot;</span><span class="p" data-group-id="6721155079-6">}</span></code></pre><p>When formatting a number the format is parsed into format elements that might include
</span><span class="gp unselectable">...&gt; </span><span class="k" data-group-id="0714416037-2">end</span><span class="p" data-group-id="0714416037-1">)</span><span class="w">
</span><span class="p" data-group-id="0714416037-6">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;&lt;span class=</span><span class="se">\&quot;</span><span class="s">symbol</span><span class="se">\&quot;</span><span class="s">&gt;$&lt;/span&gt;&lt;span class=</span><span class="se">\&quot;</span><span class="s">number</span><span class="se">\&quot;</span><span class="s">&gt;100.00&lt;/span&gt;&quot;</span><span class="p" data-group-id="0714416037-6">}</span></code></pre><p>When formatting a number the format is parsed into format elements that might include
a currency symbol, a literal string, inserted text between a currency symbol and the
currency amount, a percent sign, the number itself and several other elements. In
some cases it is helpful to be apply specific formatting to each element.
@ -1168,80 +1168,80 @@ inserted in the final formatted number.</p><h2 id="to_string/2-returns" class="s
<span class="text">Examples</span>
</h2>
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">to_string</span><span class="w"> </span><span class="mi">12345</span><span class="w">
</span><span class="p" data-group-id="8942247217-1">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;12,345&quot;</span><span class="p" data-group-id="8942247217-1">}</span><span class="w">
</span><span class="p" data-group-id="3056491303-1">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;12,345&quot;</span><span class="p" data-group-id="3056491303-1">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">to_string</span><span class="w"> </span><span class="mi">12345</span><span class="p">,</span><span class="w"> </span><span class="ss">locale</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;fr&quot;</span><span class="w">
</span><span class="p" data-group-id="8942247217-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;12345&quot;</span><span class="p" data-group-id="8942247217-2">}</span><span class="w">
</span><span class="p" data-group-id="3056491303-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;12345&quot;</span><span class="p" data-group-id="3056491303-2">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">to_string</span><span class="w"> </span><span class="mf">1345.32</span><span class="p">,</span><span class="w"> </span><span class="ss">currency</span><span class="p">:</span><span class="w"> </span><span class="ss">:EUR</span><span class="p">,</span><span class="w"> </span><span class="ss">locale</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;es&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">minimum_grouping_digits</span><span class="p">:</span><span class="w"> </span><span class="mi">1</span><span class="w">
</span><span class="p" data-group-id="8942247217-3">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;1.345,32 &quot;</span><span class="p" data-group-id="8942247217-3">}</span><span class="w">
</span><span class="p" data-group-id="3056491303-3">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;1.345,32 &quot;</span><span class="p" data-group-id="3056491303-3">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">to_string</span><span class="w"> </span><span class="mf">1345.32</span><span class="p">,</span><span class="w"> </span><span class="ss">currency</span><span class="p">:</span><span class="w"> </span><span class="ss">:EUR</span><span class="p">,</span><span class="w"> </span><span class="ss">locale</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;es&quot;</span><span class="w">
</span><span class="p" data-group-id="8942247217-4">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;1345,32 &quot;</span><span class="p" data-group-id="8942247217-4">}</span><span class="w">
</span><span class="p" data-group-id="3056491303-4">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;1345,32 &quot;</span><span class="p" data-group-id="3056491303-4">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">to_string</span><span class="w"> </span><span class="mi">12345</span><span class="p">,</span><span class="w"> </span><span class="ss">locale</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;fr&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">currency</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;USD&quot;</span><span class="w">
</span><span class="p" data-group-id="8942247217-5">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;12345,00 $US&quot;</span><span class="p" data-group-id="8942247217-5">}</span><span class="w">
</span><span class="p" data-group-id="3056491303-5">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;12345,00 $US&quot;</span><span class="p" data-group-id="3056491303-5">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">to_string</span><span class="w"> </span><span class="mi">12345</span><span class="p">,</span><span class="w"> </span><span class="ss">format</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;#E0&quot;</span><span class="w">
</span><span class="p" data-group-id="8942247217-6">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;1.2345E4&quot;</span><span class="p" data-group-id="8942247217-6">}</span><span class="w">
</span><span class="p" data-group-id="3056491303-6">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;1.2345E4&quot;</span><span class="p" data-group-id="3056491303-6">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">to_string</span><span class="w"> </span><span class="mi">12345</span><span class="p">,</span><span class="w"> </span><span class="ss">format</span><span class="p">:</span><span class="w"> </span><span class="ss">:accounting</span><span class="p">,</span><span class="w"> </span><span class="ss">currency</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;THB&quot;</span><span class="w">
</span><span class="p" data-group-id="8942247217-7">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;THB 12,345.00&quot;</span><span class="p" data-group-id="8942247217-7">}</span><span class="w">
</span><span class="p" data-group-id="3056491303-7">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;THB 12,345.00&quot;</span><span class="p" data-group-id="3056491303-7">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">to_string</span><span class="w"> </span><span class="o">-</span><span class="mi">12345</span><span class="p">,</span><span class="w"> </span><span class="ss">format</span><span class="p">:</span><span class="w"> </span><span class="ss">:accounting</span><span class="p">,</span><span class="w"> </span><span class="ss">currency</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;THB&quot;</span><span class="w">
</span><span class="p" data-group-id="8942247217-8">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;(THB 12,345.00)&quot;</span><span class="p" data-group-id="8942247217-8">}</span><span class="w">
</span><span class="p" data-group-id="3056491303-8">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;(THB 12,345.00)&quot;</span><span class="p" data-group-id="3056491303-8">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">to_string</span><span class="w"> </span><span class="mi">12345</span><span class="p">,</span><span class="w"> </span><span class="ss">format</span><span class="p">:</span><span class="w"> </span><span class="ss">:accounting</span><span class="p">,</span><span class="w"> </span><span class="ss">currency</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;THB&quot;</span><span class="p">,</span><span class="w">
</span><span class="gp unselectable">...&gt; </span><span class="ss">locale</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;th&quot;</span><span class="w">
</span><span class="p" data-group-id="8942247217-9">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;฿12,345.00&quot;</span><span class="p" data-group-id="8942247217-9">}</span><span class="w">
</span><span class="p" data-group-id="3056491303-9">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;฿12,345.00&quot;</span><span class="p" data-group-id="3056491303-9">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">to_string</span><span class="w"> </span><span class="mi">12345</span><span class="p">,</span><span class="w"> </span><span class="ss">format</span><span class="p">:</span><span class="w"> </span><span class="ss">:accounting</span><span class="p">,</span><span class="w"> </span><span class="ss">currency</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;THB&quot;</span><span class="p">,</span><span class="w">
</span><span class="gp unselectable">...&gt; </span><span class="ss">locale</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;th&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">number_system</span><span class="p">:</span><span class="w"> </span><span class="ss">:native</span><span class="w">
</span><span class="p" data-group-id="8942247217-10">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;฿๑๒,๓๔๕.&quot;</span><span class="p" data-group-id="8942247217-10">}</span><span class="w">
</span><span class="p" data-group-id="3056491303-10">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;฿๑๒,๓๔๕.&quot;</span><span class="p" data-group-id="3056491303-10">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">to_string</span><span class="w"> </span><span class="mf">1244.30</span><span class="p">,</span><span class="w"> </span><span class="ss">format</span><span class="p">:</span><span class="w"> </span><span class="ss">:long</span><span class="w">
</span><span class="p" data-group-id="8942247217-11">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;1 thousand&quot;</span><span class="p" data-group-id="8942247217-11">}</span><span class="w">
</span><span class="p" data-group-id="3056491303-11">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;1 thousand&quot;</span><span class="p" data-group-id="3056491303-11">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">to_string</span><span class="w"> </span><span class="mf">1244.30</span><span class="p">,</span><span class="w"> </span><span class="ss">format</span><span class="p">:</span><span class="w"> </span><span class="ss">:long</span><span class="p">,</span><span class="w"> </span><span class="ss">currency</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;USD&quot;</span><span class="w">
</span><span class="p" data-group-id="8942247217-12">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;1,244 US dollars&quot;</span><span class="p" data-group-id="8942247217-12">}</span><span class="w">
</span><span class="p" data-group-id="3056491303-12">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;1,244 US dollars&quot;</span><span class="p" data-group-id="3056491303-12">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">to_string</span><span class="w"> </span><span class="mf">1244.30</span><span class="p">,</span><span class="w"> </span><span class="ss">format</span><span class="p">:</span><span class="w"> </span><span class="ss">:short</span><span class="w">
</span><span class="p" data-group-id="8942247217-13">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;1K&quot;</span><span class="p" data-group-id="8942247217-13">}</span><span class="w">
</span><span class="p" data-group-id="3056491303-13">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;1K&quot;</span><span class="p" data-group-id="3056491303-13">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">to_string</span><span class="w"> </span><span class="mf">1244.30</span><span class="p">,</span><span class="w"> </span><span class="ss">format</span><span class="p">:</span><span class="w"> </span><span class="ss">:short</span><span class="p">,</span><span class="w"> </span><span class="ss">currency</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;EUR&quot;</span><span class="w">
</span><span class="p" data-group-id="8942247217-14">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;€1K&quot;</span><span class="p" data-group-id="8942247217-14">}</span><span class="w">
</span><span class="p" data-group-id="3056491303-14">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;€1K&quot;</span><span class="p" data-group-id="3056491303-14">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">to_string</span><span class="w"> </span><span class="mi">1234</span><span class="p">,</span><span class="w"> </span><span class="ss">format</span><span class="p">:</span><span class="w"> </span><span class="ss">:spellout</span><span class="w">
</span><span class="p" data-group-id="8942247217-15">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;one thousand two hundred thirty-four&quot;</span><span class="p" data-group-id="8942247217-15">}</span><span class="w">
</span><span class="p" data-group-id="3056491303-15">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;one thousand two hundred thirty-four&quot;</span><span class="p" data-group-id="3056491303-15">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">to_string</span><span class="w"> </span><span class="mi">1234</span><span class="p">,</span><span class="w"> </span><span class="ss">format</span><span class="p">:</span><span class="w"> </span><span class="ss">:spellout_verbose</span><span class="w">
</span><span class="p" data-group-id="8942247217-16">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;one thousand two hundred and thirty-four&quot;</span><span class="p" data-group-id="8942247217-16">}</span><span class="w">
</span><span class="p" data-group-id="3056491303-16">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;one thousand two hundred and thirty-four&quot;</span><span class="p" data-group-id="3056491303-16">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">to_string</span><span class="w"> </span><span class="mi">1989</span><span class="p">,</span><span class="w"> </span><span class="ss">format</span><span class="p">:</span><span class="w"> </span><span class="ss">:spellout_year</span><span class="w">
</span><span class="p" data-group-id="8942247217-17">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;nineteen eighty-nine&quot;</span><span class="p" data-group-id="8942247217-17">}</span><span class="w">
</span><span class="p" data-group-id="3056491303-17">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;nineteen eighty-nine&quot;</span><span class="p" data-group-id="3056491303-17">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">to_string</span><span class="w"> </span><span class="mi">123</span><span class="p">,</span><span class="w"> </span><span class="ss">format</span><span class="p">:</span><span class="w"> </span><span class="ss">:ordinal</span><span class="w">
</span><span class="p" data-group-id="8942247217-18">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;123rd&quot;</span><span class="p" data-group-id="8942247217-18">}</span><span class="w">
</span><span class="p" data-group-id="3056491303-18">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;123rd&quot;</span><span class="p" data-group-id="3056491303-18">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">to_string</span><span class="w"> </span><span class="mi">123</span><span class="p">,</span><span class="w"> </span><span class="ss">format</span><span class="p">:</span><span class="w"> </span><span class="ss">:roman</span><span class="w">
</span><span class="p" data-group-id="8942247217-19">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;CXXIII&quot;</span><span class="p" data-group-id="8942247217-19">}</span><span class="w">
</span><span class="p" data-group-id="3056491303-19">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;CXXIII&quot;</span><span class="p" data-group-id="3056491303-19">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">to_string</span><span class="w"> </span><span class="mi">123</span><span class="p">,</span><span class="w"> </span><span class="ss">locale</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;th-u-nu-thai&quot;</span><span class="w">
</span><span class="p" data-group-id="8942247217-20">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;๑๒๓&quot;</span><span class="p" data-group-id="8942247217-20">}</span></code></pre><h2 id="to_string/2-errors" class="section-heading">
</span><span class="p" data-group-id="3056491303-20">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;๑๒๓&quot;</span><span class="p" data-group-id="3056491303-20">}</span></code></pre><h2 id="to_string/2-errors" class="section-heading">
<a href="#to_string/2-errors" class="hover-link">
<i class="ri-link-m" aria-hidden="true"></i>
</a>
<span class="text">Errors</span>
</h2>
<p>An error tuple <code class="inline">{:error, reason}</code> will be returned if an error is detected.
The two most likely causes of an error return are:</p><ul><li>A format cannot be compiled. In this case the error tuple will look like:</li></ul><pre><code class="makeup elixir" translate="no"><span class="w"> </span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">to_string</span><span class="p" data-group-id="2985825102-1">(</span><span class="mi">12345</span><span class="p">,</span><span class="w"> </span><span class="ss">format</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;0#&quot;</span><span class="p" data-group-id="2985825102-1">)</span><span class="w">
</span><span class="p" data-group-id="2985825102-2">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="2985825102-3">{</span><span class="nc">Cldr.FormatCompileError</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;Decimal format compiler: syntax error before: </span><span class="se">\&quot;</span><span class="s">#</span><span class="se">\&quot;</span><span class="s">&quot;</span><span class="p" data-group-id="2985825102-3">}</span><span class="p" data-group-id="2985825102-2">}</span></code></pre><ul><li>The format style requested is not defined for the <code class="inline">locale</code> and
The two most likely causes of an error return are:</p><ul><li>A format cannot be compiled. In this case the error tuple will look like:</li></ul><pre><code class="makeup elixir" translate="no"><span class="w"> </span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">to_string</span><span class="p" data-group-id="8004809210-1">(</span><span class="mi">12345</span><span class="p">,</span><span class="w"> </span><span class="ss">format</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;0#&quot;</span><span class="p" data-group-id="8004809210-1">)</span><span class="w">
</span><span class="p" data-group-id="8004809210-2">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="8004809210-3">{</span><span class="nc">Cldr.FormatCompileError</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;Decimal format compiler: syntax error before: </span><span class="se">\&quot;</span><span class="s">#</span><span class="se">\&quot;</span><span class="s">&quot;</span><span class="p" data-group-id="8004809210-3">}</span><span class="p" data-group-id="8004809210-2">}</span></code></pre><ul><li>The format style requested is not defined for the <code class="inline">locale</code> and
<code class="inline">number_system</code>. This happens typically when the number system is
<code class="inline">:algorithmic</code> rather than the more common <code class="inline">:numeric</code>. In this case the error
return looks like:</li></ul><pre><code class="makeup elixir" translate="no"><span class="w"> </span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">to_string</span><span class="p" data-group-id="1373629426-1">(</span><span class="mi">1234</span><span class="p">,</span><span class="w"> </span><span class="ss">locale</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;he&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">number_system</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;hebr&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">format</span><span class="p">:</span><span class="w"> </span><span class="ss">:percent</span><span class="p" data-group-id="1373629426-1">)</span><span class="w">
</span><span class="p" data-group-id="1373629426-2">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1373629426-3">{</span><span class="nc">Cldr.UnknownFormatError</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;The locale :he with number system :hebr does not define a format :percent&quot;</span><span class="p" data-group-id="1373629426-3">}</span><span class="p" data-group-id="1373629426-2">}</span></code></pre>
return looks like:</li></ul><pre><code class="makeup elixir" translate="no"><span class="w"> </span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">to_string</span><span class="p" data-group-id="5980230093-1">(</span><span class="mi">1234</span><span class="p">,</span><span class="w"> </span><span class="ss">locale</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;he&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">number_system</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;hebr&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">format</span><span class="p">:</span><span class="w"> </span><span class="ss">:percent</span><span class="p" data-group-id="5980230093-1">)</span><span class="w">
</span><span class="p" data-group-id="5980230093-2">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="5980230093-3">{</span><span class="nc">Cldr.UnknownFormatError</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;The locale :he with number system :hebr does not define a format :percent&quot;</span><span class="p" data-group-id="5980230093-3">}</span><span class="p" data-group-id="5980230093-2">}</span></code></pre>
</section>
</section>
<section class="detail" id="to_string!/2">
@ -1346,17 +1346,17 @@ returned by <a href="https://hexdocs.pm/ex_cldr/2.37.5/Cldr.html#known_number_sy
<span class="text">Examples</span>
</h2>
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">validate_number_system</span><span class="w"> </span><span class="s">&quot;en&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">:latn</span><span class="w">
</span><span class="p" data-group-id="2528348648-1">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="ss">:latn</span><span class="p" data-group-id="2528348648-1">}</span><span class="w">
</span><span class="p" data-group-id="2485578094-1">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="ss">:latn</span><span class="p" data-group-id="2485578094-1">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">validate_number_system</span><span class="w"> </span><span class="s">&quot;en&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">:default</span><span class="w">
</span><span class="p" data-group-id="2528348648-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="ss">:latn</span><span class="p" data-group-id="2528348648-2">}</span><span class="w">
</span><span class="p" data-group-id="2485578094-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="ss">:latn</span><span class="p" data-group-id="2485578094-2">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">validate_number_system</span><span class="w"> </span><span class="s">&quot;en&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">:unknown</span><span class="w">
</span><span class="p" data-group-id="2528348648-3">{</span><span class="ss">:error</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="2528348648-4">{</span><span class="nc">Cldr.UnknownNumberSystemError</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;The number system :unknown is unknown&quot;</span><span class="p" data-group-id="2528348648-4">}</span><span class="p" data-group-id="2528348648-3">}</span><span class="w">
</span><span class="p" data-group-id="2485578094-3">{</span><span class="ss">:error</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="2485578094-4">{</span><span class="nc">Cldr.UnknownNumberSystemError</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;The number system :unknown is unknown&quot;</span><span class="p" data-group-id="2485578094-4">}</span><span class="p" data-group-id="2485578094-3">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">validate_number_system</span><span class="w"> </span><span class="s">&quot;zz&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">:default</span><span class="w">
</span><span class="p" data-group-id="2528348648-5">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="2528348648-6">{</span><span class="nc">Cldr.InvalidLanguageError</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;The language </span><span class="se">\&quot;</span><span class="s">zz</span><span class="se">\&quot;</span><span class="s"> is invalid&quot;</span><span class="p" data-group-id="2528348648-6">}</span><span class="p" data-group-id="2528348648-5">}</span></code></pre>
</span><span class="p" data-group-id="2485578094-5">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="2485578094-6">{</span><span class="nc">Cldr.InvalidLanguageError</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;The language </span><span class="se">\&quot;</span><span class="s">zz</span><span class="se">\&quot;</span><span class="s"> is invalid&quot;</span><span class="p" data-group-id="2485578094-6">}</span><span class="p" data-group-id="2485578094-5">}</span></code></pre>
</section>
</section>

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>
@ -145,9 +145,9 @@ Pages
<section id="moduledoc">
<p>Functions to implement the number system rule-based-number-format rules of CLDR.</p><p>These rules are defined only on the &quot;und&quot; locale and represent specialised
number formatting.</p><p>The standard public API for RBNF is via the <a href="https://hexdocs.pm/ex_cldr_numbers/2.32.3/Cldr.Number.html#to_string/2"><code class="inline">Cldr.Number.to_string/2</code></a> function.</p><p>The functions on this module are defined at compile time based upon the RBNF rules
defined in the Unicode CLDR data repository. Available rules are identified by:</p><pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Rbnf.NumberSystem</span><span class="o">.</span><span class="n">rule_sets</span><span class="p" data-group-id="5620945055-1">(</span><span class="ss">:und</span><span class="p" data-group-id="5620945055-1">)</span><span class="w">
</span><span class="gp unselectable">...&gt; </span><span class="o">|&gt;</span><span class="w"> </span><span class="nc">Enum</span><span class="o">.</span><span class="n">sort</span><span class="p" data-group-id="5620945055-2">(</span><span class="p" data-group-id="5620945055-2">)</span><span class="w">
</span><span class="p" data-group-id="5620945055-3">[</span><span class="w">
defined in the Unicode CLDR data repository. Available rules are identified by:</p><pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Rbnf.NumberSystem</span><span class="o">.</span><span class="n">rule_sets</span><span class="p" data-group-id="8631383382-1">(</span><span class="ss">:und</span><span class="p" data-group-id="8631383382-1">)</span><span class="w">
</span><span class="gp unselectable">...&gt; </span><span class="o">|&gt;</span><span class="w"> </span><span class="nc">Enum</span><span class="o">.</span><span class="n">sort</span><span class="p" data-group-id="8631383382-2">(</span><span class="p" data-group-id="8631383382-2">)</span><span class="w">
</span><span class="p" data-group-id="8631383382-3">[</span><span class="w">
</span><span class="ss">:armenian_lower</span><span class="p">,</span><span class="w">
</span><span class="ss">:armenian_upper</span><span class="p">,</span><span class="w">
</span><span class="ss">:cyrillic_lower</span><span class="p">,</span><span class="w">
@ -161,9 +161,9 @@ defined in the Unicode CLDR data repository. Available rules are identified by:
</span><span class="ss">:roman_upper</span><span class="p">,</span><span class="w">
</span><span class="ss">:tamil</span><span class="p">,</span><span class="w">
</span><span class="ss">:zz_default</span><span class="w">
</span><span class="p" data-group-id="5620945055-3">]</span></code></pre><p>A rule can then be invoked on an available rule_set. For example</p><pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Rbnf.NumberSystem</span><span class="o">.</span><span class="n">roman_upper</span><span class="p" data-group-id="7532744879-1">(</span><span class="mi">123</span><span class="p">,</span><span class="w"> </span><span class="ss">:und</span><span class="p" data-group-id="7532744879-1">)</span><span class="w">
</span><span class="s">&quot;CXXIII&quot;</span></code></pre><p>This particular call is equivalent to the call through the public API of:</p><pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">to_string</span><span class="p" data-group-id="6235663959-1">(</span><span class="mi">123</span><span class="p">,</span><span class="w"> </span><span class="ss">format</span><span class="p">:</span><span class="w"> </span><span class="ss">:roman</span><span class="p" data-group-id="6235663959-1">)</span><span class="w">
</span><span class="p" data-group-id="6235663959-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;CXXIII&quot;</span><span class="p" data-group-id="6235663959-2">}</span></code></pre>
</span><span class="p" data-group-id="8631383382-3">]</span></code></pre><p>A rule can then be invoked on an available rule_set. For example</p><pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Rbnf.NumberSystem</span><span class="o">.</span><span class="n">roman_upper</span><span class="p" data-group-id="5043308851-1">(</span><span class="mi">123</span><span class="p">,</span><span class="w"> </span><span class="ss">:und</span><span class="p" data-group-id="5043308851-1">)</span><span class="w">
</span><span class="s">&quot;CXXIII&quot;</span></code></pre><p>This particular call is equivalent to the call through the public API of:</p><pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">to_string</span><span class="p" data-group-id="1520511616-1">(</span><span class="mi">123</span><span class="p">,</span><span class="w"> </span><span class="ss">format</span><span class="p">:</span><span class="w"> </span><span class="ss">:roman</span><span class="p" data-group-id="1520511616-1">)</span><span class="w">
</span><span class="p" data-group-id="1520511616-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;CXXIII&quot;</span><span class="p" data-group-id="1520511616-2">}</span></code></pre>
</section>

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>
@ -145,20 +145,20 @@ Pages
<section id="moduledoc">
<p>Functions to implement the ordinal rule-based-number-format rules of CLDR.</p><p>As CLDR notes, the data is incomplete or non-existent for many languages. It
is considered complete for English however.</p><p>The standard public API for RBNF is via the <a href="https://hexdocs.pm/ex_cldr_numbers/2.32.3/Cldr.Number.html#to_string/2"><code class="inline">Cldr.Number.to_string/2</code></a> function.</p><p>The functions on this module are defined at compile time based upon the RBNF rules
defined in the Unicode CLDR data repository. Available rules are identified by:</p><pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Rbnf.Ordinal</span><span class="o">.</span><span class="n">rule_sets</span><span class="p" data-group-id="3671360107-1">(</span><span class="ss">:en</span><span class="p" data-group-id="3671360107-1">)</span><span class="w">
</span><span class="p" data-group-id="3671360107-2">[</span><span class="ss">:digits_ordinal</span><span class="p" data-group-id="3671360107-2">]</span><span class="w">
defined in the Unicode CLDR data repository. Available rules are identified by:</p><pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Rbnf.Ordinal</span><span class="o">.</span><span class="n">rule_sets</span><span class="p" data-group-id="4806956649-1">(</span><span class="ss">:en</span><span class="p" data-group-id="4806956649-1">)</span><span class="w">
</span><span class="p" data-group-id="4806956649-2">[</span><span class="ss">:digits_ordinal</span><span class="p" data-group-id="4806956649-2">]</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Rbnf.Ordinal</span><span class="o">.</span><span class="n">rule_sets</span><span class="p" data-group-id="3671360107-3">(</span><span class="s">&quot;fr&quot;</span><span class="p" data-group-id="3671360107-3">)</span><span class="w">
</span><span class="gp unselectable">...&gt; </span><span class="o">|&gt;</span><span class="w"> </span><span class="nc">Enum</span><span class="o">.</span><span class="n">sort</span><span class="p" data-group-id="3671360107-4">(</span><span class="p" data-group-id="3671360107-4">)</span><span class="w">
</span><span class="p" data-group-id="3671360107-5">[</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Rbnf.Ordinal</span><span class="o">.</span><span class="n">rule_sets</span><span class="p" data-group-id="4806956649-3">(</span><span class="s">&quot;fr&quot;</span><span class="p" data-group-id="4806956649-3">)</span><span class="w">
</span><span class="gp unselectable">...&gt; </span><span class="o">|&gt;</span><span class="w"> </span><span class="nc">Enum</span><span class="o">.</span><span class="n">sort</span><span class="p" data-group-id="4806956649-4">(</span><span class="p" data-group-id="4806956649-4">)</span><span class="w">
</span><span class="p" data-group-id="4806956649-5">[</span><span class="w">
</span><span class="ss">:digits_ordinal</span><span class="p">,</span><span class="w">
</span><span class="ss">:digits_ordinal_feminine</span><span class="p">,</span><span class="w">
</span><span class="ss">:digits_ordinal_feminine_plural</span><span class="p">,</span><span class="w">
</span><span class="ss">:digits_ordinal_masculine</span><span class="p">,</span><span class="w">
</span><span class="ss">:digits_ordinal_masculine_plural</span><span class="w">
</span><span class="p" data-group-id="3671360107-5">]</span></code></pre><p>A rule can then be invoked on an available rule_set. For example</p><pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Rbnf.Ordinal</span><span class="o">.</span><span class="n">digits_ordinal</span><span class="p" data-group-id="6460309555-1">(</span><span class="mi">123</span><span class="p">,</span><span class="w"> </span><span class="ss">:en</span><span class="p" data-group-id="6460309555-1">)</span><span class="w">
</span><span class="s">&quot;123rd&quot;</span></code></pre><p>This call is equivalent to the call through the public API of:</p><pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">to_string</span><span class="p" data-group-id="3165258837-1">(</span><span class="mi">123</span><span class="p">,</span><span class="w"> </span><span class="ss">format</span><span class="p">:</span><span class="w"> </span><span class="ss">:ordinal</span><span class="p" data-group-id="3165258837-1">)</span><span class="w">
</span><span class="p" data-group-id="3165258837-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;123rd&quot;</span><span class="p" data-group-id="3165258837-2">}</span></code></pre>
</span><span class="p" data-group-id="4806956649-5">]</span></code></pre><p>A rule can then be invoked on an available rule_set. For example</p><pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Rbnf.Ordinal</span><span class="o">.</span><span class="n">digits_ordinal</span><span class="p" data-group-id="4065709282-1">(</span><span class="mi">123</span><span class="p">,</span><span class="w"> </span><span class="ss">:en</span><span class="p" data-group-id="4065709282-1">)</span><span class="w">
</span><span class="s">&quot;123rd&quot;</span></code></pre><p>This call is equivalent to the call through the public API of:</p><pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">to_string</span><span class="p" data-group-id="4841054082-1">(</span><span class="mi">123</span><span class="p">,</span><span class="w"> </span><span class="ss">format</span><span class="p">:</span><span class="w"> </span><span class="ss">:ordinal</span><span class="p" data-group-id="4841054082-1">)</span><span class="w">
</span><span class="p" data-group-id="4841054082-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;123rd&quot;</span><span class="p" data-group-id="4841054082-2">}</span></code></pre>
</section>

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>
@ -145,9 +145,9 @@ Pages
<section id="moduledoc">
<p>Functions to implement the spellout rule-based-number-format rules of CLDR.</p><p>As CLDR notes, the data is incomplete or non-existent for many languages. It
is considered complete for English however.</p><p>The standard public API for RBNF is via the <a href="https://hexdocs.pm/ex_cldr_numbers/2.32.3/Cldr.Number.html#to_string/2"><code class="inline">Cldr.Number.to_string/2</code></a> function.</p><p>The functions on this module are defined at compile time based upon the RBNF rules
defined in the Unicode CLDR data repository. Available rules are identified by:</p><pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Rbnf.Spellout</span><span class="o">.</span><span class="n">rule_sets</span><span class="p" data-group-id="0807158626-1">(</span><span class="s">&quot;en&quot;</span><span class="p" data-group-id="0807158626-1">)</span><span class="w">
</span><span class="gp unselectable">...&gt; </span><span class="o">|&gt;</span><span class="w"> </span><span class="nc">Enum</span><span class="o">.</span><span class="n">sort</span><span class="p" data-group-id="0807158626-2">(</span><span class="p" data-group-id="0807158626-2">)</span><span class="w">
</span><span class="p" data-group-id="0807158626-3">[</span><span class="w">
defined in the Unicode CLDR data repository. Available rules are identified by:</p><pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Rbnf.Spellout</span><span class="o">.</span><span class="n">rule_sets</span><span class="p" data-group-id="3090484365-1">(</span><span class="s">&quot;en&quot;</span><span class="p" data-group-id="3090484365-1">)</span><span class="w">
</span><span class="gp unselectable">...&gt; </span><span class="o">|&gt;</span><span class="w"> </span><span class="nc">Enum</span><span class="o">.</span><span class="n">sort</span><span class="p" data-group-id="3090484365-2">(</span><span class="p" data-group-id="3090484365-2">)</span><span class="w">
</span><span class="p" data-group-id="3090484365-3">[</span><span class="w">
</span><span class="ss">:spellout_cardinal</span><span class="p">,</span><span class="w">
</span><span class="ss">:spellout_cardinal_verbose</span><span class="p">,</span><span class="w">
</span><span class="ss">:spellout_numbering</span><span class="p">,</span><span class="w">
@ -155,9 +155,9 @@ defined in the Unicode CLDR data repository. Available rules are identified by:
</span><span class="ss">:spellout_numbering_year</span><span class="p">,</span><span class="w">
</span><span class="ss">:spellout_ordinal</span><span class="p">,</span><span class="w">
</span><span class="ss">:spellout_ordinal_verbose</span><span class="w">
</span><span class="p" data-group-id="0807158626-3">]</span></code></pre><p>A rule can then be invoked on an available rule_set. For example:</p><pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Rbnf.Spellout</span><span class="o">.</span><span class="n">spellout_ordinal</span><span class="p" data-group-id="1495716821-1">(</span><span class="mi">123</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;en&quot;</span><span class="p" data-group-id="1495716821-1">)</span><span class="w">
</span><span class="s">&quot;one hundred twenty-third&quot;</span></code></pre><p>This call is equivalent to the call through the public API of:</p><pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">to_string</span><span class="p" data-group-id="1900409724-1">(</span><span class="mi">123</span><span class="p">,</span><span class="w"> </span><span class="ss">format</span><span class="p">:</span><span class="w"> </span><span class="ss">:spellout</span><span class="p" data-group-id="1900409724-1">)</span><span class="w">
</span><span class="p" data-group-id="1900409724-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;one hundred twenty-three&quot;</span><span class="p" data-group-id="1900409724-2">}</span></code></pre>
</span><span class="p" data-group-id="3090484365-3">]</span></code></pre><p>A rule can then be invoked on an available rule_set. For example:</p><pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Rbnf.Spellout</span><span class="o">.</span><span class="n">spellout_ordinal</span><span class="p" data-group-id="6582304255-1">(</span><span class="mi">123</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;en&quot;</span><span class="p" data-group-id="6582304255-1">)</span><span class="w">
</span><span class="s">&quot;one hundred twenty-third&quot;</span></code></pre><p>This call is equivalent to the call through the public API of:</p><pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">to_string</span><span class="p" data-group-id="1532426784-1">(</span><span class="mi">123</span><span class="p">,</span><span class="w"> </span><span class="ss">format</span><span class="p">:</span><span class="w"> </span><span class="ss">:spellout</span><span class="p" data-group-id="1532426784-1">)</span><span class="w">
</span><span class="p" data-group-id="1532426784-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;one hundred twenty-three&quot;</span><span class="p" data-group-id="1532426784-2">}</span></code></pre>
</section>

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>
@ -558,24 +558,24 @@ current locale is restored after the function.</p></div>
</a>
<span class="text">Example</span>
</h2>
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">default_locale</span><span class="p" data-group-id="0655804443-1">(</span><span class="p" data-group-id="0655804443-1">)</span><span class="w">
</span><span class="p" data-group-id="0655804443-2">%</span><span class="nc" data-group-id="0655804443-2">Cldr.LanguageTag</span><span class="p" data-group-id="0655804443-2">{</span><span class="w">
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">default_locale</span><span class="p" data-group-id="7043662753-1">(</span><span class="p" data-group-id="7043662753-1">)</span><span class="w">
</span><span class="p" data-group-id="7043662753-2">%</span><span class="nc" data-group-id="7043662753-2">Cldr.LanguageTag</span><span class="p" data-group-id="7043662753-2">{</span><span class="w">
</span><span class="ss">backend</span><span class="p">:</span><span class="w"> </span><span class="nc">Plausible.Cldr</span><span class="p">,</span><span class="w">
</span><span class="ss">canonical_locale_name</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;en-001&quot;</span><span class="p">,</span><span class="w">
</span><span class="ss">cldr_locale_name</span><span class="p">:</span><span class="w"> </span><span class="ss">:&quot;en-001&quot;</span><span class="p">,</span><span class="w">
</span><span class="ss">language_subtags</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="0655804443-3">[</span><span class="p" data-group-id="0655804443-3">]</span><span class="p">,</span><span class="w">
</span><span class="ss">extensions</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="0655804443-4">%{</span><span class="p" data-group-id="0655804443-4">}</span><span class="p">,</span><span class="w">
</span><span class="ss">language_subtags</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="7043662753-3">[</span><span class="p" data-group-id="7043662753-3">]</span><span class="p">,</span><span class="w">
</span><span class="ss">extensions</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="7043662753-4">%{</span><span class="p" data-group-id="7043662753-4">}</span><span class="p">,</span><span class="w">
</span><span class="ss">gettext_locale_name</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;en&quot;</span><span class="p">,</span><span class="w">
</span><span class="ss">language</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;en&quot;</span><span class="p">,</span><span class="w">
</span><span class="ss">locale</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="0655804443-5">%{</span><span class="p" data-group-id="0655804443-5">}</span><span class="p">,</span><span class="w">
</span><span class="ss">private_use</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="0655804443-6">[</span><span class="p" data-group-id="0655804443-6">]</span><span class="p">,</span><span class="w">
</span><span class="ss">locale</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="7043662753-5">%{</span><span class="p" data-group-id="7043662753-5">}</span><span class="p">,</span><span class="w">
</span><span class="ss">private_use</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="7043662753-6">[</span><span class="p" data-group-id="7043662753-6">]</span><span class="p">,</span><span class="w">
</span><span class="ss">rbnf_locale_name</span><span class="p">:</span><span class="w"> </span><span class="ss">:en</span><span class="p">,</span><span class="w">
</span><span class="ss">requested_locale_name</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;en-001&quot;</span><span class="p">,</span><span class="w">
</span><span class="ss">script</span><span class="p">:</span><span class="w"> </span><span class="ss">:Latn</span><span class="p">,</span><span class="w">
</span><span class="ss">territory</span><span class="p">:</span><span class="w"> </span><span class="ss">:&quot;001&quot;</span><span class="p">,</span><span class="w">
</span><span class="ss">transform</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="0655804443-7">%{</span><span class="p" data-group-id="0655804443-7">}</span><span class="p">,</span><span class="w">
</span><span class="ss">language_variants</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="0655804443-8">[</span><span class="p" data-group-id="0655804443-8">]</span><span class="w">
</span><span class="p" data-group-id="0655804443-2">}</span></code></pre>
</span><span class="ss">transform</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="7043662753-7">%{</span><span class="p" data-group-id="7043662753-7">}</span><span class="p">,</span><span class="w">
</span><span class="ss">language_variants</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="7043662753-8">[</span><span class="p" data-group-id="7043662753-8">]</span><span class="w">
</span><span class="p" data-group-id="7043662753-2">}</span></code></pre>
</section>
</section>
<section class="detail" id="default_territory/0">
@ -610,7 +610,7 @@ does not specify one and none can be inferred.</p><h2 id="default_territory/0-ex
</a>
<span class="text">Example</span>
</h2>
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">default_territory</span><span class="p" data-group-id="8374172840-1">(</span><span class="p" data-group-id="8374172840-1">)</span><span class="w">
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">default_territory</span><span class="p" data-group-id="7800753883-1">(</span><span class="p" data-group-id="7800753883-1">)</span><span class="w">
</span><span class="ss">:&quot;001&quot;</span></code></pre>
</section>
</section>
@ -670,16 +670,16 @@ is inserted between words or sentences. The valid options are
</a>
<span class="text">Examples</span>
</h2>
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">ellipsis</span><span class="p" data-group-id="2253961119-1">(</span><span class="s">&quot;And furthermore&quot;</span><span class="p" data-group-id="2253961119-1">)</span><span class="w">
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">ellipsis</span><span class="p" data-group-id="3617992192-1">(</span><span class="s">&quot;And furthermore&quot;</span><span class="p" data-group-id="3617992192-1">)</span><span class="w">
</span><span class="s">&quot;And furthermore…&quot;</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">ellipsis</span><span class="p" data-group-id="2253961119-2">(</span><span class="p" data-group-id="2253961119-3">[</span><span class="s">&quot;And furthermore&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;there is much to be done&quot;</span><span class="p" data-group-id="2253961119-3">]</span><span class="p">,</span><span class="w"> </span><span class="ss">locale</span><span class="p">:</span><span class="w"> </span><span class="ss">:ja</span><span class="p" data-group-id="2253961119-2">)</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">ellipsis</span><span class="p" data-group-id="3617992192-2">(</span><span class="p" data-group-id="3617992192-3">[</span><span class="s">&quot;And furthermore&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;there is much to be done&quot;</span><span class="p" data-group-id="3617992192-3">]</span><span class="p">,</span><span class="w"> </span><span class="ss">locale</span><span class="p">:</span><span class="w"> </span><span class="ss">:ja</span><span class="p" data-group-id="3617992192-2">)</span><span class="w">
</span><span class="s">&quot;And furthermore…there is much to be done&quot;</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">ellipsis</span><span class="p" data-group-id="2253961119-4">(</span><span class="s">&quot;And furthermore&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">format</span><span class="p">:</span><span class="w"> </span><span class="ss">:word</span><span class="p" data-group-id="2253961119-4">)</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">ellipsis</span><span class="p" data-group-id="3617992192-4">(</span><span class="s">&quot;And furthermore&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">format</span><span class="p">:</span><span class="w"> </span><span class="ss">:word</span><span class="p" data-group-id="3617992192-4">)</span><span class="w">
</span><span class="s">&quot;And furthermore …&quot;</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">ellipsis</span><span class="p" data-group-id="2253961119-5">(</span><span class="p" data-group-id="2253961119-6">[</span><span class="s">&quot;And furthermore&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;there is much to be done&quot;</span><span class="p" data-group-id="2253961119-6">]</span><span class="p">,</span><span class="w"> </span><span class="ss">locale</span><span class="p">:</span><span class="w"> </span><span class="ss">:ja</span><span class="p">,</span><span class="w"> </span><span class="ss">format</span><span class="p">:</span><span class="w"> </span><span class="ss">:word</span><span class="p" data-group-id="2253961119-5">)</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">ellipsis</span><span class="p" data-group-id="3617992192-5">(</span><span class="p" data-group-id="3617992192-6">[</span><span class="s">&quot;And furthermore&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;there is much to be done&quot;</span><span class="p" data-group-id="3617992192-6">]</span><span class="p">,</span><span class="w"> </span><span class="ss">locale</span><span class="p">:</span><span class="w"> </span><span class="ss">:ja</span><span class="p">,</span><span class="w"> </span><span class="ss">format</span><span class="p">:</span><span class="w"> </span><span class="ss">:word</span><span class="p" data-group-id="3617992192-5">)</span><span class="w">
</span><span class="s">&quot;And furthermore … there is much to be done&quot;</span></code></pre>
</section>
</section>
@ -715,23 +715,23 @@ take an optional locale parameter for which a locale is not supplied.</p><h2 id=
</a>
<span class="text">Example</span>
</h2>
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">put_locale</span><span class="p" data-group-id="5075075779-1">(</span><span class="s">&quot;pl&quot;</span><span class="p" data-group-id="5075075779-1">)</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">get_locale</span><span class="p" data-group-id="5075075779-2">(</span><span class="p" data-group-id="5075075779-2">)</span><span class="w">
</span><span class="p" data-group-id="5075075779-3">%</span><span class="nc" data-group-id="5075075779-3">Cldr.LanguageTag</span><span class="p" data-group-id="5075075779-3">{</span><span class="w">
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">put_locale</span><span class="p" data-group-id="8740439591-1">(</span><span class="s">&quot;pl&quot;</span><span class="p" data-group-id="8740439591-1">)</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">get_locale</span><span class="p" data-group-id="8740439591-2">(</span><span class="p" data-group-id="8740439591-2">)</span><span class="w">
</span><span class="p" data-group-id="8740439591-3">%</span><span class="nc" data-group-id="8740439591-3">Cldr.LanguageTag</span><span class="p" data-group-id="8740439591-3">{</span><span class="w">
</span><span class="ss">backend</span><span class="p">:</span><span class="w"> </span><span class="nc">Elixir.Plausible.Cldr</span><span class="p">,</span><span class="w">
</span><span class="ss">canonical_locale_name</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;pl&quot;</span><span class="p">,</span><span class="w">
</span><span class="ss">cldr_locale_name</span><span class="p">:</span><span class="w"> </span><span class="ss">:pl</span><span class="p">,</span><span class="w">
</span><span class="ss">extensions</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="5075075779-4">%{</span><span class="p" data-group-id="5075075779-4">}</span><span class="p">,</span><span class="w">
</span><span class="ss">extensions</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="8740439591-4">%{</span><span class="p" data-group-id="8740439591-4">}</span><span class="p">,</span><span class="w">
</span><span class="ss">language</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;pl&quot;</span><span class="p">,</span><span class="w">
</span><span class="ss">locale</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="5075075779-5">%{</span><span class="p" data-group-id="5075075779-5">}</span><span class="p">,</span><span class="w">
</span><span class="ss">private_use</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="5075075779-6">[</span><span class="p" data-group-id="5075075779-6">]</span><span class="p">,</span><span class="w">
</span><span class="ss">locale</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="8740439591-5">%{</span><span class="p" data-group-id="8740439591-5">}</span><span class="p">,</span><span class="w">
</span><span class="ss">private_use</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="8740439591-6">[</span><span class="p" data-group-id="8740439591-6">]</span><span class="p">,</span><span class="w">
</span><span class="ss">rbnf_locale_name</span><span class="p">:</span><span class="w"> </span><span class="ss">:pl</span><span class="p">,</span><span class="w">
</span><span class="ss">territory</span><span class="p">:</span><span class="w"> </span><span class="ss">:PL</span><span class="p">,</span><span class="w">
</span><span class="ss">requested_locale_name</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;pl&quot;</span><span class="p">,</span><span class="w">
</span><span class="ss">script</span><span class="p">:</span><span class="w"> </span><span class="ss">:Latn</span><span class="p">,</span><span class="w">
</span><span class="ss">transform</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="5075075779-7">%{</span><span class="p" data-group-id="5075075779-7">}</span><span class="p">,</span><span class="w">
</span><span class="ss">language_variants</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="5075075779-8">[</span><span class="p" data-group-id="5075075779-8">]</span><span class="w">
</span><span class="p" data-group-id="5075075779-3">}</span></code></pre>
</span><span class="ss">transform</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="8740439591-7">%{</span><span class="p" data-group-id="8740439591-7">}</span><span class="p">,</span><span class="w">
</span><span class="ss">language_variants</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="8740439591-8">[</span><span class="p" data-group-id="8740439591-8">]</span><span class="w">
</span><span class="p" data-group-id="8740439591-3">}</span></code></pre>
</section>
</section>
<section class="detail" id="known_calendars/0">
@ -818,10 +818,10 @@ take an optional locale parameter for which a locale is not supplied.</p><h2 id=
</a>
<span class="text">Examples</span>
</h2>
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">known_gettext_locale_name</span><span class="p" data-group-id="6109052201-1">(</span><span class="s">&quot;en&quot;</span><span class="p" data-group-id="6109052201-1">)</span><span class="w">
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">known_gettext_locale_name</span><span class="p" data-group-id="1617384492-1">(</span><span class="s">&quot;en&quot;</span><span class="p" data-group-id="1617384492-1">)</span><span class="w">
</span><span class="s">&quot;en&quot;</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">known_gettext_locale_name</span><span class="p" data-group-id="6109052201-2">(</span><span class="s">&quot;en-SA&quot;</span><span class="p" data-group-id="6109052201-2">)</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">known_gettext_locale_name</span><span class="p" data-group-id="1617384492-2">(</span><span class="s">&quot;en-SA&quot;</span><span class="p" data-group-id="1617384492-2">)</span><span class="w">
</span><span class="no">false</span></code></pre>
</section>
</section>
@ -864,10 +864,10 @@ name is configured and available in Gettext.</p><h2 id="known_gettext_locale_nam
</a>
<span class="text">Examples</span>
</h2>
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">known_gettext_locale_name?</span><span class="p" data-group-id="5352286824-1">(</span><span class="s">&quot;en&quot;</span><span class="p" data-group-id="5352286824-1">)</span><span class="w">
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">known_gettext_locale_name?</span><span class="p" data-group-id="5036330731-1">(</span><span class="s">&quot;en&quot;</span><span class="p" data-group-id="5036330731-1">)</span><span class="w">
</span><span class="no">true</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">known_gettext_locale_name?</span><span class="p" data-group-id="5352286824-2">(</span><span class="s">&quot;!!&quot;</span><span class="p" data-group-id="5352286824-2">)</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">known_gettext_locale_name?</span><span class="p" data-group-id="5036330731-2">(</span><span class="s">&quot;!!&quot;</span><span class="p" data-group-id="5036330731-2">)</span><span class="w">
</span><span class="no">false</span></code></pre>
</section>
</section>
@ -941,10 +941,10 @@ to return the first known locale name from a list.</p><h2 id="known_locale_name/
</a>
<span class="text">Examples</span>
</h2>
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">known_locale_name</span><span class="p" data-group-id="7056482146-1">(</span><span class="ss">:&quot;en-AU&quot;</span><span class="p" data-group-id="7056482146-1">)</span><span class="w">
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">known_locale_name</span><span class="p" data-group-id="7819648797-1">(</span><span class="ss">:&quot;en-AU&quot;</span><span class="p" data-group-id="7819648797-1">)</span><span class="w">
</span><span class="ss">:&quot;en-AU&quot;</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">known_locale_name</span><span class="p" data-group-id="7056482146-2">(</span><span class="ss">:&quot;en-SA&quot;</span><span class="p" data-group-id="7056482146-2">)</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">known_locale_name</span><span class="p" data-group-id="7819648797-2">(</span><span class="ss">:&quot;en-SA&quot;</span><span class="p" data-group-id="7819648797-2">)</span><span class="w">
</span><span class="no">false</span></code></pre>
</section>
</section>
@ -986,10 +986,10 @@ name is configured and available in Cldr.</p><h2 id="known_locale_name?/1-argume
</a>
<span class="text">Examples</span>
</h2>
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">known_locale_name?</span><span class="p" data-group-id="1837694656-1">(</span><span class="ss">:en</span><span class="p" data-group-id="1837694656-1">)</span><span class="w">
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">known_locale_name?</span><span class="p" data-group-id="6525201027-1">(</span><span class="ss">:en</span><span class="p" data-group-id="6525201027-1">)</span><span class="w">
</span><span class="no">true</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">known_locale_name?</span><span class="p" data-group-id="1837694656-2">(</span><span class="ss">:&quot;!!&quot;</span><span class="p" data-group-id="1837694656-2">)</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">known_locale_name?</span><span class="p" data-group-id="6525201027-2">(</span><span class="ss">:&quot;!!&quot;</span><span class="p" data-group-id="6525201027-2">)</span><span class="w">
</span><span class="no">false</span></code></pre>
</section>
</section>
@ -1043,8 +1043,8 @@ in this module or in <a href="https://hexdocs.pm/gettext/0.24.0/Gettext.html"><c
</a>
<span class="text">Example</span>
</h2>
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">known_number_system_types</span><span class="p" data-group-id="8264459161-1">(</span><span class="p" data-group-id="8264459161-1">)</span><span class="w">
</span><span class="p" data-group-id="8264459161-2">[</span><span class="ss">:default</span><span class="p">,</span><span class="w"> </span><span class="ss">:finance</span><span class="p">,</span><span class="w"> </span><span class="ss">:native</span><span class="p">,</span><span class="w"> </span><span class="ss">:traditional</span><span class="p" data-group-id="8264459161-2">]</span></code></pre>
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">known_number_system_types</span><span class="p" data-group-id="9944442219-1">(</span><span class="p" data-group-id="9944442219-1">)</span><span class="w">
</span><span class="p" data-group-id="9944442219-2">[</span><span class="ss">:default</span><span class="p">,</span><span class="w"> </span><span class="ss">:finance</span><span class="p">,</span><span class="w"> </span><span class="ss">:native</span><span class="p">,</span><span class="w"> </span><span class="ss">:traditional</span><span class="p" data-group-id="9944442219-2">]</span></code></pre>
</section>
</section>
<section class="detail" id="known_number_systems/0">
@ -1109,10 +1109,10 @@ and has RBNF rules defined.</p><h2 id="known_rbnf_locale_name/1-arguments" class
</a>
<span class="text">Examples</span>
</h2>
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">known_rbnf_locale_name</span><span class="p" data-group-id="1391277776-1">(</span><span class="ss">:en</span><span class="p" data-group-id="1391277776-1">)</span><span class="w">
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">known_rbnf_locale_name</span><span class="p" data-group-id="6947908726-1">(</span><span class="ss">:en</span><span class="p" data-group-id="6947908726-1">)</span><span class="w">
</span><span class="ss">:en</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">known_rbnf_locale_name</span><span class="p" data-group-id="1391277776-2">(</span><span class="ss">:&quot;en-SA&quot;</span><span class="p" data-group-id="1391277776-2">)</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">known_rbnf_locale_name</span><span class="p" data-group-id="6947908726-2">(</span><span class="ss">:&quot;en-SA&quot;</span><span class="p" data-group-id="6947908726-2">)</span><span class="w">
</span><span class="no">false</span></code></pre>
</section>
</section>
@ -1155,10 +1155,10 @@ rules based number formats (RBNF).</p><h2 id="known_rbnf_locale_name?/1-argument
</a>
<span class="text">Examples</span>
</h2>
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">known_rbnf_locale_name?</span><span class="p" data-group-id="4928057428-1">(</span><span class="ss">:en</span><span class="p" data-group-id="4928057428-1">)</span><span class="w">
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">known_rbnf_locale_name?</span><span class="p" data-group-id="6929160012-1">(</span><span class="ss">:en</span><span class="p" data-group-id="6929160012-1">)</span><span class="w">
</span><span class="no">true</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">known_rbnf_locale_name?</span><span class="p" data-group-id="4928057428-2">(</span><span class="ss">:&quot;!!&quot;</span><span class="p" data-group-id="4928057428-2">)</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">known_rbnf_locale_name?</span><span class="p" data-group-id="6929160012-2">(</span><span class="ss">:&quot;!!&quot;</span><span class="p" data-group-id="6929160012-2">)</span><span class="w">
</span><span class="no">false</span></code></pre>
</section>
</section>
@ -1294,14 +1294,14 @@ CLDR backend defined by the <code class="inline">t:Cldr.LanguageTag</code> is se
<span class="text">Examples</span>
</h2>
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="kn">import</span><span class="w"> </span><span class="nc">Cldr.LanguageTag.Sigil</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">put_gettext_locale</span><span class="p" data-group-id="5645536513-1">(</span><span class="sx">~l&quot;en&quot;</span><span class="p" data-group-id="5645536513-1">)</span><span class="w">
</span><span class="p" data-group-id="5645536513-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;en&quot;</span><span class="p" data-group-id="5645536513-2">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">put_gettext_locale</span><span class="p" data-group-id="9634545671-1">(</span><span class="sx">~l&quot;en&quot;</span><span class="p" data-group-id="9634545671-1">)</span><span class="w">
</span><span class="p" data-group-id="9634545671-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;en&quot;</span><span class="p" data-group-id="9634545671-2">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="kn">import</span><span class="w"> </span><span class="nc">Cldr.LanguageTag.Sigil</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">put_gettext_locale</span><span class="p" data-group-id="5645536513-3">(</span><span class="sx">~l&quot;de&quot;</span><span class="p" data-group-id="5645536513-3">)</span><span class="w">
</span><span class="p" data-group-id="5645536513-4">{</span><span class="ss">:error</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="5645536513-5">{</span><span class="nc">Cldr.UnknownLocaleError</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;Locale #Cldr.LanguageTag&lt;de [validated]&gt; does not map to a known gettext locale name&quot;</span><span class="p" data-group-id="5645536513-5">}</span><span class="p" data-group-id="5645536513-4">}</span></code></pre>
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">put_gettext_locale</span><span class="p" data-group-id="9634545671-3">(</span><span class="sx">~l&quot;de&quot;</span><span class="p" data-group-id="9634545671-3">)</span><span class="w">
</span><span class="p" data-group-id="9634545671-4">{</span><span class="ss">:error</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="9634545671-5">{</span><span class="nc">Cldr.UnknownLocaleError</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;Locale #Cldr.LanguageTag&lt;de [validated]&gt; does not map to a known gettext locale name&quot;</span><span class="p" data-group-id="9634545671-5">}</span><span class="p" data-group-id="9634545671-4">}</span></code></pre>
</section>
</section>
<section class="detail" id="put_locale/1">
@ -1345,29 +1345,29 @@ of a language tag.</p><h2 id="put_locale/1-examples" class="section-heading">
</a>
<span class="text">Examples</span>
</h2>
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">put_locale</span><span class="p" data-group-id="1703698528-1">(</span><span class="s">&quot;en&quot;</span><span class="p" data-group-id="1703698528-1">)</span><span class="w">
</span><span class="p" data-group-id="1703698528-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="1703698528-3">%</span><span class="nc" data-group-id="1703698528-3">Cldr.LanguageTag</span><span class="p" data-group-id="1703698528-3">{</span><span class="w">
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">put_locale</span><span class="p" data-group-id="6808439439-1">(</span><span class="s">&quot;en&quot;</span><span class="p" data-group-id="6808439439-1">)</span><span class="w">
</span><span class="p" data-group-id="6808439439-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="6808439439-3">%</span><span class="nc" data-group-id="6808439439-3">Cldr.LanguageTag</span><span class="p" data-group-id="6808439439-3">{</span><span class="w">
</span><span class="ss">backend</span><span class="p">:</span><span class="w"> </span><span class="nc">Plausible.Cldr</span><span class="p">,</span><span class="w">
</span><span class="ss">canonical_locale_name</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;en&quot;</span><span class="p">,</span><span class="w">
</span><span class="ss">cldr_locale_name</span><span class="p">:</span><span class="w"> </span><span class="ss">:en</span><span class="p">,</span><span class="w">
</span><span class="ss">language_subtags</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="1703698528-4">[</span><span class="p" data-group-id="1703698528-4">]</span><span class="p">,</span><span class="w">
</span><span class="ss">extensions</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="1703698528-5">%{</span><span class="p" data-group-id="1703698528-5">}</span><span class="p">,</span><span class="w">
</span><span class="ss">language_subtags</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="6808439439-4">[</span><span class="p" data-group-id="6808439439-4">]</span><span class="p">,</span><span class="w">
</span><span class="ss">extensions</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="6808439439-5">%{</span><span class="p" data-group-id="6808439439-5">}</span><span class="p">,</span><span class="w">
</span><span class="ss">gettext_locale_name</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;en&quot;</span><span class="p">,</span><span class="w">
</span><span class="ss">language</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;en&quot;</span><span class="p">,</span><span class="w">
</span><span class="ss">locale</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="1703698528-6">%{</span><span class="p" data-group-id="1703698528-6">}</span><span class="p">,</span><span class="w">
</span><span class="ss">private_use</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="1703698528-7">[</span><span class="p" data-group-id="1703698528-7">]</span><span class="p">,</span><span class="w">
</span><span class="ss">locale</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="6808439439-6">%{</span><span class="p" data-group-id="6808439439-6">}</span><span class="p">,</span><span class="w">
</span><span class="ss">private_use</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="6808439439-7">[</span><span class="p" data-group-id="6808439439-7">]</span><span class="p">,</span><span class="w">
</span><span class="ss">rbnf_locale_name</span><span class="p">:</span><span class="w"> </span><span class="ss">:en</span><span class="p">,</span><span class="w">
</span><span class="ss">requested_locale_name</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;en&quot;</span><span class="p">,</span><span class="w">
</span><span class="ss">script</span><span class="p">:</span><span class="w"> </span><span class="ss">:Latn</span><span class="p">,</span><span class="w">
</span><span class="ss">territory</span><span class="p">:</span><span class="w"> </span><span class="ss">:US</span><span class="p">,</span><span class="w">
</span><span class="ss">transform</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="1703698528-8">%{</span><span class="p" data-group-id="1703698528-8">}</span><span class="p">,</span><span class="w">
</span><span class="ss">language_variants</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="1703698528-9">[</span><span class="p" data-group-id="1703698528-9">]</span><span class="w">
</span><span class="p" data-group-id="1703698528-3">}</span><span class="p" data-group-id="1703698528-2">}</span><span class="w">
</span><span class="ss">transform</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="6808439439-8">%{</span><span class="p" data-group-id="6808439439-8">}</span><span class="p">,</span><span class="w">
</span><span class="ss">language_variants</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="6808439439-9">[</span><span class="p" data-group-id="6808439439-9">]</span><span class="w">
</span><span class="p" data-group-id="6808439439-3">}</span><span class="p" data-group-id="6808439439-2">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">put_locale</span><span class="p" data-group-id="1703698528-10">(</span><span class="s">&quot;invalid-locale!&quot;</span><span class="p" data-group-id="1703698528-10">)</span><span class="w">
</span><span class="p" data-group-id="1703698528-11">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1703698528-12">{</span><span class="nc">Cldr.LanguageTag.ParseError</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;Expected a BCP47 language tag. Could not parse the remaining </span><span class="se">\&quot;</span><span class="s">!</span><span class="se">\&quot;</span><span class="s"> starting at position 15&quot;</span><span class="p" data-group-id="1703698528-12">}</span><span class="p" data-group-id="1703698528-11">}</span></code></pre>
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">put_locale</span><span class="p" data-group-id="6808439439-10">(</span><span class="s">&quot;invalid-locale!&quot;</span><span class="p" data-group-id="6808439439-10">)</span><span class="w">
</span><span class="p" data-group-id="6808439439-11">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="6808439439-12">{</span><span class="nc">Cldr.LanguageTag.ParseError</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;Expected a BCP47 language tag. Could not parse the remaining </span><span class="se">\&quot;</span><span class="s">!</span><span class="se">\&quot;</span><span class="s"> starting at position 15&quot;</span><span class="p" data-group-id="6808439439-12">}</span><span class="p" data-group-id="6808439439-11">}</span></code></pre>
</section>
</section>
<section class="detail" id="quote/2">
@ -1416,10 +1416,10 @@ The default is <a href="https://hexdocs.pm/ex_cldr/2.37.5/Cldr.html#get_locale/0
</a>
<span class="text">Examples</span>
</h2>
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="k">quote</span><span class="p" data-group-id="4264583148-1">(</span><span class="s">&quot;Quoted String&quot;</span><span class="p" data-group-id="4264583148-1">)</span><span class="w">
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="k">quote</span><span class="p" data-group-id="4014202521-1">(</span><span class="s">&quot;Quoted String&quot;</span><span class="p" data-group-id="4014202521-1">)</span><span class="w">
</span><span class="s">&quot;“Quoted String”&quot;</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="k">quote</span><span class="p" data-group-id="4264583148-2">(</span><span class="s">&quot;Quoted String&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">locale</span><span class="p">:</span><span class="w"> </span><span class="ss">:ja</span><span class="p" data-group-id="4264583148-2">)</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="k">quote</span><span class="p" data-group-id="4014202521-2">(</span><span class="s">&quot;Quoted String&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">locale</span><span class="p">:</span><span class="w"> </span><span class="ss">:ja</span><span class="p" data-group-id="4014202521-2">)</span><span class="w">
</span><span class="s">&quot;「Quoted String」&quot;</span></code></pre>
</section>
</section>
@ -1550,47 +1550,47 @@ of a language tag.</p><h2 id="validate_locale/1-examples" class="section-heading
</a>
<span class="text">Examples</span>
</h2>
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">validate_locale</span><span class="p" data-group-id="5225933114-1">(</span><span class="ss">:en</span><span class="p" data-group-id="5225933114-1">)</span><span class="w">
</span><span class="p" data-group-id="5225933114-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="5225933114-3">%</span><span class="nc" data-group-id="5225933114-3">Cldr.LanguageTag</span><span class="p" data-group-id="5225933114-3">{</span><span class="w">
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">validate_locale</span><span class="p" data-group-id="3496354235-1">(</span><span class="ss">:en</span><span class="p" data-group-id="3496354235-1">)</span><span class="w">
</span><span class="p" data-group-id="3496354235-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="3496354235-3">%</span><span class="nc" data-group-id="3496354235-3">Cldr.LanguageTag</span><span class="p" data-group-id="3496354235-3">{</span><span class="w">
</span><span class="ss">backend</span><span class="p">:</span><span class="w"> </span><span class="nc">Plausible.Cldr</span><span class="p">,</span><span class="w">
</span><span class="ss">canonical_locale_name</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;en&quot;</span><span class="p">,</span><span class="w">
</span><span class="ss">cldr_locale_name</span><span class="p">:</span><span class="w"> </span><span class="ss">:en</span><span class="p">,</span><span class="w">
</span><span class="ss">extensions</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="5225933114-4">%{</span><span class="p" data-group-id="5225933114-4">}</span><span class="p">,</span><span class="w">
</span><span class="ss">extensions</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="3496354235-4">%{</span><span class="p" data-group-id="3496354235-4">}</span><span class="p">,</span><span class="w">
</span><span class="ss">gettext_locale_name</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;en&quot;</span><span class="p">,</span><span class="w">
</span><span class="ss">language</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;en&quot;</span><span class="p">,</span><span class="w">
</span><span class="ss">locale</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="5225933114-5">%{</span><span class="p" data-group-id="5225933114-5">}</span><span class="p">,</span><span class="w">
</span><span class="ss">private_use</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="5225933114-6">[</span><span class="p" data-group-id="5225933114-6">]</span><span class="p">,</span><span class="w">
</span><span class="ss">locale</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="3496354235-5">%{</span><span class="p" data-group-id="3496354235-5">}</span><span class="p">,</span><span class="w">
</span><span class="ss">private_use</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="3496354235-6">[</span><span class="p" data-group-id="3496354235-6">]</span><span class="p">,</span><span class="w">
</span><span class="ss">rbnf_locale_name</span><span class="p">:</span><span class="w"> </span><span class="ss">:en</span><span class="p">,</span><span class="w">
</span><span class="ss">requested_locale_name</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;en&quot;</span><span class="p">,</span><span class="w">
</span><span class="ss">script</span><span class="p">:</span><span class="w"> </span><span class="ss">:Latn</span><span class="p">,</span><span class="w">
</span><span class="ss">territory</span><span class="p">:</span><span class="w"> </span><span class="ss">:US</span><span class="p">,</span><span class="w">
</span><span class="ss">transform</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="5225933114-7">%{</span><span class="p" data-group-id="5225933114-7">}</span><span class="p">,</span><span class="w">
</span><span class="ss">language_variants</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="5225933114-8">[</span><span class="p" data-group-id="5225933114-8">]</span><span class="w">
</span><span class="p" data-group-id="5225933114-3">}</span><span class="p" data-group-id="5225933114-2">}</span><span class="w">
</span><span class="ss">transform</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="3496354235-7">%{</span><span class="p" data-group-id="3496354235-7">}</span><span class="p">,</span><span class="w">
</span><span class="ss">language_variants</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="3496354235-8">[</span><span class="p" data-group-id="3496354235-8">]</span><span class="w">
</span><span class="p" data-group-id="3496354235-3">}</span><span class="p" data-group-id="3496354235-2">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">validate_locale</span><span class="w"> </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">default_locale</span><span class="p" data-group-id="5225933114-9">(</span><span class="p" data-group-id="5225933114-9">)</span><span class="w">
</span><span class="p" data-group-id="5225933114-10">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="5225933114-11">%</span><span class="nc" data-group-id="5225933114-11">Cldr.LanguageTag</span><span class="p" data-group-id="5225933114-11">{</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">validate_locale</span><span class="w"> </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">default_locale</span><span class="p" data-group-id="3496354235-9">(</span><span class="p" data-group-id="3496354235-9">)</span><span class="w">
</span><span class="p" data-group-id="3496354235-10">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="3496354235-11">%</span><span class="nc" data-group-id="3496354235-11">Cldr.LanguageTag</span><span class="p" data-group-id="3496354235-11">{</span><span class="w">
</span><span class="ss">backend</span><span class="p">:</span><span class="w"> </span><span class="nc">Plausible.Cldr</span><span class="p">,</span><span class="w">
</span><span class="ss">canonical_locale_name</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;en-001&quot;</span><span class="p">,</span><span class="w">
</span><span class="ss">cldr_locale_name</span><span class="p">:</span><span class="w"> </span><span class="ss">:&quot;en-001&quot;</span><span class="p">,</span><span class="w">
</span><span class="ss">extensions</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="5225933114-12">%{</span><span class="p" data-group-id="5225933114-12">}</span><span class="p">,</span><span class="w">
</span><span class="ss">extensions</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="3496354235-12">%{</span><span class="p" data-group-id="3496354235-12">}</span><span class="p">,</span><span class="w">
</span><span class="ss">gettext_locale_name</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;en&quot;</span><span class="p">,</span><span class="w">
</span><span class="ss">language</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;en&quot;</span><span class="p">,</span><span class="w">
</span><span class="ss">locale</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="5225933114-13">%{</span><span class="p" data-group-id="5225933114-13">}</span><span class="p">,</span><span class="w">
</span><span class="ss">private_use</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="5225933114-14">[</span><span class="p" data-group-id="5225933114-14">]</span><span class="p">,</span><span class="w">
</span><span class="ss">locale</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="3496354235-13">%{</span><span class="p" data-group-id="3496354235-13">}</span><span class="p">,</span><span class="w">
</span><span class="ss">private_use</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="3496354235-14">[</span><span class="p" data-group-id="3496354235-14">]</span><span class="p">,</span><span class="w">
</span><span class="ss">rbnf_locale_name</span><span class="p">:</span><span class="w"> </span><span class="ss">:en</span><span class="p">,</span><span class="w">
</span><span class="ss">requested_locale_name</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;en-001&quot;</span><span class="p">,</span><span class="w">
</span><span class="ss">script</span><span class="p">:</span><span class="w"> </span><span class="ss">:Latn</span><span class="p">,</span><span class="w">
</span><span class="ss">territory</span><span class="p">:</span><span class="w"> </span><span class="ss">:&quot;001&quot;</span><span class="p">,</span><span class="w">
</span><span class="ss">transform</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="5225933114-15">%{</span><span class="p" data-group-id="5225933114-15">}</span><span class="p">,</span><span class="w">
</span><span class="ss">language_variants</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="5225933114-16">[</span><span class="p" data-group-id="5225933114-16">]</span><span class="w">
</span><span class="p" data-group-id="5225933114-11">}</span><span class="p" data-group-id="5225933114-10">}</span><span class="w">
</span><span class="ss">transform</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="3496354235-15">%{</span><span class="p" data-group-id="3496354235-15">}</span><span class="p">,</span><span class="w">
</span><span class="ss">language_variants</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="3496354235-16">[</span><span class="p" data-group-id="3496354235-16">]</span><span class="w">
</span><span class="p" data-group-id="3496354235-11">}</span><span class="p" data-group-id="3496354235-10">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">validate_locale</span><span class="p" data-group-id="5225933114-17">(</span><span class="s">&quot;zzz&quot;</span><span class="p" data-group-id="5225933114-17">)</span><span class="w">
</span><span class="p" data-group-id="5225933114-18">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="5225933114-19">{</span><span class="nc">Cldr.InvalidLanguageError</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;The language </span><span class="se">\&quot;</span><span class="s">zzz</span><span class="se">\&quot;</span><span class="s"> is invalid&quot;</span><span class="p" data-group-id="5225933114-19">}</span><span class="p" data-group-id="5225933114-18">}</span></code></pre>
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">validate_locale</span><span class="p" data-group-id="3496354235-17">(</span><span class="s">&quot;zzz&quot;</span><span class="p" data-group-id="3496354235-17">)</span><span class="w">
</span><span class="p" data-group-id="3496354235-18">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="3496354235-19">{</span><span class="nc">Cldr.InvalidLanguageError</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;The language </span><span class="se">\&quot;</span><span class="s">zzz</span><span class="se">\&quot;</span><span class="s"> is invalid&quot;</span><span class="p" data-group-id="3496354235-19">}</span><span class="p" data-group-id="3496354235-18">}</span></code></pre>
</section>
</section>
<section class="detail" id="validate_number_system/1">
@ -1660,23 +1660,23 @@ of a language tag.</p><h2 id="validate_locale/1-examples" class="section-heading
</a>
<span class="text">Examples</span>
</h2>
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">validate_number_system_type</span><span class="p" data-group-id="8532232856-1">(</span><span class="ss">:default</span><span class="p" data-group-id="8532232856-1">)</span><span class="w">
</span><span class="p" data-group-id="8532232856-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="ss">:default</span><span class="p" data-group-id="8532232856-2">}</span><span class="w">
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">validate_number_system_type</span><span class="p" data-group-id="4618260393-1">(</span><span class="ss">:default</span><span class="p" data-group-id="4618260393-1">)</span><span class="w">
</span><span class="p" data-group-id="4618260393-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="ss">:default</span><span class="p" data-group-id="4618260393-2">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">validate_number_system_type</span><span class="p" data-group-id="8532232856-3">(</span><span class="ss">:traditional</span><span class="p" data-group-id="8532232856-3">)</span><span class="w">
</span><span class="p" data-group-id="8532232856-4">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="ss">:traditional</span><span class="p" data-group-id="8532232856-4">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">validate_number_system_type</span><span class="p" data-group-id="4618260393-3">(</span><span class="ss">:traditional</span><span class="p" data-group-id="4618260393-3">)</span><span class="w">
</span><span class="p" data-group-id="4618260393-4">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="ss">:traditional</span><span class="p" data-group-id="4618260393-4">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">validate_number_system_type</span><span class="p" data-group-id="8532232856-5">(</span><span class="ss">:latn</span><span class="p" data-group-id="8532232856-5">)</span><span class="w">
</span><span class="p" data-group-id="8532232856-6">{</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">validate_number_system_type</span><span class="p" data-group-id="4618260393-5">(</span><span class="ss">:latn</span><span class="p" data-group-id="4618260393-5">)</span><span class="w">
</span><span class="p" data-group-id="4618260393-6">{</span><span class="w">
</span><span class="ss">:error</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="8532232856-7">{</span><span class="nc">Cldr.UnknownNumberSystemTypeError</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;The number system type :latn is unknown&quot;</span><span class="p" data-group-id="8532232856-7">}</span><span class="w">
</span><span class="p" data-group-id="8532232856-6">}</span><span class="w">
</span><span class="p" data-group-id="4618260393-7">{</span><span class="nc">Cldr.UnknownNumberSystemTypeError</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;The number system type :latn is unknown&quot;</span><span class="p" data-group-id="4618260393-7">}</span><span class="w">
</span><span class="p" data-group-id="4618260393-6">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">validate_number_system_type</span><span class="p" data-group-id="8532232856-8">(</span><span class="s">&quot;bork&quot;</span><span class="p" data-group-id="8532232856-8">)</span><span class="w">
</span><span class="p" data-group-id="8532232856-9">{</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">validate_number_system_type</span><span class="p" data-group-id="4618260393-8">(</span><span class="s">&quot;bork&quot;</span><span class="p" data-group-id="4618260393-8">)</span><span class="w">
</span><span class="p" data-group-id="4618260393-9">{</span><span class="w">
</span><span class="ss">:error</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="8532232856-10">{</span><span class="nc">Cldr.UnknownNumberSystemTypeError</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;The number system type </span><span class="se">\&quot;</span><span class="s">bork</span><span class="se">\&quot;</span><span class="s"> is invalid&quot;</span><span class="p" data-group-id="8532232856-10">}</span><span class="w">
</span><span class="p" data-group-id="8532232856-9">}</span></code></pre>
</span><span class="p" data-group-id="4618260393-10">{</span><span class="nc">Cldr.UnknownNumberSystemTypeError</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;The number system type </span><span class="se">\&quot;</span><span class="s">bork</span><span class="se">\&quot;</span><span class="s"> is invalid&quot;</span><span class="p" data-group-id="4618260393-10">}</span><span class="w">
</span><span class="p" data-group-id="4618260393-9">}</span></code></pre>
</section>
</section>
<section class="detail" id="validate_territory/1">

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>
@ -855,23 +855,23 @@ pool to disconnect within the given interval.</p><p>See <a href="https://hexdocs
<section class="docstring">
<p>Similar to <code class="inline">insert_all/2</code> but with the following differences:</p><ul><li>accepts rows as streams or lists</li><li>sends rows as a chunked request</li><li>doesn't autogenerate ids or does any other preprocessing</li></ul><p>Example:</p><pre><code class="makeup elixir" translate="no"><span class="nc">Repo</span><span class="o">.</span><span class="n">query!</span><span class="p" data-group-id="1094326912-1">(</span><span class="s">&quot;create table ecto_ch_demo(a UInt64, b String) engine Null&quot;</span><span class="p" data-group-id="1094326912-1">)</span><span class="w">
<p>Similar to <code class="inline">insert_all/2</code> but with the following differences:</p><ul><li>accepts rows as streams or lists</li><li>sends rows as a chunked request</li><li>doesn't autogenerate ids or does any other preprocessing</li></ul><p>Example:</p><pre><code class="makeup elixir" translate="no"><span class="nc">Repo</span><span class="o">.</span><span class="n">query!</span><span class="p" data-group-id="7067547641-1">(</span><span class="s">&quot;create table ecto_ch_demo(a UInt64, b String) engine Null&quot;</span><span class="p" data-group-id="7067547641-1">)</span><span class="w">
</span><span class="kd">defmodule</span><span class="w"> </span><span class="nc">Demo</span><span class="w"> </span><span class="k" data-group-id="1094326912-2">do</span><span class="w">
</span><span class="kd">defmodule</span><span class="w"> </span><span class="nc">Demo</span><span class="w"> </span><span class="k" data-group-id="7067547641-2">do</span><span class="w">
</span><span class="kn">use</span><span class="w"> </span><span class="nc">Ecto.Schema</span><span class="w">
</span><span class="na">@primary_key</span><span class="w"> </span><span class="no">false</span><span class="w">
</span><span class="n">schema</span><span class="w"> </span><span class="s">&quot;ecto_ch_demo&quot;</span><span class="w"> </span><span class="k" data-group-id="1094326912-3">do</span><span class="w">
</span><span class="n">schema</span><span class="w"> </span><span class="s">&quot;ecto_ch_demo&quot;</span><span class="w"> </span><span class="k" data-group-id="7067547641-3">do</span><span class="w">
</span><span class="n">field</span><span class="w"> </span><span class="ss">:a</span><span class="p">,</span><span class="w"> </span><span class="nc">Ch</span><span class="p">,</span><span class="w"> </span><span class="ss">type</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;UInt64&quot;</span><span class="w">
</span><span class="n">field</span><span class="w"> </span><span class="ss">:b</span><span class="p">,</span><span class="w"> </span><span class="ss">:string</span><span class="w">
</span><span class="k" data-group-id="1094326912-3">end</span><span class="w">
</span><span class="k" data-group-id="1094326912-2">end</span><span class="w">
</span><span class="k" data-group-id="7067547641-3">end</span><span class="w">
</span><span class="k" data-group-id="7067547641-2">end</span><span class="w">
</span><span class="n">rows</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nc">Stream</span><span class="o">.</span><span class="n">map</span><span class="p" data-group-id="1094326912-4">(</span><span class="mi">1</span><span class="o">..</span><span class="mi">100_000</span><span class="p">,</span><span class="w"> </span><span class="k" data-group-id="1094326912-5">fn</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">-&gt;</span><span class="w"> </span><span class="p" data-group-id="1094326912-6">%{</span><span class="ss">a</span><span class="p">:</span><span class="w"> </span><span class="n">i</span><span class="p">,</span><span class="w"> </span><span class="ss">b</span><span class="p">:</span><span class="w"> </span><span class="n">to_string</span><span class="p" data-group-id="1094326912-7">(</span><span class="n">i</span><span class="p" data-group-id="1094326912-7">)</span><span class="p" data-group-id="1094326912-6">}</span><span class="w"> </span><span class="k" data-group-id="1094326912-5">end</span><span class="p" data-group-id="1094326912-4">)</span><span class="w">
</span><span class="p" data-group-id="1094326912-8">{</span><span class="mi">100_000</span><span class="p">,</span><span class="w"> </span><span class="no">nil</span><span class="p" data-group-id="1094326912-8">}</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nc">Repo</span><span class="o">.</span><span class="n">insert_stream</span><span class="p" data-group-id="1094326912-9">(</span><span class="nc">Demo</span><span class="p">,</span><span class="w"> </span><span class="n">rows</span><span class="p" data-group-id="1094326912-9">)</span><span class="w">
</span><span class="n">rows</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nc">Stream</span><span class="o">.</span><span class="n">map</span><span class="p" data-group-id="7067547641-4">(</span><span class="mi">1</span><span class="o">..</span><span class="mi">100_000</span><span class="p">,</span><span class="w"> </span><span class="k" data-group-id="7067547641-5">fn</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">-&gt;</span><span class="w"> </span><span class="p" data-group-id="7067547641-6">%{</span><span class="ss">a</span><span class="p">:</span><span class="w"> </span><span class="n">i</span><span class="p">,</span><span class="w"> </span><span class="ss">b</span><span class="p">:</span><span class="w"> </span><span class="n">to_string</span><span class="p" data-group-id="7067547641-7">(</span><span class="n">i</span><span class="p" data-group-id="7067547641-7">)</span><span class="p" data-group-id="7067547641-6">}</span><span class="w"> </span><span class="k" data-group-id="7067547641-5">end</span><span class="p" data-group-id="7067547641-4">)</span><span class="w">
</span><span class="p" data-group-id="7067547641-8">{</span><span class="mi">100_000</span><span class="p">,</span><span class="w"> </span><span class="no">nil</span><span class="p" data-group-id="7067547641-8">}</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nc">Repo</span><span class="o">.</span><span class="n">insert_stream</span><span class="p" data-group-id="7067547641-9">(</span><span class="nc">Demo</span><span class="p">,</span><span class="w"> </span><span class="n">rows</span><span class="p" data-group-id="7067547641-9">)</span><span class="w">
</span><span class="c1"># schemaless</span><span class="w">
</span><span class="p" data-group-id="1094326912-10">{</span><span class="mi">100_000</span><span class="p">,</span><span class="w"> </span><span class="no">nil</span><span class="p" data-group-id="1094326912-10">}</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nc">Repo</span><span class="o">.</span><span class="n">insert_stream</span><span class="p" data-group-id="1094326912-11">(</span><span class="s">&quot;ecto_ch_demo&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">rows</span><span class="p">,</span><span class="w"> </span><span class="ss">types</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="1094326912-12">[</span><span class="ss">a</span><span class="p">:</span><span class="w"> </span><span class="nc">Ch.Types</span><span class="o">.</span><span class="n">u64</span><span class="p" data-group-id="1094326912-13">(</span><span class="p" data-group-id="1094326912-13">)</span><span class="p">,</span><span class="w"> </span><span class="ss">b</span><span class="p">:</span><span class="w"> </span><span class="ss">:string</span><span class="p" data-group-id="1094326912-12">]</span><span class="p" data-group-id="1094326912-11">)</span></code></pre>
</span><span class="p" data-group-id="7067547641-10">{</span><span class="mi">100_000</span><span class="p">,</span><span class="w"> </span><span class="no">nil</span><span class="p" data-group-id="7067547641-10">}</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nc">Repo</span><span class="o">.</span><span class="n">insert_stream</span><span class="p" data-group-id="7067547641-11">(</span><span class="s">&quot;ecto_ch_demo&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">rows</span><span class="p">,</span><span class="w"> </span><span class="ss">types</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="7067547641-12">[</span><span class="ss">a</span><span class="p">:</span><span class="w"> </span><span class="nc">Ch.Types</span><span class="o">.</span><span class="n">u64</span><span class="p" data-group-id="7067547641-13">(</span><span class="p" data-group-id="7067547641-13">)</span><span class="p">,</span><span class="w"> </span><span class="ss">b</span><span class="p">:</span><span class="w"> </span><span class="ss">:string</span><span class="p" data-group-id="7067547641-12">]</span><span class="p" data-group-id="7067547641-11">)</span></code></pre>
</section>
</section>
<section class="detail" id="load/2">

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>
@ -1162,23 +1162,23 @@ pool to disconnect within the given interval.</p><p>See <a href="https://hexdocs
<section class="docstring">
<p>Similar to <a href="#insert_all/2"><code class="inline">insert_all/2</code></a> but with the following differences:</p><ul><li>accepts rows as streams or lists</li><li>sends rows as a chunked request</li><li>doesn't autogenerate ids or does any other preprocessing</li></ul><p>Example:</p><pre><code class="makeup elixir" translate="no"><span class="nc">Repo</span><span class="o">.</span><span class="n">query!</span><span class="p" data-group-id="7371758291-1">(</span><span class="s">&quot;create table ecto_ch_demo(a UInt64, b String) engine Null&quot;</span><span class="p" data-group-id="7371758291-1">)</span><span class="w">
<p>Similar to <a href="#insert_all/2"><code class="inline">insert_all/2</code></a> but with the following differences:</p><ul><li>accepts rows as streams or lists</li><li>sends rows as a chunked request</li><li>doesn't autogenerate ids or does any other preprocessing</li></ul><p>Example:</p><pre><code class="makeup elixir" translate="no"><span class="nc">Repo</span><span class="o">.</span><span class="n">query!</span><span class="p" data-group-id="6740271283-1">(</span><span class="s">&quot;create table ecto_ch_demo(a UInt64, b String) engine Null&quot;</span><span class="p" data-group-id="6740271283-1">)</span><span class="w">
</span><span class="kd">defmodule</span><span class="w"> </span><span class="nc">Demo</span><span class="w"> </span><span class="k" data-group-id="7371758291-2">do</span><span class="w">
</span><span class="kd">defmodule</span><span class="w"> </span><span class="nc">Demo</span><span class="w"> </span><span class="k" data-group-id="6740271283-2">do</span><span class="w">
</span><span class="kn">use</span><span class="w"> </span><span class="nc">Ecto.Schema</span><span class="w">
</span><span class="na">@primary_key</span><span class="w"> </span><span class="no">false</span><span class="w">
</span><span class="n">schema</span><span class="w"> </span><span class="s">&quot;ecto_ch_demo&quot;</span><span class="w"> </span><span class="k" data-group-id="7371758291-3">do</span><span class="w">
</span><span class="n">schema</span><span class="w"> </span><span class="s">&quot;ecto_ch_demo&quot;</span><span class="w"> </span><span class="k" data-group-id="6740271283-3">do</span><span class="w">
</span><span class="n">field</span><span class="w"> </span><span class="ss">:a</span><span class="p">,</span><span class="w"> </span><span class="nc">Ch</span><span class="p">,</span><span class="w"> </span><span class="ss">type</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;UInt64&quot;</span><span class="w">
</span><span class="n">field</span><span class="w"> </span><span class="ss">:b</span><span class="p">,</span><span class="w"> </span><span class="ss">:string</span><span class="w">
</span><span class="k" data-group-id="7371758291-3">end</span><span class="w">
</span><span class="k" data-group-id="7371758291-2">end</span><span class="w">
</span><span class="k" data-group-id="6740271283-3">end</span><span class="w">
</span><span class="k" data-group-id="6740271283-2">end</span><span class="w">
</span><span class="n">rows</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nc">Stream</span><span class="o">.</span><span class="n">map</span><span class="p" data-group-id="7371758291-4">(</span><span class="mi">1</span><span class="o">..</span><span class="mi">100_000</span><span class="p">,</span><span class="w"> </span><span class="k" data-group-id="7371758291-5">fn</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">-&gt;</span><span class="w"> </span><span class="p" data-group-id="7371758291-6">%{</span><span class="ss">a</span><span class="p">:</span><span class="w"> </span><span class="n">i</span><span class="p">,</span><span class="w"> </span><span class="ss">b</span><span class="p">:</span><span class="w"> </span><span class="n">to_string</span><span class="p" data-group-id="7371758291-7">(</span><span class="n">i</span><span class="p" data-group-id="7371758291-7">)</span><span class="p" data-group-id="7371758291-6">}</span><span class="w"> </span><span class="k" data-group-id="7371758291-5">end</span><span class="p" data-group-id="7371758291-4">)</span><span class="w">
</span><span class="p" data-group-id="7371758291-8">{</span><span class="mi">100_000</span><span class="p">,</span><span class="w"> </span><span class="no">nil</span><span class="p" data-group-id="7371758291-8">}</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nc">Repo</span><span class="o">.</span><span class="n">insert_stream</span><span class="p" data-group-id="7371758291-9">(</span><span class="nc">Demo</span><span class="p">,</span><span class="w"> </span><span class="n">rows</span><span class="p" data-group-id="7371758291-9">)</span><span class="w">
</span><span class="n">rows</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nc">Stream</span><span class="o">.</span><span class="n">map</span><span class="p" data-group-id="6740271283-4">(</span><span class="mi">1</span><span class="o">..</span><span class="mi">100_000</span><span class="p">,</span><span class="w"> </span><span class="k" data-group-id="6740271283-5">fn</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">-&gt;</span><span class="w"> </span><span class="p" data-group-id="6740271283-6">%{</span><span class="ss">a</span><span class="p">:</span><span class="w"> </span><span class="n">i</span><span class="p">,</span><span class="w"> </span><span class="ss">b</span><span class="p">:</span><span class="w"> </span><span class="n">to_string</span><span class="p" data-group-id="6740271283-7">(</span><span class="n">i</span><span class="p" data-group-id="6740271283-7">)</span><span class="p" data-group-id="6740271283-6">}</span><span class="w"> </span><span class="k" data-group-id="6740271283-5">end</span><span class="p" data-group-id="6740271283-4">)</span><span class="w">
</span><span class="p" data-group-id="6740271283-8">{</span><span class="mi">100_000</span><span class="p">,</span><span class="w"> </span><span class="no">nil</span><span class="p" data-group-id="6740271283-8">}</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nc">Repo</span><span class="o">.</span><span class="n">insert_stream</span><span class="p" data-group-id="6740271283-9">(</span><span class="nc">Demo</span><span class="p">,</span><span class="w"> </span><span class="n">rows</span><span class="p" data-group-id="6740271283-9">)</span><span class="w">
</span><span class="c1"># schemaless</span><span class="w">
</span><span class="p" data-group-id="7371758291-10">{</span><span class="mi">100_000</span><span class="p">,</span><span class="w"> </span><span class="no">nil</span><span class="p" data-group-id="7371758291-10">}</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nc">Repo</span><span class="o">.</span><span class="n">insert_stream</span><span class="p" data-group-id="7371758291-11">(</span><span class="s">&quot;ecto_ch_demo&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">rows</span><span class="p">,</span><span class="w"> </span><span class="ss">types</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="7371758291-12">[</span><span class="ss">a</span><span class="p">:</span><span class="w"> </span><span class="nc">Ch.Types</span><span class="o">.</span><span class="n">u64</span><span class="p" data-group-id="7371758291-13">(</span><span class="p" data-group-id="7371758291-13">)</span><span class="p">,</span><span class="w"> </span><span class="ss">b</span><span class="p">:</span><span class="w"> </span><span class="ss">:string</span><span class="p" data-group-id="7371758291-12">]</span><span class="p" data-group-id="7371758291-11">)</span></code></pre>
</span><span class="p" data-group-id="6740271283-10">{</span><span class="mi">100_000</span><span class="p">,</span><span class="w"> </span><span class="no">nil</span><span class="p" data-group-id="6740271283-10">}</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nc">Repo</span><span class="o">.</span><span class="n">insert_stream</span><span class="p" data-group-id="6740271283-11">(</span><span class="s">&quot;ecto_ch_demo&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">rows</span><span class="p">,</span><span class="w"> </span><span class="ss">types</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="6740271283-12">[</span><span class="ss">a</span><span class="p">:</span><span class="w"> </span><span class="nc">Ch.Types</span><span class="o">.</span><span class="n">u64</span><span class="p" data-group-id="6740271283-13">(</span><span class="p" data-group-id="6740271283-13">)</span><span class="p">,</span><span class="w"> </span><span class="ss">b</span><span class="p">:</span><span class="w"> </span><span class="ss">:string</span><span class="p" data-group-id="6740271283-12">]</span><span class="p" data-group-id="6740271283-11">)</span></code></pre>
</section>
</section>
<section class="detail" id="load/2">

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>
@ -381,7 +381,7 @@ tables into the format of <code class="inline">imported_*</code> tables for a we
<section class="docstring">
<p>Renders export archive filename.</p><p>Examples:</p><pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="n">archive_filename</span><span class="p" data-group-id="5796017038-1">(</span><span class="s">&quot;plausible.io&quot;</span><span class="p">,</span><span class="w"> </span><span class="c">_created_on</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="ld">~D[2024-12-31]</span><span class="p" data-group-id="5796017038-1">)</span><span class="w">
<p>Renders export archive filename.</p><p>Examples:</p><pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="n">archive_filename</span><span class="p" data-group-id="8554918424-1">(</span><span class="s">&quot;plausible.io&quot;</span><span class="p">,</span><span class="w"> </span><span class="c">_created_on</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="ld">~D[2024-12-31]</span><span class="p" data-group-id="8554918424-1">)</span><span class="w">
</span><span class="s">&quot;plausible_io_20241231.zip&quot;</span></code></pre>
</section>
</section>
@ -404,10 +404,10 @@ tables into the format of <code class="inline">imported_*</code> tables for a we
<section class="docstring">
<p>Safely renders content disposition for an arbitrary export filename.</p><p>Examples:</p><pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="n">content_disposition</span><span class="p" data-group-id="4486932793-1">(</span><span class="s">&quot;plausible_io_20241231.zip&quot;</span><span class="p" data-group-id="4486932793-1">)</span><span class="w">
<p>Safely renders content disposition for an arbitrary export filename.</p><p>Examples:</p><pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="n">content_disposition</span><span class="p" data-group-id="2053051828-1">(</span><span class="s">&quot;plausible_io_20241231.zip&quot;</span><span class="p" data-group-id="2053051828-1">)</span><span class="w">
</span><span class="s">&quot;attachment; filename=</span><span class="se">\&quot;</span><span class="s">plausible_io_20241231.zip</span><span class="se">\&quot;</span><span class="s">&quot;</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="n">content_disposition</span><span class="p" data-group-id="4486932793-2">(</span><span class="s">&quot;📊.zip&quot;</span><span class="p" data-group-id="4486932793-2">)</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="n">content_disposition</span><span class="p" data-group-id="2053051828-2">(</span><span class="s">&quot;📊.zip&quot;</span><span class="p" data-group-id="2053051828-2">)</span><span class="w">
</span><span class="s">&quot;attachment; filename=</span><span class="se">\&quot;</span><span class="s">plausible-export.zip</span><span class="se">\&quot;</span><span class="s">; filename*=utf-8&#39;&#39;%F0%9F%93%8A.zip&quot;</span></code></pre>
</section>
</section>
@ -726,14 +726,14 @@ tables into the format of <code class="inline">imported_*</code> tables for a we
</div>
<p>Creates a streamable Zip archive from the provided (named) Ecto queries.</p><p>Example usage:</p><pre><code class="makeup elixir" translate="no"><span class="p" data-group-id="6207567544-1">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="n">pool</span><span class="p" data-group-id="6207567544-1">}</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nc">Ch</span><span class="o">.</span><span class="n">start_link</span><span class="p" data-group-id="6207567544-2">(</span><span class="ss">pool_size</span><span class="p">:</span><span class="w"> </span><span class="mi">1</span><span class="p" data-group-id="6207567544-2">)</span><span class="w">
<p>Creates a streamable Zip archive from the provided (named) Ecto queries.</p><p>Example usage:</p><pre><code class="makeup elixir" translate="no"><span class="p" data-group-id="4767307924-1">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="n">pool</span><span class="p" data-group-id="4767307924-1">}</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nc">Ch</span><span class="o">.</span><span class="n">start_link</span><span class="p" data-group-id="4767307924-2">(</span><span class="ss">pool_size</span><span class="p">:</span><span class="w"> </span><span class="mi">1</span><span class="p" data-group-id="4767307924-2">)</span><span class="w">
</span><span class="nc">DBConnection</span><span class="o">.</span><span class="n">run</span><span class="p" data-group-id="6207567544-3">(</span><span class="n">pool</span><span class="p">,</span><span class="w"> </span><span class="k" data-group-id="6207567544-4">fn</span><span class="w"> </span><span class="n">conn</span><span class="w"> </span><span class="o">-&gt;</span><span class="w">
</span><span class="nc">DBConnection</span><span class="o">.</span><span class="n">run</span><span class="p" data-group-id="4767307924-3">(</span><span class="n">pool</span><span class="p">,</span><span class="w"> </span><span class="k" data-group-id="4767307924-4">fn</span><span class="w"> </span><span class="n">conn</span><span class="w"> </span><span class="o">-&gt;</span><span class="w">
</span><span class="n">conn</span><span class="w">
</span><span class="o">|&gt;</span><span class="w"> </span><span class="n">stream_archive</span><span class="p" data-group-id="6207567544-5">(</span><span class="n">export_queries</span><span class="p" data-group-id="6207567544-6">(</span><span class="c">_site_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">1</span><span class="p" data-group-id="6207567544-6">)</span><span class="p">,</span><span class="w"> </span><span class="ss">format</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;CSVWithNames&quot;</span><span class="p" data-group-id="6207567544-5">)</span><span class="w">
</span><span class="o">|&gt;</span><span class="w"> </span><span class="nc">Stream</span><span class="o">.</span><span class="n">into</span><span class="p" data-group-id="6207567544-7">(</span><span class="nc">File</span><span class="o">.</span><span class="n">stream!</span><span class="p" data-group-id="6207567544-8">(</span><span class="s">&quot;export.zip&quot;</span><span class="p" data-group-id="6207567544-8">)</span><span class="p" data-group-id="6207567544-7">)</span><span class="w">
</span><span class="o">|&gt;</span><span class="w"> </span><span class="nc">Stream</span><span class="o">.</span><span class="n">run</span><span class="p" data-group-id="6207567544-9">(</span><span class="p" data-group-id="6207567544-9">)</span><span class="w">
</span><span class="k" data-group-id="6207567544-4">end</span><span class="p" data-group-id="6207567544-3">)</span></code></pre>
</span><span class="o">|&gt;</span><span class="w"> </span><span class="n">stream_archive</span><span class="p" data-group-id="4767307924-5">(</span><span class="n">export_queries</span><span class="p" data-group-id="4767307924-6">(</span><span class="c">_site_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">1</span><span class="p" data-group-id="4767307924-6">)</span><span class="p">,</span><span class="w"> </span><span class="ss">format</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;CSVWithNames&quot;</span><span class="p" data-group-id="4767307924-5">)</span><span class="w">
</span><span class="o">|&gt;</span><span class="w"> </span><span class="nc">Stream</span><span class="o">.</span><span class="n">into</span><span class="p" data-group-id="4767307924-7">(</span><span class="nc">File</span><span class="o">.</span><span class="n">stream!</span><span class="p" data-group-id="4767307924-8">(</span><span class="s">&quot;export.zip&quot;</span><span class="p" data-group-id="4767307924-8">)</span><span class="p" data-group-id="4767307924-7">)</span><span class="w">
</span><span class="o">|&gt;</span><span class="w"> </span><span class="nc">Stream</span><span class="o">.</span><span class="n">run</span><span class="p" data-group-id="4767307924-9">(</span><span class="p" data-group-id="4767307924-9">)</span><span class="w">
</span><span class="k" data-group-id="4767307924-4">end</span><span class="p" data-group-id="4767307924-3">)</span></code></pre>
</section>
</section>

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>
@ -260,8 +260,8 @@ and MaxMind license key.</p></div>
</a>
<span class="text">Examples</span>
</h2>
<p> In the case of a DB-IP database:</p><pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="n">database_type</span><span class="p" data-group-id="5310408361-1">(</span><span class="p" data-group-id="5310408361-1">)</span><span class="w">
</span><span class="s">&quot;DBIP-City-Lite&quot;</span></code></pre><p> In the case of a MaxMind database:</p><pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="n">database_type</span><span class="p" data-group-id="8665406659-1">(</span><span class="p" data-group-id="8665406659-1">)</span><span class="w">
<p> In the case of a DB-IP database:</p><pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="n">database_type</span><span class="p" data-group-id="8124923421-1">(</span><span class="p" data-group-id="8124923421-1">)</span><span class="w">
</span><span class="s">&quot;DBIP-City-Lite&quot;</span></code></pre><p> In the case of a MaxMind database:</p><pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="n">database_type</span><span class="p" data-group-id="8997245982-1">(</span><span class="p" data-group-id="8997245982-1">)</span><span class="w">
</span><span class="s">&quot;GeoLite2-City&quot;</span></code></pre>
</section>
</section>
@ -302,8 +302,8 @@ asynchronously.</p></li></ul><h2 id="load_db/1-examples" class="section-heading"
</a>
<span class="text">Examples</span>
</h2>
<p> Loading from a local file:</p><pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="n">load_db</span><span class="p" data-group-id="9655073758-1">(</span><span class="ss">path</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;/etc/plausible/dbip-city.mmdb&quot;</span><span class="p" data-group-id="9655073758-1">)</span><span class="w">
</span><span class="ss">:ok</span></code></pre><p> Downloading a MaxMind DB (this license key is no longer active):</p><pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="n">load_db</span><span class="p" data-group-id="3726026887-1">(</span><span class="ss">license_key</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;LNpsJCCKPis6XvBP&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">edition</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;GeoLite2-City&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">async</span><span class="p">:</span><span class="w"> </span><span class="no">true</span><span class="p" data-group-id="3726026887-1">)</span><span class="w">
<p> Loading from a local file:</p><pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="n">load_db</span><span class="p" data-group-id="7825450255-1">(</span><span class="ss">path</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;/etc/plausible/dbip-city.mmdb&quot;</span><span class="p" data-group-id="7825450255-1">)</span><span class="w">
</span><span class="ss">:ok</span></code></pre><p> Downloading a MaxMind DB (this license key is no longer active):</p><pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="n">load_db</span><span class="p" data-group-id="9510983076-1">(</span><span class="ss">license_key</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;LNpsJCCKPis6XvBP&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">edition</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;GeoLite2-City&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">async</span><span class="p">:</span><span class="w"> </span><span class="no">true</span><span class="p" data-group-id="9510983076-1">)</span><span class="w">
</span><span class="ss">:ok</span></code></pre>
</section>
</section>
@ -332,21 +332,21 @@ asynchronously.</p></li></ul><h2 id="load_db/1-examples" class="section-heading"
</a>
<span class="text">Examples</span>
</h2>
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="n">lookup</span><span class="p" data-group-id="7572582803-1">(</span><span class="s">&quot;8.7.6.5&quot;</span><span class="p" data-group-id="7572582803-1">)</span><span class="w">
</span><span class="p" data-group-id="7572582803-2">%{</span><span class="w">
</span><span class="s">&quot;city&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="p" data-group-id="7572582803-3">%{</span><span class="w">
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="n">lookup</span><span class="p" data-group-id="0783494165-1">(</span><span class="s">&quot;8.7.6.5&quot;</span><span class="p" data-group-id="0783494165-1">)</span><span class="w">
</span><span class="p" data-group-id="0783494165-2">%{</span><span class="w">
</span><span class="s">&quot;city&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="p" data-group-id="0783494165-3">%{</span><span class="w">
</span><span class="s">&quot;geoname_id&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="mi">5349755</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;names&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="p" data-group-id="7572582803-4">%{</span><span class="w">
</span><span class="s">&quot;names&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="p" data-group-id="0783494165-4">%{</span><span class="w">
</span><span class="s">&quot;de&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="s">&quot;Fontana&quot;</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;en&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="s">&quot;Fontana&quot;</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;ja&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="s">&quot;フォンタナ&quot;</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;ru&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="s">&quot;Фонтана&quot;</span><span class="w">
</span><span class="p" data-group-id="7572582803-4">}</span><span class="w">
</span><span class="p" data-group-id="7572582803-3">}</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;continent&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="p" data-group-id="7572582803-5">%{</span><span class="w">
</span><span class="p" data-group-id="0783494165-4">}</span><span class="w">
</span><span class="p" data-group-id="0783494165-3">}</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;continent&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="p" data-group-id="0783494165-5">%{</span><span class="w">
</span><span class="s">&quot;code&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="s">&quot;NA&quot;</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;geoname_id&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="mi">6255149</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;names&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="p" data-group-id="7572582803-6">%{</span><span class="w">
</span><span class="s">&quot;names&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="p" data-group-id="0783494165-6">%{</span><span class="w">
</span><span class="s">&quot;de&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="s">&quot;Nordamerika&quot;</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;en&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="s">&quot;North America&quot;</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;es&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="s">&quot;Norteamérica&quot;</span><span class="p">,</span><span class="w">
@ -355,12 +355,12 @@ asynchronously.</p></li></ul><h2 id="load_db/1-examples" class="section-heading"
</span><span class="s">&quot;pt-BR&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="s">&quot;América do Norte&quot;</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;ru&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="s">&quot;Северная Америка&quot;</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;zh-CN&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="s">&quot;北美洲&quot;</span><span class="w">
</span><span class="p" data-group-id="7572582803-6">}</span><span class="w">
</span><span class="p" data-group-id="7572582803-5">}</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;country&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="p" data-group-id="7572582803-7">%{</span><span class="w">
</span><span class="p" data-group-id="0783494165-6">}</span><span class="w">
</span><span class="p" data-group-id="0783494165-5">}</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;country&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="p" data-group-id="0783494165-7">%{</span><span class="w">
</span><span class="s">&quot;geoname_id&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="mi">6252001</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;iso_code&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="s">&quot;US&quot;</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;names&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="p" data-group-id="7572582803-8">%{</span><span class="w">
</span><span class="s">&quot;names&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="p" data-group-id="0783494165-8">%{</span><span class="w">
</span><span class="s">&quot;de&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="s">&quot;Vereinigte Staaten&quot;</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;en&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="s">&quot;United States&quot;</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;es&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="s">&quot;Estados Unidos&quot;</span><span class="p">,</span><span class="w">
@ -369,20 +369,20 @@ asynchronously.</p></li></ul><h2 id="load_db/1-examples" class="section-heading"
</span><span class="s">&quot;pt-BR&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="s">&quot;EUA&quot;</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;ru&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="s">&quot;США&quot;</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;zh-CN&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="s">&quot;美国&quot;</span><span class="w">
</span><span class="p" data-group-id="7572582803-8">}</span><span class="w">
</span><span class="p" data-group-id="7572582803-7">}</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;location&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="p" data-group-id="7572582803-9">%{</span><span class="w">
</span><span class="p" data-group-id="0783494165-8">}</span><span class="w">
</span><span class="p" data-group-id="0783494165-7">}</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;location&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="p" data-group-id="0783494165-9">%{</span><span class="w">
</span><span class="s">&quot;accuracy_radius&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="mi">50</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;latitude&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="mf">34.1211</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;longitude&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="o">-</span><span class="mf">117.4362</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;metro_code&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="mi">803</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;time_zone&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="s">&quot;America/Los_Angeles&quot;</span><span class="w">
</span><span class="p" data-group-id="7572582803-9">}</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;postal&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="p" data-group-id="7572582803-10">%{</span><span class="s">&quot;code&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="s">&quot;92336&quot;</span><span class="p" data-group-id="7572582803-10">}</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;registered_country&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="p" data-group-id="7572582803-11">%{</span><span class="w">
</span><span class="p" data-group-id="0783494165-9">}</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;postal&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="p" data-group-id="0783494165-10">%{</span><span class="s">&quot;code&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="s">&quot;92336&quot;</span><span class="p" data-group-id="0783494165-10">}</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;registered_country&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="p" data-group-id="0783494165-11">%{</span><span class="w">
</span><span class="s">&quot;geoname_id&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="mi">6252001</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;iso_code&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="s">&quot;US&quot;</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;names&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="p" data-group-id="7572582803-12">%{</span><span class="w">
</span><span class="s">&quot;names&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="p" data-group-id="0783494165-12">%{</span><span class="w">
</span><span class="s">&quot;de&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="s">&quot;Vereinigte Staaten&quot;</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;en&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="s">&quot;United States&quot;</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;es&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="s">&quot;Estados Unidos&quot;</span><span class="p">,</span><span class="w">
@ -391,13 +391,13 @@ asynchronously.</p></li></ul><h2 id="load_db/1-examples" class="section-heading"
</span><span class="s">&quot;pt-BR&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="s">&quot;EUA&quot;</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;ru&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="s">&quot;США&quot;</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;zh-CN&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="s">&quot;美国&quot;</span><span class="w">
</span><span class="p" data-group-id="7572582803-12">}</span><span class="w">
</span><span class="p" data-group-id="7572582803-11">}</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;subdivisions&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="p" data-group-id="7572582803-13">[</span><span class="w">
</span><span class="p" data-group-id="7572582803-14">%{</span><span class="w">
</span><span class="p" data-group-id="0783494165-12">}</span><span class="w">
</span><span class="p" data-group-id="0783494165-11">}</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;subdivisions&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="p" data-group-id="0783494165-13">[</span><span class="w">
</span><span class="p" data-group-id="0783494165-14">%{</span><span class="w">
</span><span class="s">&quot;geoname_id&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="mi">5332921</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;iso_code&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="s">&quot;CA&quot;</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;names&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="p" data-group-id="7572582803-15">%{</span><span class="w">
</span><span class="s">&quot;names&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="p" data-group-id="0783494165-15">%{</span><span class="w">
</span><span class="s">&quot;de&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="s">&quot;Kalifornien&quot;</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;en&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="s">&quot;California&quot;</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;es&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="s">&quot;California&quot;</span><span class="p">,</span><span class="w">
@ -406,10 +406,10 @@ asynchronously.</p></li></ul><h2 id="load_db/1-examples" class="section-heading"
</span><span class="s">&quot;pt-BR&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="s">&quot;Califórnia&quot;</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;ru&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="s">&quot;Калифорния&quot;</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;zh-CN&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="s">&quot;加州&quot;</span><span class="w">
</span><span class="p" data-group-id="7572582803-15">}</span><span class="w">
</span><span class="p" data-group-id="7572582803-14">}</span><span class="w">
</span><span class="p" data-group-id="7572582803-13">]</span><span class="w">
</span><span class="p" data-group-id="7572582803-2">}</span></code></pre>
</span><span class="p" data-group-id="0783494165-15">}</span><span class="w">
</span><span class="p" data-group-id="0783494165-14">}</span><span class="w">
</span><span class="p" data-group-id="0783494165-13">]</span><span class="w">
</span><span class="p" data-group-id="0783494165-2">}</span></code></pre>
</section>
</section>

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>
@ -1153,23 +1153,23 @@ pool to disconnect within the given interval.</p><p>See <a href="https://hexdocs
<section class="docstring">
<p>Similar to <a href="#insert_all/2"><code class="inline">insert_all/2</code></a> but with the following differences:</p><ul><li>accepts rows as streams or lists</li><li>sends rows as a chunked request</li><li>doesn't autogenerate ids or does any other preprocessing</li></ul><p>Example:</p><pre><code class="makeup elixir" translate="no"><span class="nc">Repo</span><span class="o">.</span><span class="n">query!</span><span class="p" data-group-id="1218218278-1">(</span><span class="s">&quot;create table ecto_ch_demo(a UInt64, b String) engine Null&quot;</span><span class="p" data-group-id="1218218278-1">)</span><span class="w">
<p>Similar to <a href="#insert_all/2"><code class="inline">insert_all/2</code></a> but with the following differences:</p><ul><li>accepts rows as streams or lists</li><li>sends rows as a chunked request</li><li>doesn't autogenerate ids or does any other preprocessing</li></ul><p>Example:</p><pre><code class="makeup elixir" translate="no"><span class="nc">Repo</span><span class="o">.</span><span class="n">query!</span><span class="p" data-group-id="3041947285-1">(</span><span class="s">&quot;create table ecto_ch_demo(a UInt64, b String) engine Null&quot;</span><span class="p" data-group-id="3041947285-1">)</span><span class="w">
</span><span class="kd">defmodule</span><span class="w"> </span><span class="nc">Demo</span><span class="w"> </span><span class="k" data-group-id="1218218278-2">do</span><span class="w">
</span><span class="kd">defmodule</span><span class="w"> </span><span class="nc">Demo</span><span class="w"> </span><span class="k" data-group-id="3041947285-2">do</span><span class="w">
</span><span class="kn">use</span><span class="w"> </span><span class="nc">Ecto.Schema</span><span class="w">
</span><span class="na">@primary_key</span><span class="w"> </span><span class="no">false</span><span class="w">
</span><span class="n">schema</span><span class="w"> </span><span class="s">&quot;ecto_ch_demo&quot;</span><span class="w"> </span><span class="k" data-group-id="1218218278-3">do</span><span class="w">
</span><span class="n">schema</span><span class="w"> </span><span class="s">&quot;ecto_ch_demo&quot;</span><span class="w"> </span><span class="k" data-group-id="3041947285-3">do</span><span class="w">
</span><span class="n">field</span><span class="w"> </span><span class="ss">:a</span><span class="p">,</span><span class="w"> </span><span class="nc">Ch</span><span class="p">,</span><span class="w"> </span><span class="ss">type</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;UInt64&quot;</span><span class="w">
</span><span class="n">field</span><span class="w"> </span><span class="ss">:b</span><span class="p">,</span><span class="w"> </span><span class="ss">:string</span><span class="w">
</span><span class="k" data-group-id="1218218278-3">end</span><span class="w">
</span><span class="k" data-group-id="1218218278-2">end</span><span class="w">
</span><span class="k" data-group-id="3041947285-3">end</span><span class="w">
</span><span class="k" data-group-id="3041947285-2">end</span><span class="w">
</span><span class="n">rows</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nc">Stream</span><span class="o">.</span><span class="n">map</span><span class="p" data-group-id="1218218278-4">(</span><span class="mi">1</span><span class="o">..</span><span class="mi">100_000</span><span class="p">,</span><span class="w"> </span><span class="k" data-group-id="1218218278-5">fn</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">-&gt;</span><span class="w"> </span><span class="p" data-group-id="1218218278-6">%{</span><span class="ss">a</span><span class="p">:</span><span class="w"> </span><span class="n">i</span><span class="p">,</span><span class="w"> </span><span class="ss">b</span><span class="p">:</span><span class="w"> </span><span class="n">to_string</span><span class="p" data-group-id="1218218278-7">(</span><span class="n">i</span><span class="p" data-group-id="1218218278-7">)</span><span class="p" data-group-id="1218218278-6">}</span><span class="w"> </span><span class="k" data-group-id="1218218278-5">end</span><span class="p" data-group-id="1218218278-4">)</span><span class="w">
</span><span class="p" data-group-id="1218218278-8">{</span><span class="mi">100_000</span><span class="p">,</span><span class="w"> </span><span class="no">nil</span><span class="p" data-group-id="1218218278-8">}</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nc">Repo</span><span class="o">.</span><span class="n">insert_stream</span><span class="p" data-group-id="1218218278-9">(</span><span class="nc">Demo</span><span class="p">,</span><span class="w"> </span><span class="n">rows</span><span class="p" data-group-id="1218218278-9">)</span><span class="w">
</span><span class="n">rows</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nc">Stream</span><span class="o">.</span><span class="n">map</span><span class="p" data-group-id="3041947285-4">(</span><span class="mi">1</span><span class="o">..</span><span class="mi">100_000</span><span class="p">,</span><span class="w"> </span><span class="k" data-group-id="3041947285-5">fn</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">-&gt;</span><span class="w"> </span><span class="p" data-group-id="3041947285-6">%{</span><span class="ss">a</span><span class="p">:</span><span class="w"> </span><span class="n">i</span><span class="p">,</span><span class="w"> </span><span class="ss">b</span><span class="p">:</span><span class="w"> </span><span class="n">to_string</span><span class="p" data-group-id="3041947285-7">(</span><span class="n">i</span><span class="p" data-group-id="3041947285-7">)</span><span class="p" data-group-id="3041947285-6">}</span><span class="w"> </span><span class="k" data-group-id="3041947285-5">end</span><span class="p" data-group-id="3041947285-4">)</span><span class="w">
</span><span class="p" data-group-id="3041947285-8">{</span><span class="mi">100_000</span><span class="p">,</span><span class="w"> </span><span class="no">nil</span><span class="p" data-group-id="3041947285-8">}</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nc">Repo</span><span class="o">.</span><span class="n">insert_stream</span><span class="p" data-group-id="3041947285-9">(</span><span class="nc">Demo</span><span class="p">,</span><span class="w"> </span><span class="n">rows</span><span class="p" data-group-id="3041947285-9">)</span><span class="w">
</span><span class="c1"># schemaless</span><span class="w">
</span><span class="p" data-group-id="1218218278-10">{</span><span class="mi">100_000</span><span class="p">,</span><span class="w"> </span><span class="no">nil</span><span class="p" data-group-id="1218218278-10">}</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nc">Repo</span><span class="o">.</span><span class="n">insert_stream</span><span class="p" data-group-id="1218218278-11">(</span><span class="s">&quot;ecto_ch_demo&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">rows</span><span class="p">,</span><span class="w"> </span><span class="ss">types</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="1218218278-12">[</span><span class="ss">a</span><span class="p">:</span><span class="w"> </span><span class="nc">Ch.Types</span><span class="o">.</span><span class="n">u64</span><span class="p" data-group-id="1218218278-13">(</span><span class="p" data-group-id="1218218278-13">)</span><span class="p">,</span><span class="w"> </span><span class="ss">b</span><span class="p">:</span><span class="w"> </span><span class="ss">:string</span><span class="p" data-group-id="1218218278-12">]</span><span class="p" data-group-id="1218218278-11">)</span></code></pre>
</span><span class="p" data-group-id="3041947285-10">{</span><span class="mi">100_000</span><span class="p">,</span><span class="w"> </span><span class="no">nil</span><span class="p" data-group-id="3041947285-10">}</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nc">Repo</span><span class="o">.</span><span class="n">insert_stream</span><span class="p" data-group-id="3041947285-11">(</span><span class="s">&quot;ecto_ch_demo&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">rows</span><span class="p">,</span><span class="w"> </span><span class="ss">types</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="3041947285-12">[</span><span class="ss">a</span><span class="p">:</span><span class="w"> </span><span class="nc">Ch.Types</span><span class="o">.</span><span class="n">u64</span><span class="p" data-group-id="3041947285-13">(</span><span class="p" data-group-id="3041947285-13">)</span><span class="p">,</span><span class="w"> </span><span class="ss">b</span><span class="p">:</span><span class="w"> </span><span class="ss">:string</span><span class="p" data-group-id="3041947285-12">]</span><span class="p" data-group-id="3041947285-11">)</span></code></pre>
</section>
</section>
<section class="detail" id="load/2">

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>

View File

@ -14,7 +14,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
<script src="dist/sidebar_items-E3A5DD79.js"></script>
<script src="dist/sidebar_items-808B55A7.js"></script>
<script src="docs_config.js"></script>
@ -257,13 +257,13 @@ or from local storage for which it uses <a href="https://clickhouse.com/docs/en/
</div>
<p>Extracts min/max date range from a list of uploads.</p><p>Examples:</p><pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="n">date_range</span><span class="p" data-group-id="8158191042-1">(</span><span class="p" data-group-id="8158191042-2">[</span><span class="w">
</span><span class="gp unselectable">...&gt; </span><span class="w"> </span><span class="p" data-group-id="8158191042-3">%{</span><span class="s">&quot;filename&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="s">&quot;imported_devices_20190101_20210101.csv&quot;</span><span class="p" data-group-id="8158191042-3">}</span><span class="p">,</span><span class="w">
<p>Extracts min/max date range from a list of uploads.</p><p>Examples:</p><pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="n">date_range</span><span class="p" data-group-id="8460567941-1">(</span><span class="p" data-group-id="8460567941-2">[</span><span class="w">
</span><span class="gp unselectable">...&gt; </span><span class="w"> </span><span class="p" data-group-id="8460567941-3">%{</span><span class="s">&quot;filename&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="s">&quot;imported_devices_20190101_20210101.csv&quot;</span><span class="p" data-group-id="8460567941-3">}</span><span class="p">,</span><span class="w">
</span><span class="gp unselectable">...&gt; </span><span class="w"> </span><span class="s">&quot;pages_20200101_20220101.csv&quot;</span><span class="w">
</span><span class="gp unselectable">...&gt; </span><span class="p" data-group-id="8158191042-2">]</span><span class="p" data-group-id="8158191042-1">)</span><span class="w">
</span><span class="nc">Date</span><span class="o">.</span><span class="n">range</span><span class="p" data-group-id="8158191042-4">(</span><span class="ld">~D[2019-01-01]</span><span class="p">,</span><span class="w"> </span><span class="ld">~D[2022-01-01]</span><span class="p" data-group-id="8158191042-4">)</span><span class="w">
</span><span class="gp unselectable">...&gt; </span><span class="p" data-group-id="8460567941-2">]</span><span class="p" data-group-id="8460567941-1">)</span><span class="w">
</span><span class="nc">Date</span><span class="o">.</span><span class="n">range</span><span class="p" data-group-id="8460567941-4">(</span><span class="ld">~D[2019-01-01]</span><span class="p">,</span><span class="w"> </span><span class="ld">~D[2022-01-01]</span><span class="p" data-group-id="8460567941-4">)</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="n">date_range</span><span class="p" data-group-id="8158191042-5">(</span><span class="p" data-group-id="8158191042-6">[</span><span class="p" data-group-id="8158191042-6">]</span><span class="p" data-group-id="8158191042-5">)</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="n">date_range</span><span class="p" data-group-id="8460567941-5">(</span><span class="p" data-group-id="8460567941-6">[</span><span class="p" data-group-id="8460567941-6">]</span><span class="p" data-group-id="8460567941-5">)</span><span class="w">
</span><span class="no">nil</span></code></pre>
</section>
</section>
@ -292,13 +292,13 @@ or from local storage for which it uses <a href="https://clickhouse.com/docs/en/
</div>
<p>Extracts the table name from the provided filename.</p><p>Raises if the filename doesn't conform to the expected format.</p><p>Examples:</p><pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="n">extract_table</span><span class="p" data-group-id="0621576268-1">(</span><span class="s">&quot;my_data.csv&quot;</span><span class="p" data-group-id="0621576268-1">)</span><span class="w">
<p>Extracts the table name from the provided filename.</p><p>Raises if the filename doesn't conform to the expected format.</p><p>Examples:</p><pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="n">extract_table</span><span class="p" data-group-id="2359462268-1">(</span><span class="s">&quot;my_data.csv&quot;</span><span class="p" data-group-id="2359462268-1">)</span><span class="w">
</span><span class="gt">** (ArgumentError) invalid filename</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="n">extract_table</span><span class="p" data-group-id="0621576268-2">(</span><span class="s">&quot;imported_devices_00010101_20250101.csv&quot;</span><span class="p" data-group-id="0621576268-2">)</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="n">extract_table</span><span class="p" data-group-id="2359462268-2">(</span><span class="s">&quot;imported_devices_00010101_20250101.csv&quot;</span><span class="p" data-group-id="2359462268-2">)</span><span class="w">
</span><span class="s">&quot;imported_devices&quot;</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="n">extract_table</span><span class="p" data-group-id="0621576268-3">(</span><span class="s">&quot;devices_00010101_20250101.csv&quot;</span><span class="p" data-group-id="0621576268-3">)</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="n">extract_table</span><span class="p" data-group-id="2359462268-3">(</span><span class="s">&quot;devices_00010101_20250101.csv&quot;</span><span class="p" data-group-id="2359462268-3">)</span><span class="w">
</span><span class="s">&quot;imported_devices&quot;</span></code></pre>
</section>
</section>
@ -321,8 +321,8 @@ or from local storage for which it uses <a href="https://clickhouse.com/docs/en/
<section class="docstring">
<p>Returns local directory for CSV imports storage.</p><p>Builds upon <code class="inline">$DATA_DIR</code> or <code class="inline">$PERSISTENT_CACHE_DIR</code> (if set) and falls back to /tmp</p><p>Examples:</p><pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="n">local_dir</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">local_dir</span><span class="p" data-group-id="5020896205-1">(</span><span class="c">_site_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">37</span><span class="p" data-group-id="5020896205-1">)</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">String</span><span class="o">.</span><span class="n">ends_with?</span><span class="p" data-group-id="5020896205-2">(</span><span class="n">local_dir</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;/plausible-imports/37&quot;</span><span class="p" data-group-id="5020896205-2">)</span><span class="w">
<p>Returns local directory for CSV imports storage.</p><p>Builds upon <code class="inline">$DATA_DIR</code> or <code class="inline">$PERSISTENT_CACHE_DIR</code> (if set) and falls back to /tmp</p><p>Examples:</p><pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="n">local_dir</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">local_dir</span><span class="p" data-group-id="2562628601-1">(</span><span class="c">_site_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">37</span><span class="p" data-group-id="2562628601-1">)</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">String</span><span class="o">.</span><span class="n">ends_with?</span><span class="p" data-group-id="2562628601-2">(</span><span class="n">local_dir</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;/plausible-imports/37&quot;</span><span class="p" data-group-id="2562628601-2">)</span><span class="w">
</span><span class="no">true</span></code></pre>
</section>
</section>
@ -382,14 +382,14 @@ or from local storage for which it uses <a href="https://clickhouse.com/docs/en/
</div>
<p>Extracts table name and min/max dates from the filename.</p><p>Examples:</p><pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="n">parse_filename!</span><span class="p" data-group-id="6709916984-1">(</span><span class="s">&quot;my_data.csv&quot;</span><span class="p" data-group-id="6709916984-1">)</span><span class="w">
<p>Extracts table name and min/max dates from the filename.</p><p>Examples:</p><pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="n">parse_filename!</span><span class="p" data-group-id="3250229229-1">(</span><span class="s">&quot;my_data.csv&quot;</span><span class="p" data-group-id="3250229229-1">)</span><span class="w">
</span><span class="gt">** (ArgumentError) invalid filename</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="n">parse_filename!</span><span class="p" data-group-id="6709916984-2">(</span><span class="s">&quot;imported_devices_00010101_20250101.csv&quot;</span><span class="p" data-group-id="6709916984-2">)</span><span class="w">
</span><span class="p" data-group-id="6709916984-3">{</span><span class="s">&quot;imported_devices&quot;</span><span class="p">,</span><span class="w"> </span><span class="ld">~D[0001-01-01]</span><span class="p">,</span><span class="w"> </span><span class="ld">~D[2025-01-01]</span><span class="p" data-group-id="6709916984-3">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="n">parse_filename!</span><span class="p" data-group-id="3250229229-2">(</span><span class="s">&quot;imported_devices_00010101_20250101.csv&quot;</span><span class="p" data-group-id="3250229229-2">)</span><span class="w">
</span><span class="p" data-group-id="3250229229-3">{</span><span class="s">&quot;imported_devices&quot;</span><span class="p">,</span><span class="w"> </span><span class="ld">~D[0001-01-01]</span><span class="p">,</span><span class="w"> </span><span class="ld">~D[2025-01-01]</span><span class="p" data-group-id="3250229229-3">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="n">parse_filename!</span><span class="p" data-group-id="6709916984-4">(</span><span class="s">&quot;devices_00010101_20250101.csv&quot;</span><span class="p" data-group-id="6709916984-4">)</span><span class="w">
</span><span class="p" data-group-id="6709916984-5">{</span><span class="s">&quot;imported_devices&quot;</span><span class="p">,</span><span class="w"> </span><span class="ld">~D[0001-01-01]</span><span class="p">,</span><span class="w"> </span><span class="ld">~D[2025-01-01]</span><span class="p" data-group-id="6709916984-5">}</span></code></pre>
</span><span class="gp unselectable">iex&gt; </span><span class="n">parse_filename!</span><span class="p" data-group-id="3250229229-4">(</span><span class="s">&quot;devices_00010101_20250101.csv&quot;</span><span class="p" data-group-id="3250229229-4">)</span><span class="w">
</span><span class="p" data-group-id="3250229229-5">{</span><span class="s">&quot;imported_devices&quot;</span><span class="p">,</span><span class="w"> </span><span class="ld">~D[0001-01-01]</span><span class="p">,</span><span class="w"> </span><span class="ld">~D[2025-01-01]</span><span class="p" data-group-id="3250229229-5">}</span></code></pre>
</section>
</section>
<section class="detail" id="valid_filename?/1">
@ -417,13 +417,13 @@ or from local storage for which it uses <a href="https://clickhouse.com/docs/en/
</div>
<p>Checks if the provided filename conforms to the expected format.</p><p>Examples:</p><pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="n">valid_filename?</span><span class="p" data-group-id="6064015575-1">(</span><span class="s">&quot;my_data.csv&quot;</span><span class="p" data-group-id="6064015575-1">)</span><span class="w">
<p>Checks if the provided filename conforms to the expected format.</p><p>Examples:</p><pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="n">valid_filename?</span><span class="p" data-group-id="0459248637-1">(</span><span class="s">&quot;my_data.csv&quot;</span><span class="p" data-group-id="0459248637-1">)</span><span class="w">
</span><span class="no">false</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="n">valid_filename?</span><span class="p" data-group-id="6064015575-2">(</span><span class="s">&quot;imported_devices_00010101_20250101.csv&quot;</span><span class="p" data-group-id="6064015575-2">)</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="n">valid_filename?</span><span class="p" data-group-id="0459248637-2">(</span><span class="s">&quot;imported_devices_00010101_20250101.csv&quot;</span><span class="p" data-group-id="0459248637-2">)</span><span class="w">
</span><span class="no">true</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="n">valid_filename?</span><span class="p" data-group-id="6064015575-3">(</span><span class="s">&quot;devices_00010101_20250101.csv&quot;</span><span class="p" data-group-id="6064015575-3">)</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="n">valid_filename?</span><span class="p" data-group-id="0459248637-3">(</span><span class="s">&quot;devices_00010101_20250101.csv&quot;</span><span class="p" data-group-id="0459248637-3">)</span><span class="w">
</span><span class="no">true</span></code></pre>
</section>
</section>

Some files were not shown because too many files have changed in this diff Show More