This commit is contained in:
vinibrsl 2023-07-24 09:33:21 +00:00
parent 0c9b71f547
commit 9f8b04ce77
218 changed files with 1100 additions and 1025 deletions

4
.build
View File

@ -236,8 +236,8 @@ dist/merriweather-latin-ext-300-normal-K6L27CZ5.woff2
dist/merriweather-vietnamese-300-italic-EHHNZPUO.woff2 dist/merriweather-vietnamese-300-italic-EHHNZPUO.woff2
dist/merriweather-vietnamese-300-normal-U376L4Z4.woff2 dist/merriweather-vietnamese-300-normal-U376L4Z4.woff2
dist/remixicon-NKANDIL5.woff2 dist/remixicon-NKANDIL5.woff2
dist/search_items-5710C136.js dist/search_items-EA6D46AD.js
dist/sidebar_items-625D214B.js dist/sidebar_items-D1A5539C.js
index.html index.html
readme.html readme.html
search.html search.html

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>
@ -1116,23 +1116,23 @@ pool to disconnect within the given interval.</p><p>See <a href="https://hexdocs
<section class="docstring"> <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="8257444827-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="8257444827-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="4957912722-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="4957912722-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="8257444827-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="4957912722-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="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="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="8257444827-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="4957912722-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">: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="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="8257444827-3">end</span><span class="w"> </span><span class="k" data-group-id="4957912722-3">end</span><span class="w">
</span><span class="k" data-group-id="8257444827-2">end</span><span class="w"> </span><span class="k" data-group-id="4957912722-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="8257444827-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="8257444827-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="8257444827-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="8257444827-7">(</span><span class="n">i</span><span class="p" data-group-id="8257444827-7">)</span><span class="p" data-group-id="8257444827-6">}</span><span class="w"> </span><span class="k" data-group-id="8257444827-5">end</span><span class="p" data-group-id="8257444827-4">)</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="4957912722-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="4957912722-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="4957912722-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="4957912722-7">(</span><span class="n">i</span><span class="p" data-group-id="4957912722-7">)</span><span class="p" data-group-id="4957912722-6">}</span><span class="w"> </span><span class="k" data-group-id="4957912722-5">end</span><span class="p" data-group-id="4957912722-4">)</span><span class="w">
</span><span class="p" data-group-id="8257444827-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="8257444827-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="8257444827-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="8257444827-9">)</span><span class="w"> </span><span class="p" data-group-id="4957912722-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="4957912722-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="4957912722-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="4957912722-9">)</span><span class="w">
</span><span class="c1"># schemaless</span><span class="w"> </span><span class="c1"># schemaless</span><span class="w">
</span><span class="p" data-group-id="8257444827-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="8257444827-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="8257444827-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="8257444827-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="8257444827-13">(</span><span class="p" data-group-id="8257444827-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="8257444827-12">]</span><span class="p" data-group-id="8257444827-11">)</span></code></pre> </span><span class="p" data-group-id="4957912722-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="4957912722-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="4957912722-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="4957912722-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="4957912722-13">(</span><span class="p" data-group-id="4957912722-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="4957912722-12">]</span><span class="p" data-group-id="4957912722-11">)</span></code></pre>
</section> </section>
</section> </section>
<section class="detail" id="load/2"> <section class="detail" id="load/2">

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>
@ -117,9 +117,9 @@ Plausible
<p>Parses HTTP <code class="inline">Accept-Language</code> header values as defined in <p>Parses HTTP <code class="inline">Accept-Language</code> header values as defined in
<a href="https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.4">rfc2616</a>.</p><p>The Accept-Language request-header field is similar to Accept, but restricts <a href="https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.4">rfc2616</a>.</p><p>The Accept-Language request-header field is similar to Accept, but restricts
the set of natural languages that are preferred as a response to the request. 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.36.0/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"> Language tags function are provided in <a href="https://hexdocs.pm/ex_cldr/2.37.2/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="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="4247351913-1">(</span><span class="w"> </span><span class="p" data-group-id="4247351913-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="4247351913-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="4247351913-3">)</span><span class="w"> </span><span class="p" data-group-id="4247351913-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="4247351913-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="4497825992-1">(</span><span class="w"> </span><span class="p" data-group-id="4497825992-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="4497825992-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="4497825992-3">)</span><span class="w"> </span><span class="p" data-group-id="4497825992-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="4497825992-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 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> 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> </section>
@ -145,7 +145,7 @@ quality value defaults to &quot;q=1&quot;. For example,</p><pre><code class="mak
</div> </div>
<div class="summary-synopsis"><p>Parse an <code class="inline">Accept-Language</code> string and return the best match for <div class="summary-synopsis"><p>Parse an <code class="inline">Accept-Language</code> string and return the best match for
a configured <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.html"><code class="inline">Cldr</code></a> locale.</p></div> a configured <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.html"><code class="inline">Cldr</code></a> locale.</p></div>
</div> </div>
@ -210,13 +210,13 @@ Functions
<div class="specs"> <div class="specs">
<pre translate="no"><span class="attribute">@spec</span> best_match(<a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>()) :: <pre translate="no"><span class="attribute">@spec</span> best_match(<a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>()) ::
{:ok, <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.LanguageTag.html#t:t/0">Cldr.LanguageTag.t</a>()} {:ok, <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.LanguageTag.html#t:t/0">Cldr.LanguageTag.t</a>()}
| {:error, {Cldr.AcceptLanguageError | Cldr.NoMatchingLocale, <a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>()}}</pre> | {:error, {Cldr.AcceptLanguageError | Cldr.NoMatchingLocale, <a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>()}}</pre>
</div> </div>
<p>Parse an <code class="inline">Accept-Language</code> string and return the best match for <p>Parse an <code class="inline">Accept-Language</code> string and return the best match for
a configured <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.html"><code class="inline">Cldr</code></a> locale.</p><h2 id="best_match/1-arguments" class="section-heading"> a configured <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.html"><code class="inline">Cldr</code></a> locale.</p><h2 id="best_match/1-arguments" class="section-heading">
<a href="#best_match/1-arguments" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i> <a href="#best_match/1-arguments" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
<p class="sr-only">arguments</p> <p class="sr-only">arguments</p>
</a> </a>
@ -234,54 +234,54 @@ a configured <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.html"><code class="
</a> </a>
Examples Examples
</h2> </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="1700283417-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="1700283417-1">)</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="0542103352-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="0542103352-1">)</span><span class="w">
</span><span class="p" data-group-id="1700283417-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="0542103352-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="1700283417-3">%</span><span class="nc" data-group-id="1700283417-3">Cldr.LanguageTag</span><span class="p" data-group-id="1700283417-3">{</span><span class="w"> </span><span class="p" data-group-id="0542103352-3">%</span><span class="nc" data-group-id="0542103352-3">Cldr.LanguageTag</span><span class="p" data-group-id="0542103352-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">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">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">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="1700283417-4">[</span><span class="p" data-group-id="1700283417-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="0542103352-4">[</span><span class="p" data-group-id="0542103352-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="1700283417-5">%{</span><span class="p" data-group-id="1700283417-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="0542103352-5">%{</span><span class="p" data-group-id="0542103352-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">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">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="1700283417-6">%{</span><span class="p" data-group-id="1700283417-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="0542103352-6">%{</span><span class="p" data-group-id="0542103352-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="1700283417-7">[</span><span class="p" data-group-id="1700283417-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="0542103352-7">[</span><span class="p" data-group-id="0542103352-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">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">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">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">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="1700283417-8">%{</span><span class="p" data-group-id="1700283417-8">}</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="0542103352-8">%{</span><span class="p" data-group-id="0542103352-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="1700283417-9">[</span><span class="p" data-group-id="1700283417-9">]</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="0542103352-9">[</span><span class="p" data-group-id="0542103352-9">]</span><span class="w">
</span><span class="p" data-group-id="1700283417-3">}</span><span class="p" data-group-id="1700283417-2">}</span><span class="w"> </span><span class="p" data-group-id="0542103352-3">}</span><span class="p" data-group-id="0542103352-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="1700283417-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="1700283417-10">)</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="0542103352-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="0542103352-10">)</span><span class="w">
</span><span class="p" data-group-id="1700283417-11">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="0542103352-11">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="1700283417-12">%</span><span class="nc" data-group-id="1700283417-12">Cldr.LanguageTag</span><span class="p" data-group-id="1700283417-12">{</span><span class="w"> </span><span class="p" data-group-id="0542103352-12">%</span><span class="nc" data-group-id="0542103352-12">Cldr.LanguageTag</span><span class="p" data-group-id="0542103352-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">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">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">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="1700283417-13">[</span><span class="p" data-group-id="1700283417-13">]</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="0542103352-13">[</span><span class="p" data-group-id="0542103352-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="1700283417-14">%{</span><span class="p" data-group-id="1700283417-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="0542103352-14">%{</span><span class="p" data-group-id="0542103352-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">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">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="1700283417-15">%{</span><span class="p" data-group-id="1700283417-15">}</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="0542103352-15">%{</span><span class="p" data-group-id="0542103352-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="1700283417-16">[</span><span class="p" data-group-id="1700283417-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="0542103352-16">[</span><span class="p" data-group-id="0542103352-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">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">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">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">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="1700283417-17">%{</span><span class="p" data-group-id="1700283417-17">}</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="0542103352-17">%{</span><span class="p" data-group-id="0542103352-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="1700283417-18">[</span><span class="p" data-group-id="1700283417-18">]</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="0542103352-18">[</span><span class="p" data-group-id="0542103352-18">]</span><span class="w">
</span><span class="p" data-group-id="1700283417-12">}</span><span class="p" data-group-id="1700283417-11">}</span><span class="w"> </span><span class="p" data-group-id="0542103352-12">}</span><span class="p" data-group-id="0542103352-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="1700283417-19">(</span><span class="s">&quot;xx,yy;q=0.3&quot;</span><span class="p" data-group-id="1700283417-19">)</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="0542103352-19">(</span><span class="s">&quot;xx,yy;q=0.3&quot;</span><span class="p" data-group-id="0542103352-19">)</span><span class="w">
</span><span class="p" data-group-id="1700283417-20">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="0542103352-20">{</span><span class="ss">:error</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="1700283417-21">{</span><span class="nc">Cldr.NoMatchingLocale</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="0542103352-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="1700283417-21">}</span><span class="p" data-group-id="1700283417-20">}</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="0542103352-21">}</span><span class="p" data-group-id="0542103352-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="1700283417-22">(</span><span class="s">&quot;invalid_tag&quot;</span><span class="p" data-group-id="1700283417-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">best_match</span><span class="p" data-group-id="0542103352-22">(</span><span class="s">&quot;invalid_tag&quot;</span><span class="p" data-group-id="0542103352-22">)</span><span class="w">
</span><span class="p" data-group-id="1700283417-23">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1700283417-24">{</span><span class="nc">Cldr.LanguageTag.ParseError</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="0542103352-23">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="0542103352-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="1700283417-24">}</span><span class="p" data-group-id="1700283417-23">}</span></code></pre> </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="0542103352-24">}</span><span class="p" data-group-id="0542103352-23">}</span></code></pre>
</section> </section>
</section> </section>
<section class="detail" id="parse/1"> <section class="detail" id="parse/1">
@ -310,7 +310,7 @@ a configured <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.html"><code class="
<pre translate="no"><span class="attribute">@spec</span> parse([{<a href="https://hexdocs.pm/elixir/typespecs.html#basic-types">float</a>(), <a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>()}, ...] | <a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>()) :: <pre translate="no"><span class="attribute">@spec</span> parse([{<a href="https://hexdocs.pm/elixir/typespecs.html#basic-types">float</a>(), <a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>()}, ...] | <a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>()) ::
{:ok, {:ok,
[ [
{<a href="https://hexdocs.pm/elixir/typespecs.html#basic-types">float</a>(), <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.LanguageTag.html#t:t/0">Cldr.LanguageTag.t</a>()} {<a href="https://hexdocs.pm/elixir/typespecs.html#basic-types">float</a>(), <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.LanguageTag.html#t:t/0">Cldr.LanguageTag.t</a>()}
| {:error, {Cldr.InvalidLanguageTag, <a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>()}}, | {:error, {Cldr.InvalidLanguageTag, <a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>()}},
... ...
]} ]}
@ -328,7 +328,7 @@ or tokenized form to return a tuple of the form
</h2> </h2>
<ul><li><p><code class="inline">accept-language</code> is any string in the format defined by <ul><li><p><code class="inline">accept-language</code> is any string in the format defined by
<a href="https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.4">rfc2616</a></p></li><li><p><code class="inline">backend</code> is any module that includes <code class="inline">use Cldr</code> and therefore <a href="https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.4">rfc2616</a></p></li><li><p><code class="inline">backend</code> is any module that includes <code class="inline">use Cldr</code> and therefore
is a <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.html"><code class="inline">Cldr</code></a> backend module</p></li></ul><h2 id="parse/1-returns" class="section-heading"> is a <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.html"><code class="inline">Cldr</code></a> backend module</p></li></ul><h2 id="parse/1-returns" class="section-heading">
<a href="#parse/1-returns" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i> <a href="#parse/1-returns" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
<p class="sr-only">returns</p> <p class="sr-only">returns</p>
</a> </a>
@ -342,95 +342,95 @@ wuth an error tuple for each invalid tag added at the end of the list.</p><h2 id
</a> </a>
Example Example
</h2> </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="6777702066-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="6777702066-1">)</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="3087902714-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="3087902714-1">)</span><span class="w">
</span><span class="p" data-group-id="6777702066-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="3087902714-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="6777702066-3">[</span><span class="w"> </span><span class="p" data-group-id="3087902714-3">[</span><span class="w">
</span><span class="p" data-group-id="6777702066-4">{</span><span class="mf">1.0</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="3087902714-4">{</span><span class="mf">1.0</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="6777702066-5">%</span><span class="nc" data-group-id="6777702066-5">Cldr.LanguageTag</span><span class="p" data-group-id="6777702066-5">{</span><span class="w"> </span><span class="p" data-group-id="3087902714-5">%</span><span class="nc" data-group-id="3087902714-5">Cldr.LanguageTag</span><span class="p" data-group-id="3087902714-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">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">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">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="6777702066-6">[</span><span class="p" data-group-id="6777702066-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="3087902714-6">[</span><span class="p" data-group-id="3087902714-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="6777702066-7">%{</span><span class="p" data-group-id="6777702066-7">}</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="3087902714-7">%{</span><span class="p" data-group-id="3087902714-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">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">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="6777702066-8">%{</span><span class="p" data-group-id="6777702066-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="3087902714-8">%{</span><span class="p" data-group-id="3087902714-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="6777702066-9">[</span><span class="p" data-group-id="6777702066-9">]</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="3087902714-9">[</span><span class="p" data-group-id="3087902714-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">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">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">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">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="6777702066-10">%{</span><span class="p" data-group-id="6777702066-10">}</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="3087902714-10">%{</span><span class="p" data-group-id="3087902714-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="6777702066-11">[</span><span class="p" data-group-id="6777702066-11">]</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="3087902714-11">[</span><span class="p" data-group-id="3087902714-11">]</span><span class="w">
</span><span class="p" data-group-id="6777702066-5">}</span><span class="p" data-group-id="6777702066-4">}</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="3087902714-5">}</span><span class="p" data-group-id="3087902714-4">}</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="6777702066-12">{</span><span class="mf">0.3</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="3087902714-12">{</span><span class="mf">0.3</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="6777702066-13">%</span><span class="nc" data-group-id="6777702066-13">Cldr.LanguageTag</span><span class="p" data-group-id="6777702066-13">{</span><span class="w"> </span><span class="p" data-group-id="3087902714-13">%</span><span class="nc" data-group-id="3087902714-13">Cldr.LanguageTag</span><span class="p" data-group-id="3087902714-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">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">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">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="6777702066-14">[</span><span class="p" data-group-id="6777702066-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="3087902714-14">[</span><span class="p" data-group-id="3087902714-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="6777702066-15">%{</span><span class="p" data-group-id="6777702066-15">}</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="3087902714-15">%{</span><span class="p" data-group-id="3087902714-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">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">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="6777702066-16">%{</span><span class="p" data-group-id="6777702066-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="3087902714-16">%{</span><span class="p" data-group-id="3087902714-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="6777702066-17">[</span><span class="p" data-group-id="6777702066-17">]</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="3087902714-17">[</span><span class="p" data-group-id="3087902714-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">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">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">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">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="6777702066-18">%{</span><span class="p" data-group-id="6777702066-18">}</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="3087902714-18">%{</span><span class="p" data-group-id="3087902714-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="6777702066-19">[</span><span class="p" data-group-id="6777702066-19">]</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="3087902714-19">[</span><span class="p" data-group-id="3087902714-19">]</span><span class="w">
</span><span class="p" data-group-id="6777702066-13">}</span><span class="p" data-group-id="6777702066-12">}</span><span class="w"> </span><span class="p" data-group-id="3087902714-13">}</span><span class="p" data-group-id="3087902714-12">}</span><span class="w">
</span><span class="p" data-group-id="6777702066-3">]</span><span class="p" data-group-id="6777702066-2">}</span><span class="w"> </span><span class="p" data-group-id="3087902714-3">]</span><span class="p" data-group-id="3087902714-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="6777702066-20">(</span><span class="s">&quot;invalid_tag&quot;</span><span class="p" data-group-id="6777702066-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">parse</span><span class="p" data-group-id="3087902714-20">(</span><span class="s">&quot;invalid_tag&quot;</span><span class="p" data-group-id="3087902714-20">)</span><span class="w">
</span><span class="p" data-group-id="6777702066-21">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="3087902714-21">{</span><span class="ss">:error</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="6777702066-22">{</span><span class="nc">Cldr.LanguageTag.ParseError</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="3087902714-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="6777702066-22">}</span><span class="p" data-group-id="6777702066-21">}</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="3087902714-22">}</span><span class="p" data-group-id="3087902714-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="6777702066-23">(</span><span class="s">&quot;da,zh-TW;q=0.3,invalid_tag&quot;</span><span class="p" data-group-id="6777702066-23">)</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="3087902714-23">(</span><span class="s">&quot;da,zh-TW;q=0.3,invalid_tag&quot;</span><span class="p" data-group-id="3087902714-23">)</span><span class="w">
</span><span class="p" data-group-id="6777702066-24">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="3087902714-24">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="6777702066-25">[</span><span class="w"> </span><span class="p" data-group-id="3087902714-25">[</span><span class="w">
</span><span class="p" data-group-id="6777702066-26">{</span><span class="mf">1.0</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="3087902714-26">{</span><span class="mf">1.0</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="6777702066-27">%</span><span class="nc" data-group-id="6777702066-27">Cldr.LanguageTag</span><span class="p" data-group-id="6777702066-27">{</span><span class="w"> </span><span class="p" data-group-id="3087902714-27">%</span><span class="nc" data-group-id="3087902714-27">Cldr.LanguageTag</span><span class="p" data-group-id="3087902714-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">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">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">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="6777702066-28">[</span><span class="p" data-group-id="6777702066-28">]</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="3087902714-28">[</span><span class="p" data-group-id="3087902714-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="6777702066-29">%{</span><span class="p" data-group-id="6777702066-29">}</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="3087902714-29">%{</span><span class="p" data-group-id="3087902714-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">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">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="6777702066-30">%{</span><span class="p" data-group-id="6777702066-30">}</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="3087902714-30">%{</span><span class="p" data-group-id="3087902714-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="6777702066-31">[</span><span class="p" data-group-id="6777702066-31">]</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="3087902714-31">[</span><span class="p" data-group-id="3087902714-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">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">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">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">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="6777702066-32">%{</span><span class="p" data-group-id="6777702066-32">}</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="3087902714-32">%{</span><span class="p" data-group-id="3087902714-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="6777702066-33">[</span><span class="p" data-group-id="6777702066-33">]</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="3087902714-33">[</span><span class="p" data-group-id="3087902714-33">]</span><span class="w">
</span><span class="p" data-group-id="6777702066-27">}</span><span class="p" data-group-id="6777702066-26">}</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="3087902714-27">}</span><span class="p" data-group-id="3087902714-26">}</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="6777702066-34">{</span><span class="mf">0.3</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="3087902714-34">{</span><span class="mf">0.3</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="6777702066-35">%</span><span class="nc" data-group-id="6777702066-35">Cldr.LanguageTag</span><span class="p" data-group-id="6777702066-35">{</span><span class="w"> </span><span class="p" data-group-id="3087902714-35">%</span><span class="nc" data-group-id="3087902714-35">Cldr.LanguageTag</span><span class="p" data-group-id="3087902714-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">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">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">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="6777702066-36">[</span><span class="p" data-group-id="6777702066-36">]</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="3087902714-36">[</span><span class="p" data-group-id="3087902714-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="6777702066-37">%{</span><span class="p" data-group-id="6777702066-37">}</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="3087902714-37">%{</span><span class="p" data-group-id="3087902714-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">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">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="6777702066-38">%{</span><span class="p" data-group-id="6777702066-38">}</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="3087902714-38">%{</span><span class="p" data-group-id="3087902714-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="6777702066-39">[</span><span class="p" data-group-id="6777702066-39">]</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="3087902714-39">[</span><span class="p" data-group-id="3087902714-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">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">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">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">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="6777702066-40">%{</span><span class="p" data-group-id="6777702066-40">}</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="3087902714-40">%{</span><span class="p" data-group-id="3087902714-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="6777702066-41">[</span><span class="p" data-group-id="6777702066-41">]</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="3087902714-41">[</span><span class="p" data-group-id="3087902714-41">]</span><span class="w">
</span><span class="p" data-group-id="6777702066-35">}</span><span class="p" data-group-id="6777702066-34">}</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="3087902714-35">}</span><span class="p" data-group-id="3087902714-34">}</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="6777702066-42">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="3087902714-42">{</span><span class="ss">:error</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="6777702066-43">{</span><span class="nc">Cldr.LanguageTag.ParseError</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="3087902714-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="6777702066-43">}</span><span class="p" data-group-id="6777702066-42">}</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="3087902714-43">}</span><span class="p" data-group-id="3087902714-42">}</span><span class="w">
</span><span class="p" data-group-id="6777702066-25">]</span><span class="p" data-group-id="6777702066-24">}</span></code></pre> </span><span class="p" data-group-id="3087902714-25">]</span><span class="p" data-group-id="3087902714-24">}</span></code></pre>
</section> </section>
</section> </section>
<section class="detail" id="parse!/1"> <section class="detail" id="parse!/1">
@ -467,7 +467,7 @@ in descending order.</p><h2 id="parse!/1-arguments" class="section-heading">
</a> </a>
Returns Returns
</h2> </h2>
<ul><li><p><code class="inline">{:ok, [{quality, language_tag}, ...]}</code> or</p></li><li><p>raises a <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.AcceptLanguageError.html"><code class="inline">Cldr.AcceptLanguageError</code></a> exception</p></li></ul><p>If at least one valid language tag is found but errors are also <ul><li><p><code class="inline">{:ok, [{quality, language_tag}, ...]}</code> or</p></li><li><p>raises a <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.AcceptLanguageError.html"><code class="inline">Cldr.AcceptLanguageError</code></a> exception</p></li></ul><p>If at least one valid language tag is found but errors are also
detected on one more more tags, an <code class="inline">{ok, list}</code> tuple is returned detected on one more more tags, an <code class="inline">{ok, list}</code> tuple is returned
wuth an error tuple for each invalid tag added at the end of the list.</p><h2 id="parse!/1-example" class="section-heading"> wuth an error tuple for each invalid tag added at the end of the list.</p><h2 id="parse!/1-example" class="section-heading">
<a href="#parse!/1-example" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i> <a href="#parse!/1-example" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
@ -475,92 +475,92 @@ wuth an error tuple for each invalid tag added at the end of the list.</p><h2 id
</a> </a>
Example Example
</h2> </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="3261214323-1">(</span><span class="s">&quot;da,zh-TW;q=0.3&quot;</span><span class="p" data-group-id="3261214323-1">)</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="9049314333-1">(</span><span class="s">&quot;da,zh-TW;q=0.3&quot;</span><span class="p" data-group-id="9049314333-1">)</span><span class="w">
</span><span class="p" data-group-id="3261214323-2">[</span><span class="w"> </span><span class="p" data-group-id="9049314333-2">[</span><span class="w">
</span><span class="p" data-group-id="3261214323-3">{</span><span class="mf">1.0</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="9049314333-3">{</span><span class="mf">1.0</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="3261214323-4">%</span><span class="nc" data-group-id="3261214323-4">Cldr.LanguageTag</span><span class="p" data-group-id="3261214323-4">{</span><span class="w"> </span><span class="p" data-group-id="9049314333-4">%</span><span class="nc" data-group-id="9049314333-4">Cldr.LanguageTag</span><span class="p" data-group-id="9049314333-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">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">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">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="3261214323-5">[</span><span class="p" data-group-id="3261214323-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="9049314333-5">[</span><span class="p" data-group-id="9049314333-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="3261214323-6">%{</span><span class="p" data-group-id="3261214323-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="9049314333-6">%{</span><span class="p" data-group-id="9049314333-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">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">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="3261214323-7">%{</span><span class="p" data-group-id="3261214323-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="9049314333-7">%{</span><span class="p" data-group-id="9049314333-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="3261214323-8">[</span><span class="p" data-group-id="3261214323-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="9049314333-8">[</span><span class="p" data-group-id="9049314333-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">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">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">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">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="3261214323-9">%{</span><span class="p" data-group-id="3261214323-9">}</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="9049314333-9">%{</span><span class="p" data-group-id="9049314333-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="3261214323-10">[</span><span class="p" data-group-id="3261214323-10">]</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="9049314333-10">[</span><span class="p" data-group-id="9049314333-10">]</span><span class="w">
</span><span class="p" data-group-id="3261214323-4">}</span><span class="p" data-group-id="3261214323-3">}</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="9049314333-4">}</span><span class="p" data-group-id="9049314333-3">}</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="3261214323-11">{</span><span class="mf">0.3</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="9049314333-11">{</span><span class="mf">0.3</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="3261214323-12">%</span><span class="nc" data-group-id="3261214323-12">Cldr.LanguageTag</span><span class="p" data-group-id="3261214323-12">{</span><span class="w"> </span><span class="p" data-group-id="9049314333-12">%</span><span class="nc" data-group-id="9049314333-12">Cldr.LanguageTag</span><span class="p" data-group-id="9049314333-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">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">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">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="3261214323-13">[</span><span class="p" data-group-id="3261214323-13">]</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="9049314333-13">[</span><span class="p" data-group-id="9049314333-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="3261214323-14">%{</span><span class="p" data-group-id="3261214323-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="9049314333-14">%{</span><span class="p" data-group-id="9049314333-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">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">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="3261214323-15">%{</span><span class="p" data-group-id="3261214323-15">}</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="9049314333-15">%{</span><span class="p" data-group-id="9049314333-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="3261214323-16">[</span><span class="p" data-group-id="3261214323-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="9049314333-16">[</span><span class="p" data-group-id="9049314333-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">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">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">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">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="3261214323-17">%{</span><span class="p" data-group-id="3261214323-17">}</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="9049314333-17">%{</span><span class="p" data-group-id="9049314333-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="3261214323-18">[</span><span class="p" data-group-id="3261214323-18">]</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="9049314333-18">[</span><span class="p" data-group-id="9049314333-18">]</span><span class="w">
</span><span class="p" data-group-id="3261214323-12">}</span><span class="p" data-group-id="3261214323-11">}</span><span class="w"> </span><span class="p" data-group-id="9049314333-12">}</span><span class="p" data-group-id="9049314333-11">}</span><span class="w">
</span><span class="p" data-group-id="3261214323-2">]</span><span class="w"> </span><span class="p" data-group-id="9049314333-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="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 </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"> (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="3261214323-19">(</span><span class="s">&quot;da,zh-TW;q=0.3,invalid_tag&quot;</span><span class="p" data-group-id="3261214323-19">)</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="9049314333-19">(</span><span class="s">&quot;da,zh-TW;q=0.3,invalid_tag&quot;</span><span class="p" data-group-id="9049314333-19">)</span><span class="w">
</span><span class="p" data-group-id="3261214323-20">[</span><span class="w"> </span><span class="p" data-group-id="9049314333-20">[</span><span class="w">
</span><span class="p" data-group-id="3261214323-21">{</span><span class="mf">1.0</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="9049314333-21">{</span><span class="mf">1.0</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="3261214323-22">%</span><span class="nc" data-group-id="3261214323-22">Cldr.LanguageTag</span><span class="p" data-group-id="3261214323-22">{</span><span class="w"> </span><span class="p" data-group-id="9049314333-22">%</span><span class="nc" data-group-id="9049314333-22">Cldr.LanguageTag</span><span class="p" data-group-id="9049314333-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">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">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">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="3261214323-23">[</span><span class="p" data-group-id="3261214323-23">]</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="9049314333-23">[</span><span class="p" data-group-id="9049314333-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="3261214323-24">%{</span><span class="p" data-group-id="3261214323-24">}</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="9049314333-24">%{</span><span class="p" data-group-id="9049314333-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">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">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="3261214323-25">%{</span><span class="p" data-group-id="3261214323-25">}</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="9049314333-25">%{</span><span class="p" data-group-id="9049314333-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="3261214323-26">[</span><span class="p" data-group-id="3261214323-26">]</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="9049314333-26">[</span><span class="p" data-group-id="9049314333-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">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">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">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">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="3261214323-27">%{</span><span class="p" data-group-id="3261214323-27">}</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="9049314333-27">%{</span><span class="p" data-group-id="9049314333-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="3261214323-28">[</span><span class="p" data-group-id="3261214323-28">]</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="9049314333-28">[</span><span class="p" data-group-id="9049314333-28">]</span><span class="w">
</span><span class="p" data-group-id="3261214323-22">}</span><span class="p" data-group-id="3261214323-21">}</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="9049314333-22">}</span><span class="p" data-group-id="9049314333-21">}</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="3261214323-29">{</span><span class="mf">0.3</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="9049314333-29">{</span><span class="mf">0.3</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="3261214323-30">%</span><span class="nc" data-group-id="3261214323-30">Cldr.LanguageTag</span><span class="p" data-group-id="3261214323-30">{</span><span class="w"> </span><span class="p" data-group-id="9049314333-30">%</span><span class="nc" data-group-id="9049314333-30">Cldr.LanguageTag</span><span class="p" data-group-id="9049314333-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">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">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">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="3261214323-31">[</span><span class="p" data-group-id="3261214323-31">]</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="9049314333-31">[</span><span class="p" data-group-id="9049314333-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="3261214323-32">%{</span><span class="p" data-group-id="3261214323-32">}</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="9049314333-32">%{</span><span class="p" data-group-id="9049314333-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">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">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="3261214323-33">%{</span><span class="p" data-group-id="3261214323-33">}</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="9049314333-33">%{</span><span class="p" data-group-id="9049314333-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="3261214323-34">[</span><span class="p" data-group-id="3261214323-34">]</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="9049314333-34">[</span><span class="p" data-group-id="9049314333-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">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">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">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">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="3261214323-35">%{</span><span class="p" data-group-id="3261214323-35">}</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="9049314333-35">%{</span><span class="p" data-group-id="9049314333-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="3261214323-36">[</span><span class="p" data-group-id="3261214323-36">]</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="9049314333-36">[</span><span class="p" data-group-id="9049314333-36">]</span><span class="w">
</span><span class="p" data-group-id="3261214323-30">}</span><span class="p" data-group-id="3261214323-29">}</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="9049314333-30">}</span><span class="p" data-group-id="9049314333-29">}</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="3261214323-37">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="9049314333-37">{</span><span class="ss">:error</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="3261214323-38">{</span><span class="nc">Cldr.LanguageTag.ParseError</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="9049314333-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="3261214323-38">}</span><span class="p" data-group-id="3261214323-37">}</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="9049314333-38">}</span><span class="p" data-group-id="9049314333-37">}</span><span class="w">
</span><span class="p" data-group-id="3261214323-20">]</span></code></pre> </span><span class="p" data-group-id="9049314333-20">]</span></code></pre>
</section> </section>
</section> </section>

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>
@ -355,13 +355,13 @@ Functions
<div class="specs"> <div class="specs">
<pre translate="no"><span class="attribute">@spec</span> currencies_for_locale( <pre translate="no"><span class="attribute">@spec</span> currencies_for_locale(
<a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.Locale.html#t:locale_name/0">Cldr.Locale.locale_name</a>() | <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.LanguageTag.html#t:t/0">Cldr.LanguageTag.t</a>(), <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.Locale.html#t:locale_name/0">Cldr.Locale.locale_name</a>() | <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.LanguageTag.html#t:t/0">Cldr.LanguageTag.t</a>(),
only :: <a href="https://hexdocs.pm/ex_cldr_currencies/2.15.0/Cldr.Currency.html#t:filter/0">Cldr.Currency.filter</a>(), only :: <a href="https://hexdocs.pm/ex_cldr_currencies/2.15.0/Cldr.Currency.html#t:filter/0">Cldr.Currency.filter</a>(),
except :: <a href="https://hexdocs.pm/ex_cldr_currencies/2.15.0/Cldr.Currency.html#t:filter/0">Cldr.Currency.filter</a>() except :: <a href="https://hexdocs.pm/ex_cldr_currencies/2.15.0/Cldr.Currency.html#t:filter/0">Cldr.Currency.filter</a>()
) :: {:ok, <a href="https://hexdocs.pm/elixir/typespecs.html#basic-types">map</a>()} | {:error, {<a href="https://hexdocs.pm/elixir/typespecs.html#built-in-types">module</a>(), <a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>()}}</pre> ) :: {:ok, <a href="https://hexdocs.pm/elixir/typespecs.html#basic-types">map</a>()} | {:error, {<a href="https://hexdocs.pm/elixir/typespecs.html#built-in-types">module</a>(), <a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>()}}</pre>
<pre translate="no"><span class="attribute">@spec</span> currencies_for_locale( <pre translate="no"><span class="attribute">@spec</span> currencies_for_locale(
<a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.Locale.html#t:locale_name/0">Cldr.Locale.locale_name</a>() | <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.LanguageTag.html#t:t/0">Cldr.LanguageTag.t</a>(), <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.Locale.html#t:locale_name/0">Cldr.Locale.locale_name</a>() | <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.LanguageTag.html#t:t/0">Cldr.LanguageTag.t</a>(),
only :: <a href="https://hexdocs.pm/ex_cldr_currencies/2.15.0/Cldr.Currency.html#t:filter/0">Cldr.Currency.filter</a>(), only :: <a href="https://hexdocs.pm/ex_cldr_currencies/2.15.0/Cldr.Currency.html#t:filter/0">Cldr.Currency.filter</a>(),
except :: <a href="https://hexdocs.pm/ex_cldr_currencies/2.15.0/Cldr.Currency.html#t:filter/0">Cldr.Currency.filter</a>() except :: <a href="https://hexdocs.pm/ex_cldr_currencies/2.15.0/Cldr.Currency.html#t:filter/0">Cldr.Currency.filter</a>()
) :: <a href="https://hexdocs.pm/elixir/typespecs.html#basic-types">map</a>() | <a href="https://hexdocs.pm/elixir/typespecs.html#built-in-types">no_return</a>()</pre> ) :: <a href="https://hexdocs.pm/elixir/typespecs.html#basic-types">map</a>() | <a href="https://hexdocs.pm/elixir/typespecs.html#built-in-types">no_return</a>()</pre>
@ -376,7 +376,7 @@ a given locale.</p><h2 id="currencies_for_locale/3-arguments" class="section-hea
Arguments Arguments
</h2> </h2>
<ul><li><p><code class="inline">locale</code> is any valid locale name returned by <code class="inline">MyApp.Cldr.known_locale_names/0</code> <ul><li><p><code class="inline">locale</code> is any valid locale name returned by <code class="inline">MyApp.Cldr.known_locale_names/0</code>
or a <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.LanguageTag.html"><code class="inline">Cldr.LanguageTag</code></a> struct returned by <code class="inline">MyApp.Cldr.Locale.new!/1</code></p></li><li><p><code class="inline">currency_status</code> is <code class="inline">:all</code>, <code class="inline">:current</code>, <code class="inline">:historic</code>, or a <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.LanguageTag.html"><code class="inline">Cldr.LanguageTag</code></a> struct returned by <code class="inline">MyApp.Cldr.Locale.new!/1</code></p></li><li><p><code class="inline">currency_status</code> is <code class="inline">:all</code>, <code class="inline">:current</code>, <code class="inline">:historic</code>,
<code class="inline">unannotated</code> or <code class="inline">:tender</code>; or a list of one or more status. <code class="inline">unannotated</code> or <code class="inline">:tender</code>; or a list of one or more status.
The default is <code class="inline">:all</code>. See <a href="https://hexdocs.pm/ex_cldr_currencies/2.15.0/Cldr.Currency.html#currency_filter/2"><code class="inline">Cldr.Currency.currency_filter/2</code></a>.</p></li></ul><h2 id="currencies_for_locale/3-returns" class="section-heading"> The default is <code class="inline">:all</code>. See <a href="https://hexdocs.pm/ex_cldr_currencies/2.15.0/Cldr.Currency.html#currency_filter/2"><code class="inline">Cldr.Currency.currency_filter/2</code></a>.</p></li></ul><h2 id="currencies_for_locale/3-returns" class="section-heading">
<a href="#currencies_for_locale/3-returns" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i> <a href="#currencies_for_locale/3-returns" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
@ -392,11 +392,11 @@ The default is <code class="inline">:all</code>. See <a href="https://hexdocs.pm
</h2> </h2>
<p> MyApp.Cldr.Currency.currencies_for_locale &quot;en&quot; <p> MyApp.Cldr.Currency.currencies_for_locale &quot;en&quot;
=&gt; {:ok, =&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="9216992727-1">%</span><span class="nc" data-group-id="9216992727-1">Cldr.Currency</span><span class="p" data-group-id="9216992727-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="4430123715-1">%</span><span class="nc" data-group-id="4430123715-1">Cldr.Currency</span><span class="p" data-group-id="4430123715-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_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">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">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="9216992727-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="9216992727-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="4430123715-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="4430123715-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">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">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"> </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">
@ -406,12 +406,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">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">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="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="9216992727-1">}</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="4430123715-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="9216992727-3">%</span><span class="nc" data-group-id="9216992727-3">Cldr.Currency</span><span class="p" data-group-id="9216992727-3">{</span><span class="w"> </span><span class="ss">SUR</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="4430123715-3">%</span><span class="nc" data-group-id="4430123715-3">Cldr.Currency</span><span class="p" data-group-id="4430123715-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_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">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">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="9216992727-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="9216992727-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="4430123715-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="4430123715-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">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">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"> </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">
@ -421,7 +421,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">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">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="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="9216992727-3">}</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="4430123715-3">}</span><span class="p">,</span><span class="w">
</span><span class="n">...</span><span class="w"> </span><span class="n">...</span><span class="w">
</span><span class="err">}</span><span class="err">}</span></code></pre> </span><span class="err">}</span><span class="err">}</span></code></pre>
</section> </section>
@ -457,7 +457,7 @@ a given locale and raises on error.</p><h2 id="currencies_for_locale!/3-argument
Arguments Arguments
</h2> </h2>
<ul><li><p><code class="inline">locale</code> is any valid locale name returned by <code class="inline">MyApp.Cldr.known_locale_names/0</code> <ul><li><p><code class="inline">locale</code> is any valid locale name returned by <code class="inline">MyApp.Cldr.known_locale_names/0</code>
or a <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.LanguageTag.html"><code class="inline">Cldr.LanguageTag</code></a> struct returned by <code class="inline">MyApp.Cldr.Locale.new!/1</code></p></li><li><p><code class="inline">currency_status</code> is <code class="inline">:all</code>, <code class="inline">:current</code>, <code class="inline">:historic</code>, or a <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.LanguageTag.html"><code class="inline">Cldr.LanguageTag</code></a> struct returned by <code class="inline">MyApp.Cldr.Locale.new!/1</code></p></li><li><p><code class="inline">currency_status</code> is <code class="inline">:all</code>, <code class="inline">:current</code>, <code class="inline">:historic</code>,
<code class="inline">unannotated</code> or <code class="inline">:tender</code>; or a list of one or more status. <code class="inline">unannotated</code> or <code class="inline">:tender</code>; or a list of one or more status.
The default is <code class="inline">:all</code>. See <a href="https://hexdocs.pm/ex_cldr_currencies/2.15.0/Cldr.Currency.html#currency_filter/2"><code class="inline">Cldr.Currency.currency_filter/2</code></a>.</p></li></ul><h2 id="currencies_for_locale!/3-returns" class="section-heading"> The default is <code class="inline">:all</code>. See <a href="https://hexdocs.pm/ex_cldr_currencies/2.15.0/Cldr.Currency.html#currency_filter/2"><code class="inline">Cldr.Currency.currency_filter/2</code></a>.</p></li></ul><h2 id="currencies_for_locale!/3-returns" class="section-heading">
<a href="#currencies_for_locale!/3-returns" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i> <a href="#currencies_for_locale!/3-returns" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
@ -472,11 +472,11 @@ The default is <code class="inline">:all</code>. See <a href="https://hexdocs.pm
Example Example
</h2> </h2>
<p> MyApp.Cldr.Currency.currencies_for_locale! &quot;en&quot; <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="3962363591-1">%</span><span class="nc" data-group-id="3962363591-1">Cldr.Currency</span><span class="p" data-group-id="3962363591-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="4643930513-1">%</span><span class="nc" data-group-id="4643930513-1">Cldr.Currency</span><span class="p" data-group-id="4643930513-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_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">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">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="3962363591-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="3962363591-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="4643930513-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="4643930513-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">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">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"> </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">
@ -486,12 +486,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">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">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="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="3962363591-1">}</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="4643930513-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="3962363591-3">%</span><span class="nc" data-group-id="3962363591-3">Cldr.Currency</span><span class="p" data-group-id="3962363591-3">{</span><span class="w"> </span><span class="ss">SUR</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="4643930513-3">%</span><span class="nc" data-group-id="4643930513-3">Cldr.Currency</span><span class="p" data-group-id="4643930513-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_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">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">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="3962363591-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="3962363591-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="4643930513-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="4643930513-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">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">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"> </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">
@ -501,7 +501,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">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">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="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="3962363591-3">}</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="4643930513-3">}</span><span class="p">,</span><span class="w">
</span><span class="n">...</span></code></pre><p> }</p> </span><span class="n">...</span></code></pre><p> }</p>
</section> </section>
</section> </section>
@ -546,8 +546,8 @@ The default is <code class="inline">:all</code>. See <a href="https://hexdocs.pm
</a> </a>
Options Options
</h2> </h2>
<ul><li><code class="inline">:locale</code> is any valid locale name returned by <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.html#known_locale_names/1"><code class="inline">Cldr.known_locale_names/1</code></a> <ul><li><code class="inline">:locale</code> is any valid locale name returned by <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.html#known_locale_names/1"><code class="inline">Cldr.known_locale_names/1</code></a>
or a <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.LanguageTag.html"><code class="inline">Cldr.LanguageTag</code></a> struct returned by <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.Locale.html#new!/2"><code class="inline">Cldr.Locale.new!/2</code></a></li></ul><h2 id="currency_for_code/2-returns" class="section-heading"> or a <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.LanguageTag.html"><code class="inline">Cldr.LanguageTag</code></a> struct returned by <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.Locale.html#new!/2"><code class="inline">Cldr.Locale.new!/2</code></a></li></ul><h2 id="currency_for_code/2-returns" class="section-heading">
<a href="#currency_for_code/2-returns" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i> <a href="#currency_for_code/2-returns" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
<p class="sr-only">returns</p> <p class="sr-only">returns</p>
</a> </a>
@ -559,13 +559,13 @@ or a <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.LanguageTag.html"><code cla
</a> </a>
Examples Examples
</h2> </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="4704213008-1">(</span><span class="s">&quot;AUD&quot;</span><span class="p" data-group-id="4704213008-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">currency_for_code</span><span class="p" data-group-id="7037978162-1">(</span><span class="s">&quot;AUD&quot;</span><span class="p" data-group-id="7037978162-1">)</span><span class="w">
</span><span class="p" data-group-id="4704213008-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="7037978162-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="4704213008-3">%</span><span class="nc" data-group-id="4704213008-3">Cldr.Currency</span><span class="p" data-group-id="4704213008-3">{</span><span class="w"> </span><span class="p" data-group-id="7037978162-3">%</span><span class="nc" data-group-id="7037978162-3">Cldr.Currency</span><span class="p" data-group-id="7037978162-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_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">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">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="4704213008-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="4704213008-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="7037978162-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="7037978162-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">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">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"> </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">
@ -573,15 +573,15 @@ or a <a href="https://hexdocs.pm/ex_cldr/2.36.0/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">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">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="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="4704213008-3">}</span><span class="p" data-group-id="4704213008-2">}</span><span class="w"> </span><span class="p" data-group-id="7037978162-3">}</span><span class="p" data-group-id="7037978162-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="4704213008-5">(</span><span class="s">&quot;THB&quot;</span><span class="p" data-group-id="4704213008-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="7037978162-5">(</span><span class="s">&quot;THB&quot;</span><span class="p" data-group-id="7037978162-5">)</span><span class="w">
</span><span class="p" data-group-id="4704213008-6">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="7037978162-6">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="4704213008-7">%</span><span class="nc" data-group-id="4704213008-7">Cldr.Currency</span><span class="p" data-group-id="4704213008-7">{</span><span class="w"> </span><span class="p" data-group-id="7037978162-7">%</span><span class="nc" data-group-id="7037978162-7">Cldr.Currency</span><span class="p" data-group-id="7037978162-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_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">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">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="4704213008-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="4704213008-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="7037978162-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="7037978162-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">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">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"> </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">
@ -589,7 +589,7 @@ or a <a href="https://hexdocs.pm/ex_cldr/2.36.0/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">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">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="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="4704213008-7">}</span><span class="p" data-group-id="4704213008-6">}</span></code></pre> </span><span class="p" data-group-id="7037978162-7">}</span><span class="p" data-group-id="7037978162-6">}</span></code></pre>
</section> </section>
</section> </section>
<section class="detail" id="currency_for_code!/2"> <section class="detail" id="currency_for_code!/2">
@ -635,8 +635,8 @@ or a <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.LanguageTag.html"><code cla
</a> </a>
Options Options
</h2> </h2>
<ul><li><code class="inline">:locale</code> is any valid locale name returned by <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.html#known_locale_names/1"><code class="inline">Cldr.known_locale_names/1</code></a> <ul><li><code class="inline">:locale</code> is any valid locale name returned by <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.html#known_locale_names/1"><code class="inline">Cldr.known_locale_names/1</code></a>
or a <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.LanguageTag.html"><code class="inline">Cldr.LanguageTag</code></a> struct returned by <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.Locale.html#new!/2"><code class="inline">Cldr.Locale.new!/2</code></a></li></ul><h2 id="currency_for_code!/2-returns" class="section-heading"> or a <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.LanguageTag.html"><code class="inline">Cldr.LanguageTag</code></a> struct returned by <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.Locale.html#new!/2"><code class="inline">Cldr.Locale.new!/2</code></a></li></ul><h2 id="currency_for_code!/2-returns" class="section-heading">
<a href="#currency_for_code!/2-returns" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i> <a href="#currency_for_code!/2-returns" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
<p class="sr-only">returns</p> <p class="sr-only">returns</p>
</a> </a>
@ -648,12 +648,12 @@ or a <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.LanguageTag.html"><code cla
</a> </a>
Examples Examples
</h2> </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="6410294259-1">(</span><span class="s">&quot;AUD&quot;</span><span class="p" data-group-id="6410294259-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">currency_for_code!</span><span class="p" data-group-id="7852069888-1">(</span><span class="s">&quot;AUD&quot;</span><span class="p" data-group-id="7852069888-1">)</span><span class="w">
</span><span class="p" data-group-id="6410294259-2">%</span><span class="nc" data-group-id="6410294259-2">Cldr.Currency</span><span class="p" data-group-id="6410294259-2">{</span><span class="w"> </span><span class="p" data-group-id="7852069888-2">%</span><span class="nc" data-group-id="7852069888-2">Cldr.Currency</span><span class="p" data-group-id="7852069888-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_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">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">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="6410294259-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="6410294259-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="7852069888-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="7852069888-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">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">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"> </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">
@ -661,14 +661,14 @@ or a <a href="https://hexdocs.pm/ex_cldr/2.36.0/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">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">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="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="6410294259-2">}</span><span class="w"> </span><span class="p" data-group-id="7852069888-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="6410294259-4">(</span><span class="s">&quot;THB&quot;</span><span class="p" data-group-id="6410294259-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_for_code!</span><span class="p" data-group-id="7852069888-4">(</span><span class="s">&quot;THB&quot;</span><span class="p" data-group-id="7852069888-4">)</span><span class="w">
</span><span class="p" data-group-id="6410294259-5">%</span><span class="nc" data-group-id="6410294259-5">Cldr.Currency</span><span class="p" data-group-id="6410294259-5">{</span><span class="w"> </span><span class="p" data-group-id="7852069888-5">%</span><span class="nc" data-group-id="7852069888-5">Cldr.Currency</span><span class="p" data-group-id="7852069888-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_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">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">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="6410294259-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="6410294259-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="7852069888-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="7852069888-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">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">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"> </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">
@ -676,7 +676,7 @@ or a <a href="https://hexdocs.pm/ex_cldr/2.36.0/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">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">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="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="6410294259-5">}</span></code></pre> </span><span class="p" data-group-id="7852069888-5">}</span></code></pre>
</section> </section>
</section> </section>
<section class="detail" id="currency_from_locale/1"> <section class="detail" id="currency_from_locale/1">
@ -704,8 +704,8 @@ or a <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.LanguageTag.html"><code cla
</a> </a>
Arguments Arguments
</h2> </h2>
<ul><li><code class="inline">locale</code> is a <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.LanguageTag.html"><code class="inline">Cldr.LanguageTag</code></a> struct returned by <ul><li><code class="inline">locale</code> is a <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.LanguageTag.html"><code class="inline">Cldr.LanguageTag</code></a> struct returned by
<a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.Locale.html#new!/2"><code class="inline">Cldr.Locale.new!/2</code></a></li></ul><h2 id="currency_from_locale/1-returns" class="section-heading"> <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.Locale.html#new!/2"><code class="inline">Cldr.Locale.new!/2</code></a></li></ul><h2 id="currency_from_locale/1-returns" class="section-heading">
<a href="#currency_from_locale/1-returns" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i> <a href="#currency_from_locale/1-returns" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
<p class="sr-only">returns</p> <p class="sr-only">returns</p>
</a> </a>
@ -717,11 +717,11 @@ or a <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.LanguageTag.html"><code cla
</a> </a>
Examples Examples
</h2> </h2>
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="p" data-group-id="9747941507-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="9747941507-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="w"> </span><span class="s">&quot;en&quot;</span><span class="w"> <pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="p" data-group-id="6763708980-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="6763708980-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="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.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="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="ss">:USD</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="p" data-group-id="9747941507-2">{</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="9747941507-2">}</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="w"> </span><span class="s">&quot;en-AU&quot;</span><span class="w"> </span><span class="gp unselectable">iex&gt; </span><span class="p" data-group-id="6763708980-2">{</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="6763708980-2">}</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="w"> </span><span class="s">&quot;en-AU&quot;</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="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="ss">:AUD</span><span class="w">
@ -750,7 +750,7 @@ or a <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.LanguageTag.html"><code cla
<div class="specs"> <div class="specs">
<pre translate="no"><span class="attribute">@spec</span> currency_history_for_locale(<a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.LanguageTag.html#t:t/0">Cldr.LanguageTag.t</a>() | <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.Locale.html#t:locale_name/0">Cldr.Locale.locale_name</a>()) :: <pre translate="no"><span class="attribute">@spec</span> currency_history_for_locale(<a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.LanguageTag.html#t:t/0">Cldr.LanguageTag.t</a>() | <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.Locale.html#t:locale_name/0">Cldr.Locale.locale_name</a>()) ::
<a href="https://hexdocs.pm/elixir/typespecs.html#basic-types">map</a>() | {:error, {<a href="https://hexdocs.pm/elixir/typespecs.html#built-in-types">module</a>(), <a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>()}}</pre> <a href="https://hexdocs.pm/elixir/typespecs.html#basic-types">map</a>() | {:error, {<a href="https://hexdocs.pm/elixir/typespecs.html#built-in-types">module</a>(), <a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>()}}</pre>
</div> </div>
@ -763,20 +763,20 @@ currency for a given locale.</p><h2 id="currency_history_for_locale/1-arguments"
Arguments Arguments
</h2> </h2>
<ul><li><code class="inline">locale</code> is any valid locale name returned by <code class="inline">MyApp.Cldr.known_locale_names/0</code> <ul><li><code class="inline">locale</code> is any valid locale name returned by <code class="inline">MyApp.Cldr.known_locale_names/0</code>
or a <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.LanguageTag.html"><code class="inline">Cldr.LanguageTag</code></a> struct returned by <code class="inline">MyApp.Cldr.Locale.new!/1</code></li></ul><h2 id="currency_history_for_locale/1-example" class="section-heading"> or a <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.LanguageTag.html"><code class="inline">Cldr.LanguageTag</code></a> struct returned by <code class="inline">MyApp.Cldr.Locale.new!/1</code></li></ul><h2 id="currency_history_for_locale/1-example" class="section-heading">
<a href="#currency_history_for_locale/1-example" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i> <a href="#currency_history_for_locale/1-example" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
<p class="sr-only">example</p> <p class="sr-only">example</p>
</a> </a>
Example Example
</h2> </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="w"> </span><span class="s">&quot;en&quot;</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">currency_history_for_locale</span><span class="w"> </span><span class="s">&quot;en&quot;</span><span class="w">
</span><span class="p" data-group-id="4991404057-1">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="8728040003-1">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="4991404057-2">%{</span><span class="w"> </span><span class="p" data-group-id="8728040003-2">%{</span><span class="w">
</span><span class="ss">USD</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="4991404057-3">%{</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="4991404057-3">}</span><span class="p">,</span><span class="w"> </span><span class="ss">USD</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="8728040003-3">%{</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="8728040003-3">}</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="4991404057-4">%{</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="4991404057-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="8728040003-4">%{</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="8728040003-4">}</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="4991404057-5">%{</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="4991404057-5">}</span><span class="w"> </span><span class="ss">USS</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="8728040003-5">%{</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="8728040003-5">}</span><span class="w">
</span><span class="p" data-group-id="4991404057-2">}</span><span class="w"> </span><span class="p" data-group-id="8728040003-2">}</span><span class="w">
</span><span class="p" data-group-id="4991404057-1">}</span></code></pre> </span><span class="p" data-group-id="8728040003-1">}</span></code></pre>
</section> </section>
</section> </section>
<section class="detail" id="currency_strings/3"> <section class="detail" id="currency_strings/3">
@ -805,7 +805,7 @@ or a <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.LanguageTag.html"><code cla
<div class="specs"> <div class="specs">
<pre translate="no"><span class="attribute">@spec</span> currency_strings( <pre translate="no"><span class="attribute">@spec</span> currency_strings(
<a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.LanguageTag.html#t:t/0">Cldr.LanguageTag.t</a>() | <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.Locale.html#t:locale_name/0">Cldr.Locale.locale_name</a>(), <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.LanguageTag.html#t:t/0">Cldr.LanguageTag.t</a>() | <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.Locale.html#t:locale_name/0">Cldr.Locale.locale_name</a>(),
only :: <a href="https://hexdocs.pm/ex_cldr_currencies/2.15.0/Cldr.Currency.html#t:filter/0">Cldr.Currency.filter</a>(), only :: <a href="https://hexdocs.pm/ex_cldr_currencies/2.15.0/Cldr.Currency.html#t:filter/0">Cldr.Currency.filter</a>(),
except :: <a href="https://hexdocs.pm/ex_cldr_currencies/2.15.0/Cldr.Currency.html#t:filter/0">Cldr.Currency.filter</a>() except :: <a href="https://hexdocs.pm/ex_cldr_currencies/2.15.0/Cldr.Currency.html#t:filter/0">Cldr.Currency.filter</a>()
) :: {:ok, <a href="https://hexdocs.pm/elixir/typespecs.html#basic-types">map</a>()} | {:error, {<a href="https://hexdocs.pm/elixir/typespecs.html#built-in-types">module</a>(), <a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>()}}</pre> ) :: {:ok, <a href="https://hexdocs.pm/elixir/typespecs.html#basic-types">map</a>()} | {:error, {<a href="https://hexdocs.pm/elixir/typespecs.html#built-in-types">module</a>(), <a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>()}}</pre>
@ -821,7 +821,7 @@ representing a currency in a locale-specific manner.</p><h2 id="currency_strings
Arguments Arguments
</h2> </h2>
<ul><li><p><code class="inline">locale</code> is any valid locale name returned by <code class="inline">MyApp.Cldr.known_locale_names/0</code> <ul><li><p><code class="inline">locale</code> is any valid locale name returned by <code class="inline">MyApp.Cldr.known_locale_names/0</code>
or a <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.LanguageTag.html"><code class="inline">Cldr.LanguageTag</code></a> struct returned by <code class="inline">MyApp.Cldr.Locale.new!/1</code></p></li><li><p><code class="inline">currency_status</code> is <code class="inline">:all</code>, <code class="inline">:current</code>, <code class="inline">:historic</code>, or a <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.LanguageTag.html"><code class="inline">Cldr.LanguageTag</code></a> struct returned by <code class="inline">MyApp.Cldr.Locale.new!/1</code></p></li><li><p><code class="inline">currency_status</code> is <code class="inline">:all</code>, <code class="inline">:current</code>, <code class="inline">:historic</code>,
<code class="inline">unannotated</code> or <code class="inline">:tender</code>; or a list of one or more status. <code class="inline">unannotated</code> or <code class="inline">:tender</code>; or a list of one or more status.
The default is <code class="inline">:all</code>. See <a href="https://hexdocs.pm/ex_cldr_currencies/2.15.0/Cldr.Currency.html#currency_filter/2"><code class="inline">Cldr.Currency.currency_filter/2</code></a>.</p></li></ul><h2 id="currency_strings/3-returns" class="section-heading"> The default is <code class="inline">:all</code>. See <a href="https://hexdocs.pm/ex_cldr_currencies/2.15.0/Cldr.Currency.html#currency_filter/2"><code class="inline">Cldr.Currency.currency_filter/2</code></a>.</p></li></ul><h2 id="currency_strings/3-returns" class="section-heading">
<a href="#currency_strings/3-returns" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i> <a href="#currency_strings/3-returns" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
@ -836,8 +836,8 @@ The default is <code class="inline">:all</code>. See <a href="https://hexdocs.pm
Example Example
</h2> </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="w"> </span><span class="s">&quot;en&quot;</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="w"> </span><span class="s">&quot;en&quot;</span><span class="w">
</span><span class="p">=&gt;</span><span class="w"> </span><span class="p" data-group-id="2392327725-1">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="p" data-group-id="6444161700-1">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="2392327725-2">%{</span><span class="w"> </span><span class="p" data-group-id="6444161700-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;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;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"> </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">
@ -847,7 +847,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;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="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="n">...</span><span class="w">
</span><span class="p" data-group-id="2392327725-2">}</span><span class="p" data-group-id="2392327725-1">}</span></code></pre> </span><span class="p" data-group-id="6444161700-2">}</span><span class="p" data-group-id="6444161700-1">}</span></code></pre>
</section> </section>
</section> </section>
<section class="detail" id="currency_strings!/3"> <section class="detail" id="currency_strings!/3">
@ -876,7 +876,7 @@ The default is <code class="inline">:all</code>. See <a href="https://hexdocs.pm
<div class="specs"> <div class="specs">
<pre translate="no"><span class="attribute">@spec</span> currency_strings!( <pre translate="no"><span class="attribute">@spec</span> currency_strings!(
<a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.LanguageTag.html#t:t/0">Cldr.LanguageTag.t</a>() | <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.Locale.html#t:locale_name/0">Cldr.Locale.locale_name</a>(), <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.LanguageTag.html#t:t/0">Cldr.LanguageTag.t</a>() | <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.Locale.html#t:locale_name/0">Cldr.Locale.locale_name</a>(),
only :: <a href="https://hexdocs.pm/ex_cldr_currencies/2.15.0/Cldr.Currency.html#t:filter/0">Cldr.Currency.filter</a>(), only :: <a href="https://hexdocs.pm/ex_cldr_currencies/2.15.0/Cldr.Currency.html#t:filter/0">Cldr.Currency.filter</a>(),
except :: <a href="https://hexdocs.pm/ex_cldr_currencies/2.15.0/Cldr.Currency.html#t:filter/0">Cldr.Currency.filter</a>() except :: <a href="https://hexdocs.pm/ex_cldr_currencies/2.15.0/Cldr.Currency.html#t:filter/0">Cldr.Currency.filter</a>()
) :: <a href="https://hexdocs.pm/elixir/typespecs.html#basic-types">map</a>() | <a href="https://hexdocs.pm/elixir/typespecs.html#built-in-types">no_return</a>()</pre> ) :: <a href="https://hexdocs.pm/elixir/typespecs.html#basic-types">map</a>() | <a href="https://hexdocs.pm/elixir/typespecs.html#built-in-types">no_return</a>()</pre>
@ -892,7 +892,7 @@ representing a currency in a locale-specific manner.</p><h2 id="currency_strings
Arguments Arguments
</h2> </h2>
<ul><li><p><code class="inline">locale</code> is any valid locale name returned by <code class="inline">MyApp.Cldr.known_locale_names/0</code> <ul><li><p><code class="inline">locale</code> is any valid locale name returned by <code class="inline">MyApp.Cldr.known_locale_names/0</code>
or a <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.LanguageTag.html"><code class="inline">Cldr.LanguageTag</code></a> struct returned by <code class="inline">MyApp.Cldr.Locale.new!/1</code></p></li><li><p><code class="inline">currency_status</code> is <code class="inline">:all</code>, <code class="inline">:current</code>, <code class="inline">:historic</code>, or a <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.LanguageTag.html"><code class="inline">Cldr.LanguageTag</code></a> struct returned by <code class="inline">MyApp.Cldr.Locale.new!/1</code></p></li><li><p><code class="inline">currency_status</code> is <code class="inline">:all</code>, <code class="inline">:current</code>, <code class="inline">:historic</code>,
<code class="inline">unannotated</code> or <code class="inline">:tender</code>; or a list of one or more status. <code class="inline">unannotated</code> or <code class="inline">:tender</code>; or a list of one or more status.
The default is <code class="inline">:all</code>. See <a href="https://hexdocs.pm/ex_cldr_currencies/2.15.0/Cldr.Currency.html#currency_filter/2"><code class="inline">Cldr.Currency.currency_filter/2</code></a>.</p></li></ul><h2 id="currency_strings!/3-returns" class="section-heading"> The default is <code class="inline">:all</code>. See <a href="https://hexdocs.pm/ex_cldr_currencies/2.15.0/Cldr.Currency.html#currency_filter/2"><code class="inline">Cldr.Currency.currency_filter/2</code></a>.</p></li></ul><h2 id="currency_strings!/3-returns" class="section-heading">
<a href="#currency_strings!/3-returns" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i> <a href="#currency_strings!/3-returns" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
@ -907,7 +907,7 @@ The default is <code class="inline">:all</code>. See <a href="https://hexdocs.pm
Example Example
</h2> </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="w"> </span><span class="s">&quot;en&quot;</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="w"> </span><span class="s">&quot;en&quot;</span><span class="w">
</span><span class="p">=&gt;</span><span class="w"> </span><span class="p" data-group-id="9550122714-1">%{</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="p" data-group-id="5406506428-1">%{</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;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;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"> </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">
@ -917,7 +917,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;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="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="n">...</span><span class="w">
</span><span class="p" data-group-id="9550122714-1">}</span></code></pre> </span><span class="p" data-group-id="5406506428-1">}</span></code></pre>
</section> </section>
</section> </section>
<section class="detail" id="current_currency_from_locale/1"> <section class="detail" id="current_currency_from_locale/1">
@ -949,7 +949,7 @@ circumstances.</p><h2 id="current_currency_from_locale/1-arguments" class="secti
Arguments Arguments
</h2> </h2>
<ul><li><code class="inline">locale</code> is any valid locale name returned by <code class="inline">MyApp.Cldr.known_locale_names/0</code> <ul><li><code class="inline">locale</code> is any valid locale name returned by <code class="inline">MyApp.Cldr.known_locale_names/0</code>
or a <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.LanguageTag.html"><code class="inline">Cldr.LanguageTag</code></a> struct returned by <code class="inline">MyApp.Cldr.Locale.new!/1</code></li></ul><h2 id="current_currency_from_locale/1-example" class="section-heading"> or a <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.LanguageTag.html"><code class="inline">Cldr.LanguageTag</code></a> struct returned by <code class="inline">MyApp.Cldr.Locale.new!/1</code></li></ul><h2 id="current_currency_from_locale/1-example" class="section-heading">
<a href="#current_currency_from_locale/1-example" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i> <a href="#current_currency_from_locale/1-example" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
<p class="sr-only">example</p> <p class="sr-only">example</p>
</a> </a>
@ -986,7 +986,7 @@ or a <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.LanguageTag.html"><code cla
<div class="specs"> <div class="specs">
<pre translate="no"><span class="attribute">@spec</span> current_territory_currencies() :: %{ <pre translate="no"><span class="attribute">@spec</span> current_territory_currencies() :: %{
required(<a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.Locale.html#t:territory_code/0">Cldr.Locale.territory_code</a>()) =&gt; <a href="https://hexdocs.pm/ex_cldr_currencies/2.15.0/Cldr.Currency.html#t:code/0">Cldr.Currency.code</a>() required(<a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.Locale.html#t:territory_code/0">Cldr.Locale.territory_code</a>()) =&gt; <a href="https://hexdocs.pm/ex_cldr_currencies/2.15.0/Cldr.Currency.html#t:code/0">Cldr.Currency.code</a>()
}</pre> }</pre>
</div> </div>
@ -1006,7 +1006,7 @@ mapping is returned for that territory.</p><h2 id="current_territory_currencies/
</a> </a>
Example Example
</h2> </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="9387207938-1">(</span><span class="p" data-group-id="9387207938-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="1041036832-1">(</span><span class="p" data-group-id="1041036832-1">)</span></code></pre>
</section> </section>
</section> </section>
<section class="detail" id="known_currencies/0"> <section class="detail" id="known_currencies/0">
@ -1099,10 +1099,10 @@ currency code</li></ul><h2 id="known_currency_code/1-returns" class="section-hea
Examples Examples
</h2> </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="w"> </span><span class="s">&quot;AUD&quot;</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="w"> </span><span class="s">&quot;AUD&quot;</span><span class="w">
</span><span class="p" data-group-id="5947382235-1">{</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="5947382235-1">}</span><span class="w"> </span><span class="p" data-group-id="3695114458-1">{</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="3695114458-1">}</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="w"> </span><span class="s">&quot;GGG&quot;</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="w"> </span><span class="s">&quot;GGG&quot;</span><span class="w">
</span><span class="p" data-group-id="5947382235-2">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="5947382235-3">{</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="5947382235-3">}</span><span class="p" data-group-id="5947382235-2">}</span></code></pre> </span><span class="p" data-group-id="3695114458-2">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="3695114458-3">{</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="3695114458-3">}</span><span class="p" data-group-id="3695114458-2">}</span></code></pre>
</section> </section>
</section> </section>
<section class="detail" id="known_currency_code?/1"> <section class="detail" id="known_currency_code?/1">
@ -1249,14 +1249,14 @@ such as <code class="inline">0.05</code>. Optional.</li></ul><h2 id="new/2-retur
</a> </a>
Example Example
</h2> </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="7890919763-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="7890919763-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">new</span><span class="p" data-group-id="4481430544-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="4481430544-1">)</span><span class="w">
</span><span class="p" data-group-id="7890919763-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="4481430544-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="7890919763-3">%</span><span class="nc" data-group-id="7890919763-3">Cldr.Currency</span><span class="p" data-group-id="7890919763-3">{</span><span class="w"> </span><span class="p" data-group-id="4481430544-3">%</span><span class="nc" data-group-id="4481430544-3">Cldr.Currency</span><span class="p" data-group-id="4481430544-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">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_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">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">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="7890919763-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="7890919763-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="4481430544-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="4481430544-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">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">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"> </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">
@ -1266,11 +1266,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">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">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="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="7890919763-3">}</span><span class="p" data-group-id="7890919763-2">}</span><span class="w"> </span><span class="p" data-group-id="4481430544-3">}</span><span class="p" data-group-id="4481430544-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="7890919763-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="7890919763-5">)</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="4481430544-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="4481430544-5">)</span><span class="w">
</span><span class="p" data-group-id="7890919763-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="7890919763-6">}</span><span class="w"> </span><span class="p" data-group-id="4481430544-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="4481430544-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="7890919763-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="7890919763-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">new</span><span class="p" data-group-id="4481430544-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="4481430544-7">)</span><span class="w">
</span><span class="p" data-group-id="7890919763-8">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="7890919763-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="7890919763-9">}</span><span class="p" data-group-id="7890919763-8">}</span></code></pre> </span><span class="p" data-group-id="4481430544-8">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="4481430544-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="4481430544-9">}</span><span class="p" data-group-id="4481430544-8">}</span></code></pre>
</section> </section>
</section> </section>
<section class="detail" id="pluralize/3"> <section class="detail" id="pluralize/3">
@ -1315,7 +1315,7 @@ on the plural rules in effect for the <code class="inline">locale</code>.</p><h2
Options Options
</h2> </h2>
<ul><li><code class="inline">locale</code> is any valid locale name returned by <code class="inline">MyApp.Cldr.known_locale_names/0</code> <ul><li><code class="inline">locale</code> is any valid locale name returned by <code class="inline">MyApp.Cldr.known_locale_names/0</code>
or a <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.LanguageTag.html"><code class="inline">Cldr.LanguageTag</code></a> struct returned by <code class="inline">MyApp.Cldr.Locale.new!/1</code>. The or a <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.LanguageTag.html"><code class="inline">Cldr.LanguageTag</code></a> struct returned by <code class="inline">MyApp.Cldr.Locale.new!/1</code>. The
default is <a href="Plausible.Cldr.html#get_locale/0"><code class="inline">Plausible.Cldr.get_locale/0</code></a></li></ul><h2 id="pluralize/3-returns" class="section-heading"> default is <a href="Plausible.Cldr.html#get_locale/0"><code class="inline">Plausible.Cldr.get_locale/0</code></a></li></ul><h2 id="pluralize/3-returns" class="section-heading">
<a href="#pluralize/3-returns" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i> <a href="#pluralize/3-returns" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
<p class="sr-only">returns</p> <p class="sr-only">returns</p>
@ -1329,19 +1329,19 @@ default is <a href="Plausible.Cldr.html#get_locale/0"><code class="inline">Plaus
Examples Examples
</h2> </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="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="ss">:USD</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="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="ss">:USD</span><span class="w">
</span><span class="p" data-group-id="4271459082-1">{</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="4271459082-1">}</span><span class="w"> </span><span class="p" data-group-id="0804078241-1">{</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="0804078241-1">}</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="w"> </span><span class="mi">3</span><span class="p">,</span><span class="w"> </span><span class="ss">:USD</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="w"> </span><span class="mi">3</span><span class="p">,</span><span class="w"> </span><span class="ss">:USD</span><span class="w">
</span><span class="p" data-group-id="4271459082-2">{</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="4271459082-2">}</span><span class="w"> </span><span class="p" data-group-id="0804078241-2">{</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="0804078241-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="w"> </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="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="w"> </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="w">
</span><span class="p" data-group-id="4271459082-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="4271459082-3">}</span><span class="w"> </span><span class="p" data-group-id="0804078241-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="0804078241-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">pluralize</span><span class="w"> </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="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="w"> </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="w">
</span><span class="p" data-group-id="4271459082-4">{</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="4271459082-4">}</span><span class="w"> </span><span class="p" data-group-id="0804078241-4">{</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="0804078241-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="w"> </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="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="w"> </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="w">
</span><span class="p" data-group-id="4271459082-5">{</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="4271459082-5">}</span></code></pre> </span><span class="p" data-group-id="0804078241-5">{</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="0804078241-5">}</span></code></pre>
</section> </section>
</section> </section>
<section class="detail" id="strings_for_currency/2"> <section class="detail" id="strings_for_currency/2">
@ -1371,7 +1371,7 @@ in a given locale.</p><h2 id="strings_for_currency/2-arguments" class="section-h
Arguments Arguments
</h2> </h2>
<ul><li><p><code class="inline">currency</code> is an ISO4217 currency code</p></li><li><p><code class="inline">locale</code> is any valid locale name returned by <code class="inline">MyApp.Cldr.known_locale_names/0</code> <ul><li><p><code class="inline">currency</code> is an ISO4217 currency code</p></li><li><p><code class="inline">locale</code> is any valid locale name returned by <code class="inline">MyApp.Cldr.known_locale_names/0</code>
or a <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.LanguageTag.html"><code class="inline">Cldr.LanguageTag</code></a> struct returned by <code class="inline">MyApp.Cldr.Locale.new!/1</code></p></li></ul><h2 id="strings_for_currency/2-returns" class="section-heading"> or a <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.LanguageTag.html"><code class="inline">Cldr.LanguageTag</code></a> struct returned by <code class="inline">MyApp.Cldr.Locale.new!/1</code></p></li></ul><h2 id="strings_for_currency/2-returns" class="section-heading">
<a href="#strings_for_currency/2-returns" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i> <a href="#strings_for_currency/2-returns" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
<p class="sr-only">returns</p> <p class="sr-only">returns</p>
</a> </a>
@ -1384,7 +1384,7 @@ or a <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.LanguageTag.html"><code cla
Example Example
</h2> </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="w"> </span><span class="ss">:AUD</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;en&quot;</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">strings_for_currency</span><span class="w"> </span><span class="ss">:AUD</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;en&quot;</span><span class="w">
</span><span class="p" data-group-id="3223404456-1">[</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="3223404456-1">]</span></code></pre> </span><span class="p" data-group-id="4076196329-1">[</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="4076196329-1">]</span></code></pre>
</section> </section>
</section> </section>

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>
@ -191,6 +191,16 @@ with the provided locale name.</p></div>
</div> </div>
<div class="summary-row">
<div class="summary-signature">
<a href="#script_direction_from_locale/1" translate="no">script_direction_from_locale(locale)</a>
</div>
<div class="summary-synopsis"><p>Returns the script direction for a locale.</p></div>
</div>
<div class="summary-row"> <div class="summary-row">
<div class="summary-signature"> <div class="summary-signature">
<a href="#territory_from_host/1" translate="no">territory_from_host(host)</a> <a href="#territory_from_host/1" translate="no">territory_from_host(host)</a>
@ -261,8 +271,8 @@ Functions
<div class="specs"> <div class="specs">
<pre translate="no"><span class="attribute">@spec</span> fallback_locale_names(<a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.LanguageTag.html#t:t/0">Cldr.LanguageTag.t</a>() | <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.Locale.html#t:locale_reference/0">Cldr.Locale.locale_reference</a>()) :: <pre translate="no"><span class="attribute">@spec</span> fallback_locale_names(<a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.LanguageTag.html#t:t/0">Cldr.LanguageTag.t</a>() | <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.Locale.html#t:locale_reference/0">Cldr.Locale.locale_reference</a>()) ::
{:ok, [<a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.Locale.html#t:locale_name/0">Cldr.Locale.locale_name</a>(), ...]} | {:error, {<a href="https://hexdocs.pm/elixir/typespecs.html#built-in-types">module</a>(), <a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>()}}</pre> {:ok, [<a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.Locale.html#t:locale_name/0">Cldr.Locale.locale_name</a>(), ...]} | {:error, {<a href="https://hexdocs.pm/elixir/typespecs.html#built-in-types">module</a>(), <a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>()}}</pre>
</div> </div>
@ -270,9 +280,7 @@ Functions
with the provided locale name.</p><p>Fallbacks are a list of locate names which can with the provided locale name.</p><p>Fallbacks are a list of locate names which can
be used to resolve translation or other localization be used to resolve translation or other localization
data if such localised data does not exist for data if such localised data does not exist for
this specific locale. After locale-specific fallbacks this specific locale..</p><h2 id="fallback_locale_names/1-arguments" class="section-heading">
are determined, the the default locale and its fallbacks
are added to the chain.</p><h2 id="fallback_locale_names/1-arguments" class="section-heading">
<a href="#fallback_locale_names/1-arguments" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i> <a href="#fallback_locale_names/1-arguments" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
<p class="sr-only">arguments</p> <p class="sr-only">arguments</p>
</a> </a>
@ -291,16 +299,16 @@ are added to the chain.</p><h2 id="fallback_locale_names/1-arguments" class="sec
</a> </a>
Examples Examples
</h2> </h2>
<p>In these examples the default locale is <code class="inline">:&quot;en-001&quot;</code>.</p><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="6452638439-1">(</span><span class="ss">:&quot;fr-CA&quot;</span><span class="p" data-group-id="6452638439-1">)</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="2498249352-1">(</span><span class="ss">:&quot;fr-CA&quot;</span><span class="p" data-group-id="2498249352-1">)</span><span class="w">
</span><span class="p" data-group-id="6452638439-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="6452638439-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">:&quot;en-001&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">:en</span><span class="p" data-group-id="6452638439-3">]</span><span class="p" data-group-id="6452638439-2">}</span><span class="w"> </span><span class="p" data-group-id="2498249352-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="2498249352-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="2498249352-3">]</span><span class="p" data-group-id="2498249352-2">}</span><span class="w">
</span><span class="c1"># Fallbacks are typically formed by progressively</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"># 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"># 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="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="6452638439-4">(</span><span class="ss">:nb</span><span class="p" data-group-id="6452638439-4">)</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="2498249352-4">(</span><span class="ss">:nb</span><span class="p" data-group-id="2498249352-4">)</span><span class="w">
</span><span class="p" data-group-id="6452638439-5">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="6452638439-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">:&quot;en-001&quot;</span><span class="p">,</span><span class="w"> </span><span class="ss">:en</span><span class="p" data-group-id="6452638439-6">]</span><span class="p" data-group-id="6452638439-5">}</span></code></pre> </span><span class="p" data-group-id="2498249352-5">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="2498249352-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="2498249352-6">]</span><span class="p" data-group-id="2498249352-5">}</span></code></pre>
</section> </section>
</section> </section>
<section class="detail" id="fallback_locales/1"> <section class="detail" id="fallback_locales/1">
@ -326,8 +334,8 @@ are added to the chain.</p><h2 id="fallback_locale_names/1-arguments" class="sec
<div class="specs"> <div class="specs">
<pre translate="no"><span class="attribute">@spec</span> fallback_locales(<a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.LanguageTag.html#t:t/0">Cldr.LanguageTag.t</a>() | <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.Locale.html#t:locale_reference/0">Cldr.Locale.locale_reference</a>()) :: <pre translate="no"><span class="attribute">@spec</span> fallback_locales(<a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.LanguageTag.html#t:t/0">Cldr.LanguageTag.t</a>() | <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.Locale.html#t:locale_reference/0">Cldr.Locale.locale_reference</a>()) ::
{:ok, [<a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.LanguageTag.html#t:t/0">Cldr.LanguageTag.t</a>(), ...]} | {:error, {<a href="https://hexdocs.pm/elixir/typespecs.html#built-in-types">module</a>(), <a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>()}}</pre> {:ok, [<a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.LanguageTag.html#t:t/0">Cldr.LanguageTag.t</a>(), ...]} | {:error, {<a href="https://hexdocs.pm/elixir/typespecs.html#built-in-types">module</a>(), <a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>()}}</pre>
</div> </div>
@ -335,9 +343,7 @@ are added to the chain.</p><h2 id="fallback_locale_names/1-arguments" class="sec
with the provided locale name.</p><p>Fallbacks are a list of locate names which can with the provided locale name.</p><p>Fallbacks are a list of locate names which can
be used to resolve translation or other localization be used to resolve translation or other localization
data if such localised data does not exist for data if such localised data does not exist for
this specific locale. After locale-specific fallbacks this specific locale.</p><h2 id="fallback_locales/1-arguments" class="section-heading">
are determined, the the default locale and its fallbacks
are added to the chain.</p><h2 id="fallback_locales/1-arguments" class="section-heading">
<a href="#fallback_locales/1-arguments" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i> <a href="#fallback_locales/1-arguments" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
<p class="sr-only">arguments</p> <p class="sr-only">arguments</p>
</a> </a>
@ -356,20 +362,20 @@ are added to the chain.</p><h2 id="fallback_locales/1-arguments" class="section-
</a> </a>
Examples Examples
</h2> </h2>
<p>In these examples the default locale is <code class="inline">:&quot;en-001&quot;</code>.</p><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="5345149310-1">(</span><span class="ss">:&quot;fr-CA&quot;</span><span class="p" data-group-id="5345149310-1">)</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="0612286336-1">(</span><span class="ss">:&quot;fr-CA&quot;</span><span class="p" data-group-id="0612286336-1">)</span><span class="w">
</span><span class="p">=&gt;</span><span class="w"> </span><span class="p" data-group-id="5345149310-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="p" data-group-id="0612286336-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="5345149310-3">[</span><span class="p" data-group-id="5345149310-4">#</span><span class="nc" data-group-id="5345149310-4">Cldr.LanguageTag</span><span class="p" data-group-id="5345149310-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="5345149310-5">[</span><span class="n">validated</span><span class="p" data-group-id="5345149310-5">]</span><span class="p" data-group-id="5345149310-4">&gt;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="5345149310-6">#</span><span class="nc" data-group-id="5345149310-6">Cldr.LanguageTag</span><span class="p" data-group-id="5345149310-6">&lt;</span><span class="n">fr</span><span class="w"> </span><span class="p" data-group-id="5345149310-7">[</span><span class="n">validated</span><span class="p" data-group-id="5345149310-7">]</span><span class="p" data-group-id="5345149310-6">&gt;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="0612286336-3">[</span><span class="p" data-group-id="0612286336-4">#</span><span class="nc" data-group-id="0612286336-4">Cldr.LanguageTag</span><span class="p" data-group-id="0612286336-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="0612286336-5">[</span><span class="n">validated</span><span class="p" data-group-id="0612286336-5">]</span><span class="p" data-group-id="0612286336-4">&gt;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="0612286336-6">#</span><span class="nc" data-group-id="0612286336-6">Cldr.LanguageTag</span><span class="p" data-group-id="0612286336-6">&lt;</span><span class="n">fr</span><span class="w"> </span><span class="p" data-group-id="0612286336-7">[</span><span class="n">validated</span><span class="p" data-group-id="0612286336-7">]</span><span class="p" data-group-id="0612286336-6">&gt;</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="5345149310-8">#</span><span class="nc" data-group-id="5345149310-8">Cldr.LanguageTag</span><span class="p" data-group-id="5345149310-8">&lt;</span><span class="n">en</span><span class="w"> </span><span class="p" data-group-id="5345149310-9">[</span><span class="n">validated</span><span class="p" data-group-id="5345149310-9">]</span><span class="p" data-group-id="5345149310-8">&gt;</span><span class="p" data-group-id="5345149310-3">]</span><span class="p" data-group-id="5345149310-2">}</span><span class="w"> </span><span class="p" data-group-id="0612286336-8">#</span><span class="nc" data-group-id="0612286336-8">Cldr.LanguageTag</span><span class="p" data-group-id="0612286336-8">&lt;</span><span class="n">und</span><span class="w"> </span><span class="p" data-group-id="0612286336-9">[</span><span class="n">validated</span><span class="p" data-group-id="0612286336-9">]</span><span class="p" data-group-id="0612286336-8">&gt;</span><span class="p" data-group-id="0612286336-3">]</span><span class="p" data-group-id="0612286336-2">}</span><span class="w">
</span><span class="c1"># Fallbacks are typically formed by progressively</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"># 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"># 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="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="5345149310-10">(</span><span class="ss">:nb</span><span class="p" data-group-id="5345149310-10">)</span><span class="p">)</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="0612286336-10">(</span><span class="ss">:nb</span><span class="p" data-group-id="0612286336-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="5345149310-11">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="p" data-group-id="0612286336-11">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="5345149310-12">[</span><span class="p" data-group-id="5345149310-13">#</span><span class="nc" data-group-id="5345149310-13">Cldr.LanguageTag</span><span class="p" data-group-id="5345149310-13">&lt;</span><span class="n">nb</span><span class="w"> </span><span class="p" data-group-id="5345149310-14">[</span><span class="n">validated</span><span class="p" data-group-id="5345149310-14">]</span><span class="p" data-group-id="5345149310-13">&gt;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="5345149310-15">#</span><span class="nc" data-group-id="5345149310-15">Cldr.LanguageTag</span><span class="p" data-group-id="5345149310-15">&lt;</span><span class="n">no</span><span class="w"> </span><span class="p" data-group-id="5345149310-16">[</span><span class="n">validated</span><span class="p" data-group-id="5345149310-16">]</span><span class="p" data-group-id="5345149310-15">&gt;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="0612286336-12">[</span><span class="p" data-group-id="0612286336-13">#</span><span class="nc" data-group-id="0612286336-13">Cldr.LanguageTag</span><span class="p" data-group-id="0612286336-13">&lt;</span><span class="n">nb</span><span class="w"> </span><span class="p" data-group-id="0612286336-14">[</span><span class="n">validated</span><span class="p" data-group-id="0612286336-14">]</span><span class="p" data-group-id="0612286336-13">&gt;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="0612286336-15">#</span><span class="nc" data-group-id="0612286336-15">Cldr.LanguageTag</span><span class="p" data-group-id="0612286336-15">&lt;</span><span class="n">no</span><span class="w"> </span><span class="p" data-group-id="0612286336-16">[</span><span class="n">validated</span><span class="p" data-group-id="0612286336-16">]</span><span class="p" data-group-id="0612286336-15">&gt;</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="5345149310-17">#</span><span class="nc" data-group-id="5345149310-17">Cldr.LanguageTag</span><span class="p" data-group-id="5345149310-17">&lt;</span><span class="n">en</span><span class="w"> </span><span class="p" data-group-id="5345149310-18">[</span><span class="n">validated</span><span class="p" data-group-id="5345149310-18">]</span><span class="p" data-group-id="5345149310-17">&gt;</span><span class="p" data-group-id="5345149310-12">]</span><span class="p" data-group-id="5345149310-11">}</span></code></pre> </span><span class="p" data-group-id="0612286336-17">#</span><span class="nc" data-group-id="0612286336-17">Cldr.LanguageTag</span><span class="p" data-group-id="0612286336-17">&lt;</span><span class="n">und</span><span class="w"> </span><span class="p" data-group-id="0612286336-18">[</span><span class="n">validated</span><span class="p" data-group-id="0612286336-18">]</span><span class="p" data-group-id="0612286336-17">&gt;</span><span class="p" data-group-id="0612286336-12">]</span><span class="p" data-group-id="0612286336-11">}</span></code></pre>
</section> </section>
</section> </section>
<section class="detail" id="locale_for_territory/1"> <section class="detail" id="locale_for_territory/1">
@ -395,8 +401,8 @@ are added to the chain.</p><h2 id="fallback_locales/1-arguments" class="section-
<div class="specs"> <div class="specs">
<pre translate="no"><span class="attribute">@spec</span> locale_for_territory(<a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.Locale.html#t:territory_code/0">Cldr.Locale.territory_code</a>()) :: <pre translate="no"><span class="attribute">@spec</span> locale_for_territory(<a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.Locale.html#t:territory_code/0">Cldr.Locale.territory_code</a>()) ::
{:ok, <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.LanguageTag.html#t:t/0">Cldr.LanguageTag.t</a>()} | {:error, {<a href="https://hexdocs.pm/elixir/typespecs.html#built-in-types">module</a>(), <a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>()}}</pre> {:ok, <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.LanguageTag.html#t:t/0">Cldr.LanguageTag.t</a>()} | {:error, {<a href="https://hexdocs.pm/elixir/typespecs.html#built-in-types">module</a>(), <a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>()}}</pre>
</div> </div>
@ -413,7 +419,7 @@ is validated and if that fails, &quot;en&quot; is validated.</p><h2 id="locale_f
Arguments Arguments
</h2> </h2>
<ul><li><code class="inline">territory</code> is any ISO 3166 Alpha-2 territory <ul><li><code class="inline">territory</code> is any ISO 3166 Alpha-2 territory
code that can be validated by <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.html#validate_territory/1"><code class="inline">Cldr.validate_territory/1</code></a></li></ul><h2 id="locale_for_territory/1-returns" class="section-heading"> code that can be validated by <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.html#validate_territory/1"><code class="inline">Cldr.validate_territory/1</code></a></li></ul><h2 id="locale_for_territory/1-returns" class="section-heading">
<a href="#locale_for_territory/1-returns" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i> <a href="#locale_for_territory/1-returns" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
<p class="sr-only">returns</p> <p class="sr-only">returns</p>
</a> </a>
@ -457,7 +463,7 @@ code that can be validated by <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.ht
<div class="specs"> <div class="specs">
<pre translate="no"><span class="attribute">@spec</span> locale_from_host(<a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>(), <a href="https://hexdocs.pm/elixir/Keyword.html#t:t/0">Keyword.t</a>()) :: <pre translate="no"><span class="attribute">@spec</span> locale_from_host(<a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>(), <a href="https://hexdocs.pm/elixir/Keyword.html#t:t/0">Keyword.t</a>()) ::
{:ok, <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.LanguageTag.html#t:t/0">Cldr.LanguageTag.t</a>()} | {:error, {<a href="https://hexdocs.pm/elixir/typespecs.html#built-in-types">module</a>(), <a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>()}}</pre> {:ok, <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.LanguageTag.html#t:t/0">Cldr.LanguageTag.t</a>()} | {:error, {<a href="https://hexdocs.pm/elixir/typespecs.html#built-in-types">module</a>(), <a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>()}}</pre>
</div> </div>
@ -476,7 +482,7 @@ is <code class="inline">[]</code>.</p></li></ul><h2 id="locale_from_host/2-optio
</h2> </h2>
<ul><li><code class="inline">:tlds</code> is a list of territory codes as upper-cased <ul><li><code class="inline">:tlds</code> is a list of territory codes as upper-cased
atoms that are to be considered as top-level domains. atoms that are to be considered as top-level domains.
See <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.Locale.html#locale_from_host/2"><code class="inline">Cldr.Locale.locale_from_host/2</code></a> for the default See <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.Locale.html#locale_from_host/2"><code class="inline">Cldr.Locale.locale_from_host/2</code></a> for the default
list.</li></ul><h2 id="locale_from_host/2-returns" class="section-heading"> list.</li></ul><h2 id="locale_from_host/2-returns" class="section-heading">
<a href="#locale_from_host/2-returns" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i> <a href="#locale_from_host/2-returns" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
<p class="sr-only">returns</p> <p class="sr-only">returns</p>
@ -500,15 +506,15 @@ generic top-level domain names.</p><h2 id="locale_from_host/2-examples" class="s
Examples Examples
</h2> </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"> <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="5715553352-1">(</span><span class="ss">:&quot;en-AU&quot;</span><span class="p" data-group-id="5715553352-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="8229184312-1">(</span><span class="ss">:&quot;en-AU&quot;</span><span class="p" data-group-id="8229184312-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="5715553352-2">(</span><span class="s">&quot;a.b.com.tv&quot;</span><span class="p" data-group-id="5715553352-2">)</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="8229184312-2">(</span><span class="s">&quot;a.b.com.tv&quot;</span><span class="p" data-group-id="8229184312-2">)</span><span class="w">
</span><span class="p" data-group-id="5715553352-3">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="8229184312-3">{</span><span class="ss">:error</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="5715553352-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="5715553352-4">}</span><span class="p" data-group-id="5715553352-3">}</span><span class="w"> </span><span class="p" data-group-id="8229184312-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="8229184312-4">}</span><span class="p" data-group-id="8229184312-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="5715553352-5">(</span><span class="s">&quot;a.b.com&quot;</span><span class="p" data-group-id="5715553352-5">)</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="8229184312-5">(</span><span class="s">&quot;a.b.com&quot;</span><span class="p" data-group-id="8229184312-5">)</span><span class="w">
</span><span class="p" data-group-id="5715553352-6">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="8229184312-6">{</span><span class="ss">:error</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="5715553352-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="5715553352-7">}</span><span class="p" data-group-id="5715553352-6">}</span></code></pre> </span><span class="p" data-group-id="8229184312-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="8229184312-7">}</span><span class="p" data-group-id="8229184312-6">}</span></code></pre>
</section> </section>
</section> </section>
<section class="detail" id="new/1"> <section class="detail" id="new/1">
@ -553,6 +559,54 @@ generic top-level domain names.</p><h2 id="locale_from_host/2-examples" class="s
<section class="docstring"> <section class="docstring">
</section>
</section>
<section class="detail" id="script_direction_from_locale/1">
<div class="detail-header">
<a href="#script_direction_from_locale/1" class="detail-link" title="Link to this function">
<i class="ri-link-m" aria-hidden="true"></i>
<span class="sr-only">Link to this function</span>
</a>
<h1 class="signature" translate="no">script_direction_from_locale(locale)</h1>
<a href="https://github.com/plausible/analytics/blob/main/lib/plausible/cldr.ex#L1" class="icon-action" rel="help" title="View Source">
<i class="ri-code-s-slash-line" aria-hidden="true"></i>
<span class="sr-only">View Source</span>
</a>
<span class="note">(since 2.37.0)</span>
</div>
<section class="docstring">
<p>Returns the script direction for a locale.</p><h2 id="script_direction_from_locale/1-arguments" class="section-heading">
<a href="#script_direction_from_locale/1-arguments" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
<p class="sr-only">arguments</p>
</a>
Arguments
</h2>
<ul><li><code class="inline">language_tag</code> is any language tag returned by <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.Locale.html#new/2"><code class="inline">Cldr.Locale.new/2</code></a>
or any <code class="inline">locale_name</code> returned by <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.html#known_locale_names/1"><code class="inline">Cldr.known_locale_names/1</code></a>.</li></ul><h2 id="script_direction_from_locale/1-returns" class="section-heading">
<a href="#script_direction_from_locale/1-returns" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
<p class="sr-only">returns</p>
</a>
Returns
</h2>
<ul><li>The script direction which is either <code class="inline">:ltr</code> (for left-to-right
scripts) or <code class="inline">:rtl</code> (for right-to-left scripts).</li></ul><h2 id="script_direction_from_locale/1-examples" class="section-heading">
<a href="#script_direction_from_locale/1-examples" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
<p class="sr-only">examples</p>
</a>
Examples
</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">script_direction_from_locale</span><span class="w"> </span><span class="s">&quot;en-US&quot;</span><span class="w">
</span><span class="ss">:ltr</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">script_direction_from_locale</span><span class="w"> </span><span class="ss">:ar</span><span class="w">
</span><span class="ss">:rtl</span></code></pre>
</section> </section>
</section> </section>
<section class="detail" id="territory_from_host/1"> <section class="detail" id="territory_from_host/1">
@ -579,7 +633,7 @@ generic top-level domain names.</p><h2 id="locale_from_host/2-examples" class="s
<div class="specs"> <div class="specs">
<pre translate="no"><span class="attribute">@spec</span> territory_from_host(<a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>()) :: <pre translate="no"><span class="attribute">@spec</span> territory_from_host(<a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>()) ::
{:ok, <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.Locale.html#t:territory_code/0">Cldr.Locale.territory_code</a>()} | {:error, {<a href="https://hexdocs.pm/elixir/typespecs.html#built-in-types">module</a>(), <a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>()}}</pre> {:ok, <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.Locale.html#t:territory_code/0">Cldr.Locale.territory_code</a>()} | {:error, {<a href="https://hexdocs.pm/elixir/typespecs.html#built-in-types">module</a>(), <a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>()}}</pre>
</div> </div>
@ -602,12 +656,12 @@ be a territory.</p><h2 id="territory_from_host/1-arguments" class="section-headi
</a> </a>
Examples Examples
</h2> </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="0797739893-1">(</span><span class="s">&quot;a.b.com.au&quot;</span><span class="p" data-group-id="0797739893-1">)</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="6771187542-1">(</span><span class="s">&quot;a.b.com.au&quot;</span><span class="p" data-group-id="6771187542-1">)</span><span class="w">
</span><span class="p" data-group-id="0797739893-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="0797739893-2">}</span><span class="w"> </span><span class="p" data-group-id="6771187542-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="6771187542-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="0797739893-3">(</span><span class="s">&quot;a.b.com&quot;</span><span class="p" data-group-id="0797739893-3">)</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="6771187542-3">(</span><span class="s">&quot;a.b.com&quot;</span><span class="p" data-group-id="6771187542-3">)</span><span class="w">
</span><span class="p" data-group-id="0797739893-4">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="6771187542-4">{</span><span class="ss">:error</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="0797739893-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="0797739893-5">}</span><span class="p" data-group-id="0797739893-4">}</span></code></pre> </span><span class="p" data-group-id="6771187542-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="6771187542-5">}</span><span class="p" data-group-id="6771187542-4">}</span></code></pre>
</section> </section>
</section> </section>
<section class="detail" id="territory_from_locale/1"> <section class="detail" id="territory_from_locale/1">
@ -633,8 +687,8 @@ be a territory.</p><h2 id="territory_from_host/1-arguments" class="section-headi
<div class="specs"> <div class="specs">
<pre translate="no"><span class="attribute">@spec</span> territory_from_locale(<a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.LanguageTag.html#t:t/0">Cldr.LanguageTag.t</a>() | <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.Locale.html#t:locale_name/0">Cldr.Locale.locale_name</a>()) :: <pre translate="no"><span class="attribute">@spec</span> territory_from_locale(<a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.LanguageTag.html#t:t/0">Cldr.LanguageTag.t</a>() | <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.Locale.html#t:locale_name/0">Cldr.Locale.locale_name</a>()) ::
<a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.Locale.html#t:territory_code/0">Cldr.Locale.territory_code</a>()</pre> <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.Locale.html#t:territory_code/0">Cldr.Locale.territory_code</a>()</pre>
</div> </div>
@ -690,7 +744,7 @@ or a locale name in the list returned by
<div class="specs"> <div class="specs">
<pre translate="no"><span class="attribute">@spec</span> timezone_from_locale(<a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.LanguageTag.html#t:t/0">Cldr.LanguageTag.t</a>() | <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.Locale.html#t:locale_name/0">Cldr.Locale.locale_name</a>()) :: <pre translate="no"><span class="attribute">@spec</span> timezone_from_locale(<a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.LanguageTag.html#t:t/0">Cldr.LanguageTag.t</a>() | <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.Locale.html#t:locale_name/0">Cldr.Locale.locale_name</a>()) ::
<a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>() | {:error, {<a href="https://hexdocs.pm/elixir/typespecs.html#built-in-types">module</a>(), <a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>()}}</pre> <a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>() | {:error, {<a href="https://hexdocs.pm/elixir/typespecs.html#built-in-types">module</a>(), <a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>()}}</pre>
</div> </div>

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>
@ -249,13 +249,13 @@ Functions
<div class="specs"> <div class="specs">
<pre translate="no"><span class="attribute">@spec</span> known_locale_names() :: [<a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.Locale.html#t:locale_name/0">Cldr.Locale.locale_name</a>(), ...]</pre> <pre translate="no"><span class="attribute">@spec</span> known_locale_names() :: [<a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.Locale.html#t:locale_name/0">Cldr.Locale.locale_name</a>(), ...]</pre>
</div> </div>
<p>The configured locales for which plural rules are defined.</p><p>Returns the intersection of <a href="Plausible.Cldr.html#known_locale_names/0"><code class="inline">Plausible.Cldr.known_locale_names/0</code></a> and <p>The configured locales for which plural rules are defined.</p><p>Returns the intersection of <a href="Plausible.Cldr.html#known_locale_names/0"><code class="inline">Plausible.Cldr.known_locale_names/0</code></a> and
the locales for which Cardinal plural rules are defined.</p><p>There are many <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.html"><code class="inline">Cldr</code></a> locales which don't have their own plural the locales for which Cardinal plural rules are defined.</p><p>There are many <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.html"><code class="inline">Cldr</code></a> locales which don't have their own plural
rules so this list is the intersection of <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.html"><code class="inline">Cldr</code></a>'s configured rules so this list is the intersection of <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.html"><code class="inline">Cldr</code></a>'s configured
locales and those that have rules.</p> locales and those that have rules.</p>
</section> </section>
</section> </section>
@ -283,10 +283,10 @@ locales and those that have rules.</p>
<div class="specs"> <div class="specs">
<pre translate="no"><span class="attribute">@spec</span> plural_rule( <pre translate="no"><span class="attribute">@spec</span> plural_rule(
<a href="https://hexdocs.pm/cldr_utils/2.22.0/Cldr.Math.html#t:number_or_decimal/0">Cldr.Math.number_or_decimal</a>(), <a href="https://hexdocs.pm/cldr_utils/2.24.1/Cldr.Math.html#t:number_or_decimal/0">Cldr.Math.number_or_decimal</a>(),
<a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.Locale.html#t:locale_name/0">Cldr.Locale.locale_name</a>() | <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.LanguageTag.html#t:t/0">Cldr.LanguageTag.t</a>(), <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.Locale.html#t:locale_name/0">Cldr.Locale.locale_name</a>() | <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.LanguageTag.html#t:t/0">Cldr.LanguageTag.t</a>(),
<a href="https://hexdocs.pm/elixir/typespecs.html#basic-types">atom</a>() | <a href="https://hexdocs.pm/elixir/typespecs.html#basic-types">pos_integer</a>() <a href="https://hexdocs.pm/elixir/typespecs.html#basic-types">atom</a>() | <a href="https://hexdocs.pm/elixir/typespecs.html#basic-types">pos_integer</a>()
) :: <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.Number.PluralRule.html#t:plural_type/0">Cldr.Number.PluralRule.plural_type</a>()</pre> ) :: <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.Number.PluralRule.html#t:plural_type/0">Cldr.Number.PluralRule.plural_type</a>()</pre>
</div> </div>
@ -302,7 +302,7 @@ list or other content in a plural-sensitive way.</p><h2 id="plural_rule/3-argume
</a> </a>
Arguments Arguments
</h2> </h2>
<ul><li><p><code class="inline">number</code> is any <code class="inline">integer</code>, <code class="inline">float</code> or <a href="https://hexdocs.pm/decimal/2.1.1/Decimal.html"><code class="inline">Decimal</code></a></p></li><li><p><code class="inline">locale</code> is any locale returned by <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.Locale.html#new!/2"><code class="inline">Cldr.Locale.new!/2</code></a> or any <ul><li><p><code class="inline">number</code> is any <code class="inline">integer</code>, <code class="inline">float</code> or <a href="https://hexdocs.pm/decimal/2.1.1/Decimal.html"><code class="inline">Decimal</code></a></p></li><li><p><code class="inline">locale</code> is any locale returned by <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.Locale.html#new!/2"><code class="inline">Cldr.Locale.new!/2</code></a> or any
<code class="inline">locale_name</code> returned by <a href="Plausible.Cldr.html#known_locale_names/0"><code class="inline">Plausible.Cldr.known_locale_names/0</code></a></p></li><li><p><code class="inline">rounding</code> is one of <code class="inline">[:down, :up, :ceiling, :floor, :half_even, :half_up, :half_down]</code>. The <code class="inline">locale_name</code> returned by <a href="Plausible.Cldr.html#known_locale_names/0"><code class="inline">Plausible.Cldr.known_locale_names/0</code></a></p></li><li><p><code class="inline">rounding</code> is one of <code class="inline">[:down, :up, :ceiling, :floor, :half_even, :half_up, :half_down]</code>. The
default is <code class="inline">:half_even</code>.</p></li></ul><h2 id="plural_rule/3-examples" class="section-heading"> default is <code class="inline">:half_even</code>.</p></li></ul><h2 id="plural_rule/3-examples" class="section-heading">
<a href="#plural_rule/3-examples" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i> <a href="#plural_rule/3-examples" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
@ -366,7 +366,7 @@ default is <code class="inline">:half_even</code>.</p></li></ul><h2 id="plural_r
<div class="specs"> <div class="specs">
<pre translate="no"><span class="attribute">@spec</span> plural_rules_for(<a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.Locale.html#t:locale_name/0">Cldr.Locale.locale_name</a>() | <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.LanguageTag.html#t:t/0">Cldr.LanguageTag.t</a>()) :: [ <pre translate="no"><span class="attribute">@spec</span> plural_rules_for(<a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.Locale.html#t:locale_name/0">Cldr.Locale.locale_name</a>() | <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.LanguageTag.html#t:t/0">Cldr.LanguageTag.t</a>()) :: [
{<a href="https://hexdocs.pm/elixir/typespecs.html#basic-types">atom</a>(), <a href="https://hexdocs.pm/elixir/typespecs.html#built-in-types">list</a>()}, {<a href="https://hexdocs.pm/elixir/typespecs.html#basic-types">atom</a>(), <a href="https://hexdocs.pm/elixir/typespecs.html#built-in-types">list</a>()},
... ...
]</pre> ]</pre>
@ -405,8 +405,8 @@ default is <code class="inline">:half_even</code>.</p></li></ul><h2 id="plural_r
<div class="specs"> <div class="specs">
<pre translate="no"><span class="attribute">@spec</span> pluralize( <pre translate="no"><span class="attribute">@spec</span> pluralize(
<a href="https://hexdocs.pm/cldr_utils/2.22.0/Cldr.Math.html#t:number_or_decimal/0">Cldr.Math.number_or_decimal</a>() | <a href="https://hexdocs.pm/elixir/Range.html#t:t/0">Range.t</a>(), <a href="https://hexdocs.pm/cldr_utils/2.24.1/Cldr.Math.html#t:number_or_decimal/0">Cldr.Math.number_or_decimal</a>() | <a href="https://hexdocs.pm/elixir/Range.html#t:t/0">Range.t</a>(),
<a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.Locale.html#t:locale_reference/0">Cldr.Locale.locale_reference</a>(), <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.Locale.html#t:locale_reference/0">Cldr.Locale.locale_reference</a>(),
%{} %{}
) :: <a href="https://hexdocs.pm/elixir/typespecs.html#basic-types">any</a>()</pre> ) :: <a href="https://hexdocs.pm/elixir/typespecs.html#basic-types">any</a>()</pre>
@ -428,31 +428,31 @@ The valid substitution keys are <code class="inline">:zero</code>, <code class="
</a> </a>
Examples Examples
</h2> </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="5500764622-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="5500764622-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="3492568097-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="3492568097-1">}</span><span class="w">
</span><span class="s">&quot;one&quot;</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="5500764622-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="5500764622-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="3492568097-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="3492568097-2">}</span><span class="w">
</span><span class="no">nil</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="5500764622-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="5500764622-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="3492568097-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="3492568097-3">}</span><span class="w">
</span><span class="s">&quot;other&quot;</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="5500764622-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="5500764622-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="3492568097-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="3492568097-4">}</span><span class="w">
</span><span class="s">&quot;other&quot;</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="5500764622-5">(</span><span class="mi">1</span><span class="p" data-group-id="5500764622-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="5500764622-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="5500764622-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="3492568097-5">(</span><span class="mi">1</span><span class="p" data-group-id="3492568097-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="3492568097-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="3492568097-6">}</span><span class="w">
</span><span class="s">&quot;one&quot;</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="5500764622-7">(</span><span class="mi">2</span><span class="p" data-group-id="5500764622-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="5500764622-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="5500764622-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="3492568097-7">(</span><span class="mi">2</span><span class="p" data-group-id="3492568097-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="3492568097-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="3492568097-8">}</span><span class="w">
</span><span class="no">nil</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="5500764622-9">(</span><span class="mi">2</span><span class="p" data-group-id="5500764622-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="5500764622-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="5500764622-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="3492568097-9">(</span><span class="mi">2</span><span class="p" data-group-id="3492568097-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="3492568097-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="3492568097-10">}</span><span class="w">
</span><span class="no">nil</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="5500764622-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="5500764622-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="3492568097-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="3492568097-11">}</span><span class="w">
</span><span class="s">&quot;few&quot;</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="5500764622-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="5500764622-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="3492568097-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="3492568097-12">}</span><span class="w">
</span><span class="s">&quot;other&quot;</span></code></pre> </span><span class="s">&quot;other&quot;</span></code></pre>
</section> </section>
</section> </section>

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>
@ -302,7 +302,7 @@ Functions
<div class="specs"> <div class="specs">
<pre translate="no"><span class="attribute">@spec</span> all_formats_for(<a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.LanguageTag.html#t:t/0">Cldr.LanguageTag.t</a>() | <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.Locale.html#t:locale_name/0">Cldr.Locale.locale_name</a>()) :: <pre translate="no"><span class="attribute">@spec</span> all_formats_for(<a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.LanguageTag.html#t:t/0">Cldr.LanguageTag.t</a>() | <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.Locale.html#t:locale_name/0">Cldr.Locale.locale_name</a>()) ::
{:ok, <a href="https://hexdocs.pm/elixir/typespecs.html#basic-types">map</a>()} | {:error, {<a href="https://hexdocs.pm/elixir/typespecs.html#built-in-types">module</a>(), <a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>()}}</pre> {:ok, <a href="https://hexdocs.pm/elixir/typespecs.html#basic-types">map</a>()} | {:error, {<a href="https://hexdocs.pm/elixir/typespecs.html#built-in-types">module</a>(), <a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>()}}</pre>
</div> </div>
@ -315,7 +315,7 @@ Functions
</h2> </h2>
<ul><li><code class="inline">locale</code> is any valid locale name returned by <ul><li><code class="inline">locale</code> is any valid locale name returned by
<a href="Plausible.Cldr.html#known_locale_names/0"><code class="inline">Plausible.Cldr.known_locale_names/0</code></a> <a href="Plausible.Cldr.html#known_locale_names/0"><code class="inline">Plausible.Cldr.known_locale_names/0</code></a>
or a <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.LanguageTag.html"><code class="inline">Cldr.LanguageTag</code></a> struct returned by or a <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.LanguageTag.html"><code class="inline">Cldr.LanguageTag</code></a> struct returned by
<a href="Plausible.Cldr.Locale.html#new!/1"><code class="inline">Plausible.Cldr.Locale.new!/1</code></a>. The default <a href="Plausible.Cldr.Locale.html#new!/1"><code class="inline">Plausible.Cldr.Locale.new!/1</code></a>. The default
is <a href="Plausible.Cldr.html#get_locale/0"><code class="inline">Plausible.Cldr.get_locale/0</code></a>.</li></ul><h2 id="all_formats_for/1-returns" class="section-heading"> is <a href="Plausible.Cldr.html#get_locale/0"><code class="inline">Plausible.Cldr.get_locale/0</code></a>.</li></ul><h2 id="all_formats_for/1-returns" class="section-heading">
<a href="#all_formats_for/1-returns" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i> <a href="#all_formats_for/1-returns" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
@ -350,7 +350,7 @@ keyed by number system or</p></li><li><p><code class="inline">{:error, {exceptio
<div class="specs"> <div class="specs">
<pre translate="no"><span class="attribute">@spec</span> all_formats_for!(<a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.LanguageTag.html#t:t/0">Cldr.LanguageTag.t</a>() | <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.Locale.html#t:locale_name/0">Cldr.Locale.locale_name</a>()) :: <pre translate="no"><span class="attribute">@spec</span> all_formats_for!(<a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.LanguageTag.html#t:t/0">Cldr.LanguageTag.t</a>() | <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.Locale.html#t:locale_name/0">Cldr.Locale.locale_name</a>()) ::
<a href="https://hexdocs.pm/elixir/typespecs.html#basic-types">map</a>() | <a href="https://hexdocs.pm/elixir/typespecs.html#built-in-types">no_return</a>()</pre> <a href="https://hexdocs.pm/elixir/typespecs.html#basic-types">map</a>() | <a href="https://hexdocs.pm/elixir/typespecs.html#built-in-types">no_return</a>()</pre>
</div> </div>
@ -363,7 +363,7 @@ keyed by number system or</p></li><li><p><code class="inline">{:error, {exceptio
</h2> </h2>
<ul><li><code class="inline">locale</code> is any valid locale name returned by <ul><li><code class="inline">locale</code> is any valid locale name returned by
<a href="Plausible.Cldr.html#known_locale_names/0"><code class="inline">Plausible.Cldr.known_locale_names/0</code></a> <a href="Plausible.Cldr.html#known_locale_names/0"><code class="inline">Plausible.Cldr.known_locale_names/0</code></a>
or a <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.LanguageTag.html"><code class="inline">Cldr.LanguageTag</code></a> struct returned by or a <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.LanguageTag.html"><code class="inline">Cldr.LanguageTag</code></a> struct returned by
<a href="Plausible.Cldr.Locale.html#new!/1"><code class="inline">Plausible.Cldr.Locale.new!/1</code></a>. The default <a href="Plausible.Cldr.Locale.html#new!/1"><code class="inline">Plausible.Cldr.Locale.new!/1</code></a>. The default
is <a href="Plausible.Cldr.html#get_locale/0"><code class="inline">Plausible.Cldr.get_locale/0</code></a>.</li></ul><h2 id="all_formats_for!/1-returns" class="section-heading"> is <a href="Plausible.Cldr.html#get_locale/0"><code class="inline">Plausible.Cldr.get_locale/0</code></a>.</li></ul><h2 id="all_formats_for!/1-returns" class="section-heading">
<a href="#all_formats_for!/1-returns" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i> <a href="#all_formats_for!/1-returns" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
@ -397,8 +397,8 @@ keyed by number system or</p></li><li><p>raises an exception</p></li></ul><p>See
<div class="specs"> <div class="specs">
<pre translate="no"><span class="attribute">@spec</span> currency_spacing( <pre translate="no"><span class="attribute">@spec</span> currency_spacing(
<a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.LanguageTag.html#t:t/0">Cldr.LanguageTag.t</a>() | <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.Locale.html#t:locale_name/0">Cldr.Locale.locale_name</a>(), <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.LanguageTag.html#t:t/0">Cldr.LanguageTag.t</a>() | <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.Locale.html#t:locale_name/0">Cldr.Locale.locale_name</a>(),
<a href="https://hexdocs.pm/ex_cldr_numbers/2.30.1/Cldr.Number.System.html#t:system_name/0">Cldr.Number.System.system_name</a>() <a href="https://hexdocs.pm/ex_cldr_numbers/2.31.3/Cldr.Number.System.html#t:system_name/0">Cldr.Number.System.system_name</a>()
) :: <a href="https://hexdocs.pm/elixir/typespecs.html#basic-types">map</a>() | {:error, {<a href="https://hexdocs.pm/elixir/typespecs.html#built-in-types">module</a>(), <a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>()}}</pre> ) :: <a href="https://hexdocs.pm/elixir/typespecs.html#basic-types">map</a>() | {:error, {<a href="https://hexdocs.pm/elixir/typespecs.html#built-in-types">module</a>(), <a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>()}}</pre>
</div> </div>
@ -428,7 +428,7 @@ number system.</p>
<div class="specs"> <div class="specs">
<pre translate="no"><span class="attribute">@spec</span> decimal_format_list() :: [<a href="https://hexdocs.pm/ex_cldr_numbers/2.30.1/Cldr.Number.Format.html#t:format/0">Cldr.Number.Format.format</a>()]</pre> <pre translate="no"><span class="attribute">@spec</span> decimal_format_list() :: [<a href="https://hexdocs.pm/ex_cldr_numbers/2.31.3/Cldr.Number.Format.html#t:format/0">Cldr.Number.Format.format</a>()]</pre>
</div> </div>
@ -441,7 +441,7 @@ to precompile all the known formats at compile time.</p><h2 id="decimal_format_l
Example Example
</h2> </h2>
<pre><code class="makeup elixir" translate="no"><span class="c1">#=&gt; Plausible.Cldr.Number.Format.Format.decimal_format_list</span><span class="w"> <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="5417010820-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="3261840317-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.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 %&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"> </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">
@ -451,7 +451,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 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 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 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="5417010820-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="3261840317-1">]</span></code></pre>
</section> </section>
</section> </section>
<section class="detail" id="decimal_format_list_for/1"> <section class="detail" id="decimal_format_list_for/1">
@ -477,7 +477,7 @@ to precompile all the known formats at compile time.</p><h2 id="decimal_format_l
<div class="specs"> <div class="specs">
<pre translate="no"><span class="attribute">@spec</span> decimal_format_list_for(<a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.LanguageTag.html#t:t/0">Cldr.LanguageTag.t</a>() | <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.Locale.html#t:locale_name/0">Cldr.Locale.locale_name</a>()) :: <pre translate="no"><span class="attribute">@spec</span> decimal_format_list_for(<a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.LanguageTag.html#t:t/0">Cldr.LanguageTag.t</a>() | <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.Locale.html#t:locale_name/0">Cldr.Locale.locale_name</a>()) ::
{:ok, [<a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>()]} | {:error, {<a href="https://hexdocs.pm/elixir/typespecs.html#built-in-types">module</a>(), <a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>()}}</pre> {:ok, [<a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>()]} | {:error, {<a href="https://hexdocs.pm/elixir/typespecs.html#built-in-types">module</a>(), <a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>()}}</pre>
</div> </div>
@ -490,7 +490,7 @@ to precompile all the known formats at compile time.</p><h2 id="decimal_format_l
</h2> </h2>
<ul><li><code class="inline">locale</code> is any valid locale name returned by <ul><li><code class="inline">locale</code> is any valid locale name returned by
<a href="Plausible.Cldr.html#known_locale_names/0"><code class="inline">Plausible.Cldr.known_locale_names/0</code></a> <a href="Plausible.Cldr.html#known_locale_names/0"><code class="inline">Plausible.Cldr.known_locale_names/0</code></a>
or a <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.LanguageTag.html"><code class="inline">Cldr.LanguageTag</code></a> struct returned by or a <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.LanguageTag.html"><code class="inline">Cldr.LanguageTag</code></a> struct returned by
<a href="Plausible.Cldr.Locale.html#new!/1"><code class="inline">Plausible.Cldr.Locale.new!/1</code></a>. The default <a href="Plausible.Cldr.Locale.html#new!/1"><code class="inline">Plausible.Cldr.Locale.new!/1</code></a>. The default
is <a href="Plausible.Cldr.html#get_locale/0"><code class="inline">Plausible.Cldr.get_locale/0</code></a>.</li></ul><p>This function exists to allow the decimal formatter to precompile all is <a href="Plausible.Cldr.html#get_locale/0"><code class="inline">Plausible.Cldr.get_locale/0</code></a>.</li></ul><p>This function exists to allow the decimal formatter to precompile all
the known formats at compile time. Its use is not otherwise recommended.</p><h2 id="decimal_format_list_for/1-example" class="section-heading"> the known formats at compile time. Its use is not otherwise recommended.</p><h2 id="decimal_format_list_for/1-example" class="section-heading">
@ -499,8 +499,8 @@ the known formats at compile time. Its use is not otherwise recommended.</p><h2
</a> </a>
Example Example
</h2> </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="3006282097-1">(</span><span class="ss">:en</span><span class="p" data-group-id="3006282097-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">decimal_format_list_for</span><span class="p" data-group-id="4108920358-1">(</span><span class="ss">:en</span><span class="p" data-group-id="4108920358-1">)</span><span class="w">
</span><span class="p" data-group-id="3006282097-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="3006282097-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="p" data-group-id="4108920358-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="4108920358-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 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;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"> </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">
@ -508,7 +508,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;¤#,##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;¤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;¤ #,##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="3006282097-3">]</span><span class="p" data-group-id="3006282097-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="4108920358-3">]</span><span class="p" data-group-id="4108920358-2">}</span></code></pre>
</section> </section>
</section> </section>
<section class="detail" id="default_grouping_for/1"> <section class="detail" id="default_grouping_for/1">
@ -534,7 +534,7 @@ the known formats at compile time. Its use is not otherwise recommended.</p><h2
<div class="specs"> <div class="specs">
<pre translate="no"><span class="attribute">@spec</span> default_grouping_for(<a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.LanguageTag.html#t:t/0">Cldr.LanguageTag.t</a>() | <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.Locale.html#t:locale_name/0">Cldr.Locale.locale_name</a>()) :: <pre translate="no"><span class="attribute">@spec</span> default_grouping_for(<a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.LanguageTag.html#t:t/0">Cldr.LanguageTag.t</a>() | <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.Locale.html#t:locale_name/0">Cldr.Locale.locale_name</a>()) ::
{:ok, <a href="https://hexdocs.pm/elixir/typespecs.html#basic-types">map</a>()} | {:error, {<a href="https://hexdocs.pm/elixir/typespecs.html#built-in-types">module</a>(), <a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>()}}</pre> {:ok, <a href="https://hexdocs.pm/elixir/typespecs.html#basic-types">map</a>()} | {:error, {<a href="https://hexdocs.pm/elixir/typespecs.html#built-in-types">module</a>(), <a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>()}}</pre>
</div> </div>
@ -547,7 +547,7 @@ the known formats at compile time. Its use is not otherwise recommended.</p><h2
</h2> </h2>
<ul><li><code class="inline">locale</code> is any valid locale name returned by <ul><li><code class="inline">locale</code> is any valid locale name returned by
<a href="Plausible.Cldr.html#known_locale_names/0"><code class="inline">Plausible.Cldr.known_locale_names/0</code></a> <a href="Plausible.Cldr.html#known_locale_names/0"><code class="inline">Plausible.Cldr.known_locale_names/0</code></a>
or a <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.LanguageTag.html"><code class="inline">Cldr.LanguageTag</code></a> struct returned by or a <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.LanguageTag.html"><code class="inline">Cldr.LanguageTag</code></a> struct returned by
<a href="Plausible.Cldr.Locale.html#new!/1"><code class="inline">Plausible.Cldr.Locale.new!/1</code></a>. The default <a href="Plausible.Cldr.Locale.html#new!/1"><code class="inline">Plausible.Cldr.Locale.new!/1</code></a>. The default
is <a href="Plausible.Cldr.html#get_locale/0"><code class="inline">Plausible.Cldr.get_locale/0</code></a>.</li></ul><h2 id="default_grouping_for/1-returns" class="section-heading"> is <a href="Plausible.Cldr.html#get_locale/0"><code class="inline">Plausible.Cldr.get_locale/0</code></a>.</li></ul><h2 id="default_grouping_for/1-returns" class="section-heading">
<a href="#default_grouping_for/1-returns" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i> <a href="#default_grouping_for/1-returns" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
@ -561,8 +561,8 @@ is <a href="Plausible.Cldr.html#get_locale/0"><code class="inline">Plausible.Cld
</a> </a>
Examples Examples
</h2> </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="0756456322-1">(</span><span class="ss">:en</span><span class="p" data-group-id="0756456322-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">default_grouping_for</span><span class="p" data-group-id="5030475301-1">(</span><span class="ss">:en</span><span class="p" data-group-id="5030475301-1">)</span><span class="w">
</span><span class="p" data-group-id="0756456322-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="0756456322-3">%{</span><span class="ss">fraction</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="0756456322-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="0756456322-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="0756456322-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="0756456322-5">}</span><span class="p" data-group-id="0756456322-3">}</span><span class="p" data-group-id="0756456322-2">}</span></code></pre> </span><span class="p" data-group-id="5030475301-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="5030475301-3">%{</span><span class="ss">fraction</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="5030475301-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="5030475301-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="5030475301-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="5030475301-5">}</span><span class="p" data-group-id="5030475301-3">}</span><span class="p" data-group-id="5030475301-2">}</span></code></pre>
</section> </section>
</section> </section>
<section class="detail" id="default_grouping_for!/1"> <section class="detail" id="default_grouping_for!/1">
@ -586,7 +586,7 @@ is <a href="Plausible.Cldr.html#get_locale/0"><code class="inline">Plausible.Cld
<div class="specs"> <div class="specs">
<pre translate="no"><span class="attribute">@spec</span> default_grouping_for!(<a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.LanguageTag.html#t:t/0">Cldr.LanguageTag.t</a>() | <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.Locale.html#t:locale_name/0">Cldr.Locale.locale_name</a>()) :: <pre translate="no"><span class="attribute">@spec</span> default_grouping_for!(<a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.LanguageTag.html#t:t/0">Cldr.LanguageTag.t</a>() | <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.Locale.html#t:locale_name/0">Cldr.Locale.locale_name</a>()) ::
<a href="https://hexdocs.pm/elixir/typespecs.html#basic-types">map</a>() | <a href="https://hexdocs.pm/elixir/typespecs.html#built-in-types">no_return</a>()</pre> <a href="https://hexdocs.pm/elixir/typespecs.html#basic-types">map</a>() | <a href="https://hexdocs.pm/elixir/typespecs.html#built-in-types">no_return</a>()</pre>
</div> </div>
@ -600,7 +600,7 @@ or raises on error.</p><h2 id="default_grouping_for!/1-arguments" class="section
</h2> </h2>
<ul><li><code class="inline">locale</code> is any valid locale name returned by <ul><li><code class="inline">locale</code> is any valid locale name returned by
<a href="Plausible.Cldr.html#known_locale_names/0"><code class="inline">Plausible.Cldr.known_locale_names/0</code></a> <a href="Plausible.Cldr.html#known_locale_names/0"><code class="inline">Plausible.Cldr.known_locale_names/0</code></a>
or a <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.LanguageTag.html"><code class="inline">Cldr.LanguageTag</code></a> struct returned by or a <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.LanguageTag.html"><code class="inline">Cldr.LanguageTag</code></a> struct returned by
<a href="Plausible.Cldr.Locale.html#new!/1"><code class="inline">Plausible.Cldr.Locale.new!/1</code></a>. The default <a href="Plausible.Cldr.Locale.html#new!/1"><code class="inline">Plausible.Cldr.Locale.new!/1</code></a>. The default
is <a href="Plausible.Cldr.html#get_locale/0"><code class="inline">Plausible.Cldr.get_locale/0</code></a>.</li></ul><h2 id="default_grouping_for!/1-returns" class="section-heading"> is <a href="Plausible.Cldr.html#get_locale/0"><code class="inline">Plausible.Cldr.get_locale/0</code></a>.</li></ul><h2 id="default_grouping_for!/1-returns" class="section-heading">
<a href="#default_grouping_for!/1-returns" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i> <a href="#default_grouping_for!/1-returns" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
@ -614,8 +614,8 @@ is <a href="Plausible.Cldr.html#get_locale/0"><code class="inline">Plausible.Cld
</a> </a>
Examples Examples
</h2> </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="1668771895-1">(</span><span class="ss">:en</span><span class="p" data-group-id="1668771895-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">default_grouping_for!</span><span class="p" data-group-id="8940190549-1">(</span><span class="ss">:en</span><span class="p" data-group-id="8940190549-1">)</span><span class="w">
</span><span class="p" data-group-id="1668771895-2">%{</span><span class="ss">fraction</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="1668771895-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="1668771895-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="1668771895-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="1668771895-4">}</span><span class="p" data-group-id="1668771895-2">}</span></code></pre> </span><span class="p" data-group-id="8940190549-2">%{</span><span class="ss">fraction</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="8940190549-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="8940190549-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="8940190549-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="8940190549-4">}</span><span class="p" data-group-id="8940190549-2">}</span></code></pre>
</section> </section>
</section> </section>
<section class="detail" id="formats_for/2"> <section class="detail" id="formats_for/2">
@ -643,7 +643,7 @@ is <a href="Plausible.Cldr.html#get_locale/0"><code class="inline">Plausible.Cld
<div class="specs"> <div class="specs">
<pre translate="no"><span class="attribute">@spec</span> formats_for(<a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.LanguageTag.html#t:t/0">Cldr.LanguageTag.t</a>() | <a href="https://hexdocs.pm/elixir/typespecs.html#built-in-types">binary</a>(), <a href="https://hexdocs.pm/elixir/typespecs.html#basic-types">atom</a>() | <a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>()) :: <pre translate="no"><span class="attribute">@spec</span> formats_for(<a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.LanguageTag.html#t:t/0">Cldr.LanguageTag.t</a>() | <a href="https://hexdocs.pm/elixir/typespecs.html#built-in-types">binary</a>(), <a href="https://hexdocs.pm/elixir/typespecs.html#basic-types">atom</a>() | <a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>()) ::
{:ok, <a href="https://hexdocs.pm/elixir/typespecs.html#basic-types">map</a>()} | {:error, {<a href="https://hexdocs.pm/elixir/typespecs.html#built-in-types">module</a>(), <a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>()}}</pre> {:ok, <a href="https://hexdocs.pm/elixir/typespecs.html#basic-types">map</a>()} | {:error, {<a href="https://hexdocs.pm/elixir/typespecs.html#built-in-types">module</a>(), <a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>()}}</pre>
</div> </div>
@ -656,7 +656,7 @@ is <a href="Plausible.Cldr.html#get_locale/0"><code class="inline">Plausible.Cld
</h2> </h2>
<ul><li><p><code class="inline">locale</code> is any valid locale name returned by <ul><li><p><code class="inline">locale</code> is any valid locale name returned by
<a href="Plausible.Cldr.html#known_locale_names/0"><code class="inline">Plausible.Cldr.known_locale_names/0</code></a> <a href="Plausible.Cldr.html#known_locale_names/0"><code class="inline">Plausible.Cldr.known_locale_names/0</code></a>
or a <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.LanguageTag.html"><code class="inline">Cldr.LanguageTag</code></a> struct returned by or a <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.LanguageTag.html"><code class="inline">Cldr.LanguageTag</code></a> struct returned by
<a href="Plausible.Cldr.Locale.html#new!/1"><code class="inline">Plausible.Cldr.Locale.new!/1</code></a>. The default <a href="Plausible.Cldr.Locale.html#new!/1"><code class="inline">Plausible.Cldr.Locale.new!/1</code></a>. The default
is <a href="Plausible.Cldr.html#get_locale/0"><code class="inline">Plausible.Cldr.get_locale/0</code></a>.</p></li><li><p><code class="inline">number_system</code> is any valid number system or number system type returned is <a href="Plausible.Cldr.html#get_locale/0"><code class="inline">Plausible.Cldr.get_locale/0</code></a>.</p></li><li><p><code class="inline">number_system</code> is any valid number system or number system type returned
by <a href="Plausible.Cldr.Number.System.html#number_systems_for/1"><code class="inline">Plausible.Cldr.Number.System.number_systems_for/1</code></a>.</p></li></ul><h2 id="formats_for/2-example" class="section-heading"> by <a href="Plausible.Cldr.Number.System.html#number_systems_for/1"><code class="inline">Plausible.Cldr.Number.System.number_systems_for/1</code></a>.</p></li></ul><h2 id="formats_for/2-example" class="section-heading">
@ -672,18 +672,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">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">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">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="9328743715-1">[</span><span class="p" data-group-id="9328743715-2">{</span><span class="s">&quot;1000&quot;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="9328743715-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="9328743715-3">]</span><span class="p" data-group-id="9328743715-2">}</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="5558951212-1">[</span><span class="p" data-group-id="5558951212-2">{</span><span class="s">&quot;1000&quot;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="5558951212-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="5558951212-3">]</span><span class="p" data-group-id="5558951212-2">}</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="9328743715-4">{</span><span class="s">&quot;10000&quot;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="9328743715-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="9328743715-5">]</span><span class="p" data-group-id="9328743715-4">}</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="5558951212-4">{</span><span class="s">&quot;10000&quot;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="5558951212-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="5558951212-5">]</span><span class="p" data-group-id="5558951212-4">}</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="9328743715-6">{</span><span class="s">&quot;100000&quot;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="9328743715-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="9328743715-7">]</span><span class="p" data-group-id="9328743715-6">}</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="5558951212-6">{</span><span class="s">&quot;100000&quot;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="5558951212-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="5558951212-7">]</span><span class="p" data-group-id="5558951212-6">}</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="9328743715-8">{</span><span class="s">&quot;1000000&quot;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="9328743715-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="9328743715-9">]</span><span class="p" data-group-id="9328743715-8">}</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="5558951212-8">{</span><span class="s">&quot;1000000&quot;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="5558951212-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="5558951212-9">]</span><span class="p" data-group-id="5558951212-8">}</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="9328743715-10">{</span><span class="s">&quot;10000000&quot;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="9328743715-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="9328743715-11">]</span><span class="p" data-group-id="9328743715-10">}</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="5558951212-10">{</span><span class="s">&quot;10000000&quot;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="5558951212-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="5558951212-11">]</span><span class="p" data-group-id="5558951212-10">}</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="9328743715-12">{</span><span class="s">&quot;100000000&quot;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="9328743715-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="9328743715-13">]</span><span class="p" data-group-id="9328743715-12">}</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="5558951212-12">{</span><span class="s">&quot;100000000&quot;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="5558951212-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="5558951212-13">]</span><span class="p" data-group-id="5558951212-12">}</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="9328743715-14">{</span><span class="s">&quot;1000000000&quot;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="9328743715-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="9328743715-15">]</span><span class="p" data-group-id="9328743715-14">}</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="5558951212-14">{</span><span class="s">&quot;1000000000&quot;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="5558951212-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="5558951212-15">]</span><span class="p" data-group-id="5558951212-14">}</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="9328743715-16">{</span><span class="s">&quot;10000000000&quot;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="9328743715-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="9328743715-17">]</span><span class="p" data-group-id="9328743715-16">}</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="5558951212-16">{</span><span class="s">&quot;10000000000&quot;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="5558951212-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="5558951212-17">]</span><span class="p" data-group-id="5558951212-16">}</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="9328743715-18">{</span><span class="s">&quot;100000000000&quot;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="9328743715-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="9328743715-19">]</span><span class="p" data-group-id="9328743715-18">}</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="5558951212-18">{</span><span class="s">&quot;100000000000&quot;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="5558951212-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="5558951212-19">]</span><span class="p" data-group-id="5558951212-18">}</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="9328743715-20">{</span><span class="s">&quot;1000000000000&quot;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="9328743715-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="9328743715-21">]</span><span class="p" data-group-id="9328743715-20">}</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="5558951212-20">{</span><span class="s">&quot;1000000000000&quot;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="5558951212-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="5558951212-21">]</span><span class="p" data-group-id="5558951212-20">}</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="9328743715-22">{</span><span class="s">&quot;10000000000000&quot;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="9328743715-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="9328743715-23">]</span><span class="p" data-group-id="9328743715-22">}</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="5558951212-22">{</span><span class="s">&quot;10000000000000&quot;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="5558951212-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="5558951212-23">]</span><span class="p" data-group-id="5558951212-22">}</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="9328743715-24">{</span><span class="s">&quot;100000000000000&quot;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="9328743715-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="9328743715-25">]</span><span class="p" data-group-id="9328743715-24">}</span><span class="p" data-group-id="9328743715-1">]</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="5558951212-24">{</span><span class="s">&quot;100000000000000&quot;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="5558951212-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="5558951212-25">]</span><span class="p" data-group-id="5558951212-24">}</span><span class="p" data-group-id="5558951212-1">]</span><span class="p">,</span><span class="w">
</span><span class="n">...</span><span class="w"> </span><span class="n">...</span><span class="w">
</span><span class="err">}</span></code></pre> </span><span class="err">}</span></code></pre>
</section> </section>
@ -714,8 +714,8 @@ by <a href="Plausible.Cldr.Number.System.html#number_systems_for/1"><code class=
<div class="specs"> <div class="specs">
<pre translate="no"><span class="attribute">@spec</span> formats_for!( <pre translate="no"><span class="attribute">@spec</span> formats_for!(
<a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.LanguageTag.html#t:t/0">Cldr.LanguageTag.t</a>() | <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.Locale.html#t:locale_name/0">Cldr.Locale.locale_name</a>(), <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.LanguageTag.html#t:t/0">Cldr.LanguageTag.t</a>() | <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.Locale.html#t:locale_name/0">Cldr.Locale.locale_name</a>(),
<a href="https://hexdocs.pm/ex_cldr_numbers/2.30.1/Cldr.Number.System.html#t:system_name/0">Cldr.Number.System.system_name</a>() <a href="https://hexdocs.pm/ex_cldr_numbers/2.31.3/Cldr.Number.System.html#t:system_name/0">Cldr.Number.System.system_name</a>()
) :: ) ::
<a href="https://hexdocs.pm/elixir/typespecs.html#basic-types">map</a>() | <a href="https://hexdocs.pm/elixir/typespecs.html#built-in-types">no_return</a>()</pre> <a href="https://hexdocs.pm/elixir/typespecs.html#basic-types">map</a>() | <a href="https://hexdocs.pm/elixir/typespecs.html#built-in-types">no_return</a>()</pre>
@ -747,7 +747,7 @@ by <a href="Plausible.Cldr.Number.System.html#number_systems_for/1"><code class=
<div class="specs"> <div class="specs">
<pre translate="no"><span class="attribute">@spec</span> minimum_grouping_digits_for(<a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.LanguageTag.html#t:t/0">Cldr.LanguageTag.t</a>() | <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.Locale.html#t:locale_name/0">Cldr.Locale.locale_name</a>()) :: <pre translate="no"><span class="attribute">@spec</span> minimum_grouping_digits_for(<a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.LanguageTag.html#t:t/0">Cldr.LanguageTag.t</a>() | <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.Locale.html#t:locale_name/0">Cldr.Locale.locale_name</a>()) ::
{:ok, <a href="https://hexdocs.pm/elixir/typespecs.html#basic-types">non_neg_integer</a>()} | {:error, {<a href="https://hexdocs.pm/elixir/typespecs.html#built-in-types">module</a>(), <a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>()}}</pre> {:ok, <a href="https://hexdocs.pm/elixir/typespecs.html#basic-types">non_neg_integer</a>()} | {:error, {<a href="https://hexdocs.pm/elixir/typespecs.html#built-in-types">module</a>(), <a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>()}}</pre>
</div> </div>
@ -760,7 +760,7 @@ by <a href="Plausible.Cldr.Number.System.html#number_systems_for/1"><code class=
</h2> </h2>
<ul><li><code class="inline">locale</code> is any valid locale name returned by <ul><li><code class="inline">locale</code> is any valid locale name returned by
<a href="Plausible.Cldr.html#known_locale_names/0"><code class="inline">Plausible.Cldr.known_locale_names/0</code></a> <a href="Plausible.Cldr.html#known_locale_names/0"><code class="inline">Plausible.Cldr.known_locale_names/0</code></a>
or a <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.LanguageTag.html"><code class="inline">Cldr.LanguageTag</code></a> struct returned by or a <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.LanguageTag.html"><code class="inline">Cldr.LanguageTag</code></a> struct returned by
<a href="Plausible.Cldr.Locale.html#new!/1"><code class="inline">Plausible.Cldr.Locale.new!/1</code></a>. The default <a href="Plausible.Cldr.Locale.html#new!/1"><code class="inline">Plausible.Cldr.Locale.new!/1</code></a>. The default
is <a href="Plausible.Cldr.html#get_locale/0"><code class="inline">Plausible.Cldr.get_locale/0</code></a>.</li></ul><h2 id="minimum_grouping_digits_for/1-returns" class="section-heading"> is <a href="Plausible.Cldr.html#get_locale/0"><code class="inline">Plausible.Cldr.get_locale/0</code></a>.</li></ul><h2 id="minimum_grouping_digits_for/1-returns" class="section-heading">
<a href="#minimum_grouping_digits_for/1-returns" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i> <a href="#minimum_grouping_digits_for/1-returns" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
@ -774,8 +774,8 @@ is <a href="Plausible.Cldr.html#get_locale/0"><code class="inline">Plausible.Cld
</a> </a>
Examples Examples
</h2> </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="8698281889-1">(</span><span class="s">&quot;en&quot;</span><span class="p" data-group-id="8698281889-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="0402171812-1">(</span><span class="s">&quot;en&quot;</span><span class="p" data-group-id="0402171812-1">)</span><span class="w">
</span><span class="p" data-group-id="8698281889-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="8698281889-2">}</span></code></pre> </span><span class="p" data-group-id="0402171812-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="0402171812-2">}</span></code></pre>
</section> </section>
</section> </section>
<section class="detail" id="minimum_grouping_digits_for!/1"> <section class="detail" id="minimum_grouping_digits_for!/1">
@ -799,7 +799,7 @@ is <a href="Plausible.Cldr.html#get_locale/0"><code class="inline">Plausible.Cld
<div class="specs"> <div class="specs">
<pre translate="no"><span class="attribute">@spec</span> minimum_grouping_digits_for!(<a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.LanguageTag.html#t:t/0">Cldr.LanguageTag.t</a>() | <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.Locale.html#t:locale_name/0">Cldr.Locale.locale_name</a>()) :: <pre translate="no"><span class="attribute">@spec</span> minimum_grouping_digits_for!(<a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.LanguageTag.html#t:t/0">Cldr.LanguageTag.t</a>() | <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.Locale.html#t:locale_name/0">Cldr.Locale.locale_name</a>()) ::
<a href="https://hexdocs.pm/elixir/typespecs.html#basic-types">non_neg_integer</a>() | <a href="https://hexdocs.pm/elixir/typespecs.html#built-in-types">no_return</a>()</pre> <a href="https://hexdocs.pm/elixir/typespecs.html#basic-types">non_neg_integer</a>() | <a href="https://hexdocs.pm/elixir/typespecs.html#built-in-types">no_return</a>()</pre>
</div> </div>
@ -813,7 +813,7 @@ or raises on error.</p><h2 id="minimum_grouping_digits_for!/1-arguments" class="
</h2> </h2>
<ul><li><code class="inline">locale</code> is any valid locale name returned by <ul><li><code class="inline">locale</code> is any valid locale name returned by
<a href="Plausible.Cldr.html#known_locale_names/0"><code class="inline">Plausible.Cldr.known_locale_names/0</code></a> <a href="Plausible.Cldr.html#known_locale_names/0"><code class="inline">Plausible.Cldr.known_locale_names/0</code></a>
or a <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.LanguageTag.html"><code class="inline">Cldr.LanguageTag</code></a> struct returned by or a <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.LanguageTag.html"><code class="inline">Cldr.LanguageTag</code></a> struct returned by
<a href="Plausible.Cldr.Locale.html#new!/1"><code class="inline">Plausible.Cldr.Locale.new!/1</code></a>. The default <a href="Plausible.Cldr.Locale.html#new!/1"><code class="inline">Plausible.Cldr.Locale.new!/1</code></a>. The default
is <a href="Plausible.Cldr.html#get_locale/0"><code class="inline">Plausible.Cldr.get_locale/0</code></a>.</li></ul><h2 id="minimum_grouping_digits_for!/1-returns" class="section-heading"> is <a href="Plausible.Cldr.html#get_locale/0"><code class="inline">Plausible.Cldr.get_locale/0</code></a>.</li></ul><h2 id="minimum_grouping_digits_for!/1-returns" class="section-heading">
<a href="#minimum_grouping_digits_for!/1-returns" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i> <a href="#minimum_grouping_digits_for!/1-returns" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
@ -827,7 +827,7 @@ is <a href="Plausible.Cldr.html#get_locale/0"><code class="inline">Plausible.Cld
</a> </a>
Examples Examples
</h2> </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="9342745554-1">(</span><span class="s">&quot;en&quot;</span><span class="p" data-group-id="9342745554-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="5454512358-1">(</span><span class="s">&quot;en&quot;</span><span class="p" data-group-id="5454512358-1">)</span><span class="w">
</span><span class="mi">1</span></code></pre> </span><span class="mi">1</span></code></pre>
</section> </section>
</section> </section>

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>
@ -205,9 +205,9 @@ Functions
<div class="specs"> <div class="specs">
<pre translate="no"><span class="attribute">@spec</span> to_string( <pre translate="no"><span class="attribute">@spec</span> to_string(
<a href="https://hexdocs.pm/cldr_utils/2.22.0/Cldr.Math.html#t:number_or_decimal/0">Cldr.Math.number_or_decimal</a>(), <a href="https://hexdocs.pm/cldr_utils/2.24.1/Cldr.Math.html#t:number_or_decimal/0">Cldr.Math.number_or_decimal</a>(),
<a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>() | <a href="https://hexdocs.pm/ex_cldr_numbers/2.30.1/Cldr.Number.Format.Meta.html#t:t/0">Cldr.Number.Format.Meta.t</a>(), <a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>() | <a href="https://hexdocs.pm/ex_cldr_numbers/2.31.3/Cldr.Number.Format.Meta.html#t:t/0">Cldr.Number.Format.Meta.t</a>(),
<a href="https://hexdocs.pm/elixir/Keyword.html#t:t/0">Keyword.t</a>() | <a href="https://hexdocs.pm/ex_cldr_numbers/2.30.1/Cldr.Number.Format.Options.html#t:t/0">Cldr.Number.Format.Options.t</a>() <a href="https://hexdocs.pm/elixir/Keyword.html#t:t/0">Keyword.t</a>() | <a href="https://hexdocs.pm/ex_cldr_numbers/2.31.3/Cldr.Number.Format.Options.html#t:t/0">Cldr.Number.Format.Options.t</a>()
) :: {:ok, <a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>()} | {:error, {<a href="https://hexdocs.pm/elixir/typespecs.html#built-in-types">module</a>(), <a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>()}}</pre> ) :: {:ok, <a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>()} | {:error, {<a href="https://hexdocs.pm/elixir/typespecs.html#built-in-types">module</a>(), <a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>()}}</pre>
</div> </div>

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>
@ -249,13 +249,13 @@ Functions
<div class="specs"> <div class="specs">
<pre translate="no"><span class="attribute">@spec</span> known_locale_names() :: [<a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.Locale.html#t:locale_name/0">Cldr.Locale.locale_name</a>(), ...]</pre> <pre translate="no"><span class="attribute">@spec</span> known_locale_names() :: [<a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.Locale.html#t:locale_name/0">Cldr.Locale.locale_name</a>(), ...]</pre>
</div> </div>
<p>The configured locales for which plural rules are defined.</p><p>Returns the intersection of <a href="Plausible.Cldr.html#known_locale_names/0"><code class="inline">Plausible.Cldr.known_locale_names/0</code></a> and <p>The configured locales for which plural rules are defined.</p><p>Returns the intersection of <a href="Plausible.Cldr.html#known_locale_names/0"><code class="inline">Plausible.Cldr.known_locale_names/0</code></a> and
the locales for which Ordinal plural rules are defined.</p><p>There are many <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.html"><code class="inline">Cldr</code></a> locales which don't have their own plural the locales for which Ordinal plural rules are defined.</p><p>There are many <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.html"><code class="inline">Cldr</code></a> locales which don't have their own plural
rules so this list is the intersection of <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.html"><code class="inline">Cldr</code></a>'s configured rules so this list is the intersection of <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.html"><code class="inline">Cldr</code></a>'s configured
locales and those that have rules.</p> locales and those that have rules.</p>
</section> </section>
</section> </section>
@ -283,10 +283,10 @@ locales and those that have rules.</p>
<div class="specs"> <div class="specs">
<pre translate="no"><span class="attribute">@spec</span> plural_rule( <pre translate="no"><span class="attribute">@spec</span> plural_rule(
<a href="https://hexdocs.pm/cldr_utils/2.22.0/Cldr.Math.html#t:number_or_decimal/0">Cldr.Math.number_or_decimal</a>(), <a href="https://hexdocs.pm/cldr_utils/2.24.1/Cldr.Math.html#t:number_or_decimal/0">Cldr.Math.number_or_decimal</a>(),
<a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.Locale.html#t:locale_name/0">Cldr.Locale.locale_name</a>() | <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.LanguageTag.html#t:t/0">Cldr.LanguageTag.t</a>(), <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.Locale.html#t:locale_name/0">Cldr.Locale.locale_name</a>() | <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.LanguageTag.html#t:t/0">Cldr.LanguageTag.t</a>(),
<a href="https://hexdocs.pm/elixir/typespecs.html#basic-types">atom</a>() | <a href="https://hexdocs.pm/elixir/typespecs.html#basic-types">pos_integer</a>() <a href="https://hexdocs.pm/elixir/typespecs.html#basic-types">atom</a>() | <a href="https://hexdocs.pm/elixir/typespecs.html#basic-types">pos_integer</a>()
) :: <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.Number.PluralRule.html#t:plural_type/0">Cldr.Number.PluralRule.plural_type</a>()</pre> ) :: <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.Number.PluralRule.html#t:plural_type/0">Cldr.Number.PluralRule.plural_type</a>()</pre>
</div> </div>
@ -302,7 +302,7 @@ list or other content in a plural-sensitive way.</p><h2 id="plural_rule/3-argume
</a> </a>
Arguments Arguments
</h2> </h2>
<ul><li><p><code class="inline">number</code> is any <code class="inline">integer</code>, <code class="inline">float</code> or <a href="https://hexdocs.pm/decimal/2.1.1/Decimal.html"><code class="inline">Decimal</code></a></p></li><li><p><code class="inline">locale</code> is any locale returned by <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.Locale.html#new!/2"><code class="inline">Cldr.Locale.new!/2</code></a> or any <ul><li><p><code class="inline">number</code> is any <code class="inline">integer</code>, <code class="inline">float</code> or <a href="https://hexdocs.pm/decimal/2.1.1/Decimal.html"><code class="inline">Decimal</code></a></p></li><li><p><code class="inline">locale</code> is any locale returned by <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.Locale.html#new!/2"><code class="inline">Cldr.Locale.new!/2</code></a> or any
<code class="inline">locale_name</code> returned by <a href="Plausible.Cldr.html#known_locale_names/0"><code class="inline">Plausible.Cldr.known_locale_names/0</code></a></p></li><li><p><code class="inline">rounding</code> is one of <code class="inline">[:down, :up, :ceiling, :floor, :half_even, :half_up, :half_down]</code>. The <code class="inline">locale_name</code> returned by <a href="Plausible.Cldr.html#known_locale_names/0"><code class="inline">Plausible.Cldr.known_locale_names/0</code></a></p></li><li><p><code class="inline">rounding</code> is one of <code class="inline">[:down, :up, :ceiling, :floor, :half_even, :half_up, :half_down]</code>. The
default is <code class="inline">:half_even</code>.</p></li></ul><h2 id="plural_rule/3-examples" class="section-heading"> default is <code class="inline">:half_even</code>.</p></li></ul><h2 id="plural_rule/3-examples" class="section-heading">
<a href="#plural_rule/3-examples" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i> <a href="#plural_rule/3-examples" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
@ -366,7 +366,7 @@ default is <code class="inline">:half_even</code>.</p></li></ul><h2 id="plural_r
<div class="specs"> <div class="specs">
<pre translate="no"><span class="attribute">@spec</span> plural_rules_for(<a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.Locale.html#t:locale_name/0">Cldr.Locale.locale_name</a>() | <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.LanguageTag.html#t:t/0">Cldr.LanguageTag.t</a>()) :: [ <pre translate="no"><span class="attribute">@spec</span> plural_rules_for(<a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.Locale.html#t:locale_name/0">Cldr.Locale.locale_name</a>() | <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.LanguageTag.html#t:t/0">Cldr.LanguageTag.t</a>()) :: [
{<a href="https://hexdocs.pm/elixir/typespecs.html#basic-types">atom</a>(), <a href="https://hexdocs.pm/elixir/typespecs.html#built-in-types">list</a>()}, {<a href="https://hexdocs.pm/elixir/typespecs.html#basic-types">atom</a>(), <a href="https://hexdocs.pm/elixir/typespecs.html#built-in-types">list</a>()},
... ...
]</pre> ]</pre>
@ -405,8 +405,8 @@ default is <code class="inline">:half_even</code>.</p></li></ul><h2 id="plural_r
<div class="specs"> <div class="specs">
<pre translate="no"><span class="attribute">@spec</span> pluralize( <pre translate="no"><span class="attribute">@spec</span> pluralize(
<a href="https://hexdocs.pm/cldr_utils/2.22.0/Cldr.Math.html#t:number_or_decimal/0">Cldr.Math.number_or_decimal</a>() | <a href="https://hexdocs.pm/elixir/Range.html#t:t/0">Range.t</a>(), <a href="https://hexdocs.pm/cldr_utils/2.24.1/Cldr.Math.html#t:number_or_decimal/0">Cldr.Math.number_or_decimal</a>() | <a href="https://hexdocs.pm/elixir/Range.html#t:t/0">Range.t</a>(),
<a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.Locale.html#t:locale_reference/0">Cldr.Locale.locale_reference</a>(), <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.Locale.html#t:locale_reference/0">Cldr.Locale.locale_reference</a>(),
%{} %{}
) :: <a href="https://hexdocs.pm/elixir/typespecs.html#basic-types">any</a>()</pre> ) :: <a href="https://hexdocs.pm/elixir/typespecs.html#basic-types">any</a>()</pre>
@ -431,31 +431,31 @@ The valid substitution keys are <code class="inline">:zero</code>, <code class="
</a> </a>
Examples Examples
</h2> </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="4124837482-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="4124837482-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="4873824359-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="4873824359-1">}</span><span class="w">
</span><span class="s">&quot;one&quot;</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="4124837482-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="4124837482-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="4873824359-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="4873824359-2">}</span><span class="w">
</span><span class="no">nil</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="4124837482-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="4124837482-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="4873824359-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="4873824359-3">}</span><span class="w">
</span><span class="s">&quot;two&quot;</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="4124837482-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="4124837482-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="4873824359-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="4873824359-4">}</span><span class="w">
</span><span class="s">&quot;two&quot;</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="4124837482-5">(</span><span class="mi">1</span><span class="p" data-group-id="4124837482-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="4124837482-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="4124837482-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="4873824359-5">(</span><span class="mi">1</span><span class="p" data-group-id="4873824359-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="4873824359-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="4873824359-6">}</span><span class="w">
</span><span class="s">&quot;one&quot;</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="4124837482-7">(</span><span class="mi">2</span><span class="p" data-group-id="4124837482-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="4124837482-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="4124837482-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="4873824359-7">(</span><span class="mi">2</span><span class="p" data-group-id="4873824359-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="4873824359-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="4873824359-8">}</span><span class="w">
</span><span class="no">nil</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="4124837482-9">(</span><span class="mi">2</span><span class="p" data-group-id="4124837482-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="4124837482-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="4124837482-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="4873824359-9">(</span><span class="mi">2</span><span class="p" data-group-id="4873824359-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="4873824359-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="4873824359-10">}</span><span class="w">
</span><span class="s">&quot;two&quot;</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="4124837482-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="4124837482-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="4873824359-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="4873824359-11">}</span><span class="w">
</span><span class="s">&quot;other&quot;</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="4124837482-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="4124837482-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="4873824359-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="4873824359-12">}</span><span class="w">
</span><span class="s">&quot;other&quot;</span></code></pre> </span><span class="s">&quot;other&quot;</span></code></pre>
</section> </section>
</section> </section>

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>
@ -178,10 +178,10 @@ Functions
<div class="specs"> <div class="specs">
<pre translate="no"><span class="attribute">@spec</span> plural_rule( <pre translate="no"><span class="attribute">@spec</span> plural_rule(
first :: <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.Number.PluralRule.html#t:plural_type/0">Cldr.Number.PluralRule.plural_type</a>(), first :: <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.Number.PluralRule.html#t:plural_type/0">Cldr.Number.PluralRule.plural_type</a>(),
last :: <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.Number.PluralRule.html#t:plural_type/0">Cldr.Number.PluralRule.plural_type</a>(), last :: <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.Number.PluralRule.html#t:plural_type/0">Cldr.Number.PluralRule.plural_type</a>(),
locale :: <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.Locale.html#t:locale_name/0">Cldr.Locale.locale_name</a>() | <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.LanguageTag.html#t:t/0">Cldr.LanguageTag.t</a>() locale :: <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.Locale.html#t:locale_name/0">Cldr.Locale.locale_name</a>() | <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.LanguageTag.html#t:t/0">Cldr.LanguageTag.t</a>()
) :: <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.Number.PluralRule.html#t:plural_type/0">Cldr.Number.PluralRule.plural_type</a>()</pre> ) :: <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.Number.PluralRule.html#t:plural_type/0">Cldr.Number.PluralRule.plural_type</a>()</pre>
</div> </div>

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>
@ -329,7 +329,7 @@ when builing a regular expression.</p>
<div class="specs"> <div class="specs">
<pre translate="no"><span class="attribute">@spec</span> number_symbols_for(<a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.LanguageTag.html#t:t/0">Cldr.LanguageTag.t</a>() | <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.Locale.html#t:locale_name/0">Cldr.Locale.locale_name</a>()) :: <pre translate="no"><span class="attribute">@spec</span> number_symbols_for(<a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.LanguageTag.html#t:t/0">Cldr.LanguageTag.t</a>() | <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.Locale.html#t:locale_name/0">Cldr.Locale.locale_name</a>()) ::
{:ok, <a href="https://hexdocs.pm/elixir/typespecs.html#basic-types">map</a>()} | {:error, {<a href="https://hexdocs.pm/elixir/typespecs.html#built-in-types">module</a>(), <a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>()}}</pre> {:ok, <a href="https://hexdocs.pm/elixir/typespecs.html#basic-types">map</a>()} | {:error, {<a href="https://hexdocs.pm/elixir/typespecs.html#built-in-types">module</a>(), <a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>()}}</pre>
</div> </div>
@ -343,7 +343,7 @@ of the number systems of a locale.</p><h2 id="number_symbols_for/1-options" clas
</h2> </h2>
<ul><li><code class="inline">locale</code> is any valid locale name returned by <ul><li><code class="inline">locale</code> is any valid locale name returned by
<a href="Plausible.Cldr.html#known_locale_names/0"><code class="inline">Plausible.Cldr.known_locale_names/0</code></a> <a href="Plausible.Cldr.html#known_locale_names/0"><code class="inline">Plausible.Cldr.known_locale_names/0</code></a>
or a <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.LanguageTag.html"><code class="inline">Cldr.LanguageTag</code></a> struct returned by or a <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.LanguageTag.html"><code class="inline">Cldr.LanguageTag</code></a> struct returned by
<a href="Plausible.Cldr.Locale.html#new!/1"><code class="inline">Plausible.Cldr.Locale.new!/1</code></a>. The default <a href="Plausible.Cldr.Locale.html#new!/1"><code class="inline">Plausible.Cldr.Locale.new!/1</code></a>. The default
is <a href="Plausible.Cldr.html#get_locale/0"><code class="inline">Plausible.Cldr.get_locale/0</code></a>.</li></ul><h2 id="number_symbols_for/1-example" class="section-heading"> is <a href="Plausible.Cldr.html#get_locale/0"><code class="inline">Plausible.Cldr.get_locale/0</code></a>.</li></ul><h2 id="number_symbols_for/1-example" class="section-heading">
<a href="#number_symbols_for/1-example" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i> <a href="#number_symbols_for/1-example" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
@ -351,9 +351,9 @@ is <a href="Plausible.Cldr.html#get_locale/0"><code class="inline">Plausible.Cld
</a> </a>
Example: Example:
</h2> </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="2241764024-1">(</span><span class="ss">:th</span><span class="p" data-group-id="2241764024-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.Symbol</span><span class="o">.</span><span class="n">number_symbols_for</span><span class="p" data-group-id="0226246264-1">(</span><span class="ss">:th</span><span class="p" data-group-id="0226246264-1">)</span><span class="w">
</span><span class="p" data-group-id="2241764024-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="2241764024-3">%{</span><span class="w"> </span><span class="p" data-group-id="0226246264-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="0226246264-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="2241764024-4">%</span><span class="nc" data-group-id="2241764024-4">Cldr.Number.Symbol</span><span class="p" data-group-id="2241764024-4">{</span><span class="w"> </span><span class="ss">latn</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="0226246264-4">%</span><span class="nc" data-group-id="0226246264-4">Cldr.Number.Symbol</span><span class="p" data-group-id="0226246264-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">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">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"> </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">
@ -366,8 +366,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">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">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="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="2241764024-4">}</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="0226246264-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="2241764024-5">%</span><span class="nc" data-group-id="2241764024-5">Cldr.Number.Symbol</span><span class="p" data-group-id="2241764024-5">{</span><span class="w"> </span><span class="ss">thai</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="0226246264-5">%</span><span class="nc" data-group-id="0226246264-5">Cldr.Number.Symbol</span><span class="p" data-group-id="0226246264-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">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">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"> </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">
@ -380,8 +380,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">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">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="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="2241764024-5">}</span><span class="w"> </span><span class="p" data-group-id="0226246264-5">}</span><span class="w">
</span><span class="p" data-group-id="2241764024-3">}</span><span class="p" data-group-id="2241764024-2">}</span></code></pre> </span><span class="p" data-group-id="0226246264-3">}</span><span class="p" data-group-id="0226246264-2">}</span></code></pre>
</section> </section>
</section> </section>
<section class="detail" id="number_symbols_for/2"> <section class="detail" id="number_symbols_for/2">

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>
@ -271,17 +271,17 @@ Functions
<div class="specs"> <div class="specs">
<pre translate="no"><span class="attribute">@spec</span> number_system_for( <pre translate="no"><span class="attribute">@spec</span> number_system_for(
<a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.Locale.html#t:locale_reference/0">Cldr.Locale.locale_reference</a>(), <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.Locale.html#t:locale_reference/0">Cldr.Locale.locale_reference</a>(),
<a href="https://hexdocs.pm/ex_cldr_numbers/2.30.1/Cldr.Number.System.html#t:system_name/0">Cldr.Number.System.system_name</a>() <a href="https://hexdocs.pm/ex_cldr_numbers/2.31.3/Cldr.Number.System.html#t:system_name/0">Cldr.Number.System.system_name</a>()
) :: ) ::
{:ok, [<a href="https://hexdocs.pm/elixir/typespecs.html#basic-types">atom</a>()]} | {:error, {<a href="https://hexdocs.pm/elixir/typespecs.html#built-in-types">module</a>(), <a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>()}}</pre> {:ok, [<a href="https://hexdocs.pm/elixir/typespecs.html#basic-types">atom</a>()]} | {:error, {<a href="https://hexdocs.pm/elixir/typespecs.html#built-in-types">module</a>(), <a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>()}}</pre>
</div> </div>
<p>Returns the actual number system from a number system type.</p><ul><li><p><code class="inline">locale</code> is any valid locale name returned by <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.html#known_locale_names/0"><code class="inline">Cldr.known_locale_names/0</code></a> <p>Returns the actual number system from a number system type.</p><ul><li><p><code class="inline">locale</code> is any valid locale name returned by <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.html#known_locale_names/0"><code class="inline">Cldr.known_locale_names/0</code></a>
or a <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.LanguageTag.html"><code class="inline">Cldr.LanguageTag</code></a> struct returned by <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.Locale.html#new!/2"><code class="inline">Cldr.Locale.new!/2</code></a></p></li><li><p><code class="inline">system_name</code> is any number system name returned by or a <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.LanguageTag.html"><code class="inline">Cldr.LanguageTag</code></a> struct returned by <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.Locale.html#new!/2"><code class="inline">Cldr.Locale.new!/2</code></a></p></li><li><p><code class="inline">system_name</code> is any number system name returned by
<a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.html#known_number_systems/0"><code class="inline">Cldr.known_number_systems/0</code></a> or a number system type <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.html#known_number_systems/0"><code class="inline">Cldr.known_number_systems/0</code></a> or a number system type
returned by <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.html#known_number_system_types/0"><code class="inline">Cldr.known_number_system_types/0</code></a></p></li></ul><p>This function will decode a number system type into the actual returned by <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.html#known_number_system_types/0"><code class="inline">Cldr.known_number_system_types/0</code></a></p></li></ul><p>This function will decode a number system type into the actual
number system. If the number system provided can't be decoded number system. If the number system provided can't be decoded
it is returned as is.</p><h2 id="number_system_for/2-examples" class="section-heading"> it is returned as is.</p><h2 id="number_system_for/2-examples" class="section-heading">
<a href="#number_system_for/2-examples" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i> <a href="#number_system_for/2-examples" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
@ -290,23 +290,23 @@ it is returned as is.</p><h2 id="number_system_for/2-examples" class="section-he
Examples Examples
</h2> </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"> <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="2526503681-1">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="2526503681-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="2526503681-2">}</span><span class="p" data-group-id="2526503681-1">}</span><span class="w"> </span><span class="p" data-group-id="6509027285-1">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="6509027285-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="6509027285-2">}</span><span class="p" data-group-id="6509027285-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="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="2526503681-3">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="2526503681-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="2526503681-4">}</span><span class="p" data-group-id="2526503681-3">}</span><span class="w"> </span><span class="p" data-group-id="6509027285-3">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="6509027285-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="6509027285-4">}</span><span class="p" data-group-id="6509027285-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="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="2526503681-5">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="2526503681-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="2526503681-6">}</span><span class="p" data-group-id="2526503681-5">}</span><span class="w"> </span><span class="p" data-group-id="6509027285-5">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="6509027285-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="6509027285-6">}</span><span class="p" data-group-id="6509027285-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="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="2526503681-7">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="2526503681-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="2526503681-8">}</span><span class="p" data-group-id="2526503681-7">}</span><span class="w"> </span><span class="p" data-group-id="6509027285-7">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="6509027285-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="6509027285-8">}</span><span class="p" data-group-id="6509027285-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="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="2526503681-9">{</span><span class="w"> </span><span class="p" data-group-id="6509027285-9">{</span><span class="w">
</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="ss">:error</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="2526503681-10">{</span><span class="nc">Cldr.UnknownNumberSystemError</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="6509027285-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="2526503681-10">}</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="6509027285-10">}</span><span class="w">
</span><span class="p" data-group-id="2526503681-9">}</span></code></pre> </span><span class="p" data-group-id="6509027285-9">}</span></code></pre>
</section> </section>
</section> </section>
<section class="detail" id="number_system_from_locale/1"> <section class="detail" id="number_system_from_locale/1">
@ -330,8 +330,8 @@ it is returned as is.</p><h2 id="number_system_for/2-examples" class="section-he
<div class="specs"> <div class="specs">
<pre translate="no"><span class="attribute">@spec</span> number_system_from_locale(<a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.Locale.html#t:locale_reference/0">Cldr.Locale.locale_reference</a>()) :: <pre translate="no"><span class="attribute">@spec</span> number_system_from_locale(<a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.Locale.html#t:locale_reference/0">Cldr.Locale.locale_reference</a>()) ::
<a href="https://hexdocs.pm/ex_cldr_numbers/2.30.1/Cldr.Number.System.html#t:system_name/0">Cldr.Number.System.system_name</a>()</pre> <a href="https://hexdocs.pm/ex_cldr_numbers/2.31.3/Cldr.Number.System.html#t:system_name/0">Cldr.Number.System.system_name</a>()</pre>
</div> </div>
@ -342,8 +342,8 @@ locale name.</p><h2 id="number_system_from_locale/1-arguments" class="section-he
</a> </a>
Arguments Arguments
</h2> </h2>
<ul><li><code class="inline">locale</code> is any language tag returned be <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.Locale.html#new/2"><code class="inline">Cldr.Locale.new/2</code></a> <ul><li><code class="inline">locale</code> is any language tag returned be <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.Locale.html#new/2"><code class="inline">Cldr.Locale.new/2</code></a>
or a locale name in the list returned by <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.html#known_locale_names/1"><code class="inline">Cldr.known_locale_names/1</code></a></li></ul><h2 id="number_system_from_locale/1-returns" class="section-heading"> or a locale name in the list returned by <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.html#known_locale_names/1"><code class="inline">Cldr.known_locale_names/1</code></a></li></ul><h2 id="number_system_from_locale/1-returns" class="section-heading">
<a href="#number_system_from_locale/1-returns" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i> <a href="#number_system_from_locale/1-returns" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
<p class="sr-only">returns</p> <p class="sr-only">returns</p>
</a> </a>
@ -383,24 +383,24 @@ or a locale name in the list returned by <a href="https://hexdocs.pm/ex_cldr/2.3
<div class="specs"> <div class="specs">
<pre translate="no"><span class="attribute">@spec</span> number_system_names_for(<a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.Locale.html#t:locale_reference/0">Cldr.Locale.locale_reference</a>()) :: <pre translate="no"><span class="attribute">@spec</span> number_system_names_for(<a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.Locale.html#t:locale_reference/0">Cldr.Locale.locale_reference</a>()) ::
{:ok, [<a href="https://hexdocs.pm/elixir/typespecs.html#basic-types">atom</a>()]} | {:error, {<a href="https://hexdocs.pm/elixir/typespecs.html#built-in-types">module</a>(), <a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>()}}</pre> {:ok, [<a href="https://hexdocs.pm/elixir/typespecs.html#basic-types">atom</a>()]} | {:error, {<a href="https://hexdocs.pm/elixir/typespecs.html#built-in-types">module</a>(), <a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>()}}</pre>
</div> </div>
<p>Returns the number systems available for a locale <p>Returns the number systems available for a locale
or <code class="inline">{:error, message}</code> if the locale is not known.</p><ul><li><code class="inline">locale</code> is any valid locale name returned by <a href="Plausible.Cldr.html#known_locale_names/0"><code class="inline">Plausible.Cldr.known_locale_names/0</code></a> or <code class="inline">{:error, message}</code> if the locale is not known.</p><ul><li><code class="inline">locale</code> is any valid locale name returned by <a href="Plausible.Cldr.html#known_locale_names/0"><code class="inline">Plausible.Cldr.known_locale_names/0</code></a>
or a <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.LanguageTag.html"><code class="inline">Cldr.LanguageTag</code></a> struct returned by <a href="Plausible.Cldr.Locale.html#new!/1"><code class="inline">Plausible.Cldr.Locale.new!/1</code></a></li></ul><h2 id="number_system_names_for/1-examples" class="section-heading"> or a <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.LanguageTag.html"><code class="inline">Cldr.LanguageTag</code></a> struct returned by <a href="Plausible.Cldr.Locale.html#new!/1"><code class="inline">Plausible.Cldr.Locale.new!/1</code></a></li></ul><h2 id="number_system_names_for/1-examples" class="section-heading">
<a href="#number_system_names_for/1-examples" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i> <a href="#number_system_names_for/1-examples" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
<p class="sr-only">examples</p> <p class="sr-only">examples</p>
</a> </a>
Examples Examples
</h2> </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"> <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="4082688359-1">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="4082688359-2">[</span><span class="ss">:latn</span><span class="p" data-group-id="4082688359-2">]</span><span class="p" data-group-id="4082688359-1">}</span><span class="w"> </span><span class="p" data-group-id="0465948966-1">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="0465948966-2">[</span><span class="ss">:latn</span><span class="p" data-group-id="0465948966-2">]</span><span class="p" data-group-id="0465948966-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="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="4082688359-3">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="4082688359-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="4082688359-4">}</span><span class="p" data-group-id="4082688359-3">}</span></code></pre> </span><span class="p" data-group-id="0465948966-3">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="0465948966-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="0465948966-4">}</span><span class="p" data-group-id="0465948966-3">}</span></code></pre>
</section> </section>
</section> </section>
<section class="detail" id="number_system_names_for!/1"> <section class="detail" id="number_system_names_for!/1">
@ -468,27 +468,27 @@ or a <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.LanguageTag.html"><code cla
<div class="specs"> <div class="specs">
<pre translate="no"><span class="attribute">@spec</span> number_systems_for(<a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.Locale.html#t:locale_reference/0">Cldr.Locale.locale_reference</a>()) :: <pre translate="no"><span class="attribute">@spec</span> number_systems_for(<a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.Locale.html#t:locale_reference/0">Cldr.Locale.locale_reference</a>()) ::
{:ok, <a href="https://hexdocs.pm/elixir/typespecs.html#basic-types">map</a>()} | {:error, {<a href="https://hexdocs.pm/elixir/typespecs.html#built-in-types">module</a>(), <a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>()}}</pre> {:ok, <a href="https://hexdocs.pm/elixir/typespecs.html#basic-types">map</a>()} | {:error, {<a href="https://hexdocs.pm/elixir/typespecs.html#built-in-types">module</a>(), <a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>()}}</pre>
</div> </div>
<p>Returns the number systems available for a locale <p>Returns the number systems available for a locale
or <code class="inline">{:error, message}</code> if the locale is not known.</p><ul><li><code class="inline">locale</code> is any valid locale name returned by <a href="Plausible.Cldr.html#known_locale_names/0"><code class="inline">Plausible.Cldr.known_locale_names/0</code></a> or <code class="inline">{:error, message}</code> if the locale is not known.</p><ul><li><code class="inline">locale</code> is any valid locale name returned by <a href="Plausible.Cldr.html#known_locale_names/0"><code class="inline">Plausible.Cldr.known_locale_names/0</code></a>
or a <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.LanguageTag.html"><code class="inline">Cldr.LanguageTag</code></a> struct returned by <a href="Plausible.Cldr.Locale.html#new!/1"><code class="inline">Plausible.Cldr.Locale.new!/1</code></a></li></ul><h2 id="number_systems_for/1-examples" class="section-heading"> or a <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.LanguageTag.html"><code class="inline">Cldr.LanguageTag</code></a> struct returned by <a href="Plausible.Cldr.Locale.html#new!/1"><code class="inline">Plausible.Cldr.Locale.new!/1</code></a></li></ul><h2 id="number_systems_for/1-examples" class="section-heading">
<a href="#number_systems_for/1-examples" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i> <a href="#number_systems_for/1-examples" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
<p class="sr-only">examples</p> <p class="sr-only">examples</p>
</a> </a>
Examples Examples
</h2> </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"> <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="4401604037-1">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="4401604037-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="4401604037-2">}</span><span class="p" data-group-id="4401604037-1">}</span><span class="w"> </span><span class="p" data-group-id="6899095368-1">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="6899095368-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="6899095368-2">}</span><span class="p" data-group-id="6899095368-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="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="4401604037-3">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="4401604037-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="4401604037-4">}</span><span class="p" data-group-id="4401604037-3">}</span><span class="w"> </span><span class="p" data-group-id="6899095368-3">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="6899095368-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="6899095368-4">}</span><span class="p" data-group-id="6899095368-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="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="4401604037-5">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="4401604037-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="4401604037-6">}</span><span class="p" data-group-id="4401604037-5">}</span></code></pre> </span><span class="p" data-group-id="6899095368-5">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="6899095368-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="6899095368-6">}</span><span class="p" data-group-id="6899095368-5">}</span></code></pre>
</section> </section>
</section> </section>
<section class="detail" id="number_systems_for!/1"> <section class="detail" id="number_systems_for!/1">
@ -535,8 +535,8 @@ or a <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.LanguageTag.html"><code cla
<div class="specs"> <div class="specs">
<pre translate="no"><span class="attribute">@spec</span> number_systems_like( <pre translate="no"><span class="attribute">@spec</span> number_systems_like(
<a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.Locale.html#t:locale_reference/0">Cldr.Locale.locale_reference</a>(), <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.Locale.html#t:locale_reference/0">Cldr.Locale.locale_reference</a>(),
<a href="https://hexdocs.pm/ex_cldr_numbers/2.30.1/Cldr.Number.System.html#t:system_name/0">Cldr.Number.System.system_name</a>() <a href="https://hexdocs.pm/ex_cldr_numbers/2.31.3/Cldr.Number.System.html#t:system_name/0">Cldr.Number.System.system_name</a>()
) :: ) ::
{:ok, <a href="https://hexdocs.pm/elixir/typespecs.html#built-in-types">list</a>()} | {:error, <a href="https://hexdocs.pm/elixir/typespecs.html#basic-types">tuple</a>()}</pre> {:ok, <a href="https://hexdocs.pm/elixir/typespecs.html#built-in-types">list</a>()} | {:error, <a href="https://hexdocs.pm/elixir/typespecs.html#basic-types">tuple</a>()}</pre>
@ -567,8 +567,8 @@ or a <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.LanguageTag.html"><code cla
<div class="specs"> <div class="specs">
<pre translate="no"><span class="attribute">@spec</span> system_name_from( <pre translate="no"><span class="attribute">@spec</span> system_name_from(
<a href="https://hexdocs.pm/ex_cldr_numbers/2.30.1/Cldr.Number.System.html#t:system_name/0">Cldr.Number.System.system_name</a>(), <a href="https://hexdocs.pm/ex_cldr_numbers/2.31.3/Cldr.Number.System.html#t:system_name/0">Cldr.Number.System.system_name</a>(),
<a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.Locale.html#t:locale_name/0">Cldr.Locale.locale_name</a>() | <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.LanguageTag.html#t:t/0">Cldr.LanguageTag.t</a>() <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.Locale.html#t:locale_name/0">Cldr.Locale.locale_name</a>() | <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.LanguageTag.html#t:t/0">Cldr.LanguageTag.t</a>()
) :: {:ok, <a href="https://hexdocs.pm/elixir/typespecs.html#basic-types">atom</a>()} | {:error, {<a href="https://hexdocs.pm/elixir/typespecs.html#built-in-types">module</a>(), <a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>()}}</pre> ) :: {:ok, <a href="https://hexdocs.pm/elixir/typespecs.html#basic-types">atom</a>()} | {:error, {<a href="https://hexdocs.pm/elixir/typespecs.html#built-in-types">module</a>(), <a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>()}}</pre>
</div> </div>
@ -576,7 +576,7 @@ or a <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.LanguageTag.html"><code cla
<p>Returns a number system name for a given locale and number system reference.</p><ul><li><p><code class="inline">system_name</code> is any number system name returned by <p>Returns a number system name for a given locale and number system reference.</p><ul><li><p><code class="inline">system_name</code> is any number system name returned by
<a href="Plausible.Cldr.html#known_number_systems/0"><code class="inline">Plausible.Cldr.known_number_systems/0</code></a> or a number system type <a href="Plausible.Cldr.html#known_number_systems/0"><code class="inline">Plausible.Cldr.known_number_systems/0</code></a> or a number system type
returned by <a href="Plausible.Cldr.html#known_number_system_types/0"><code class="inline">Plausible.Cldr.known_number_system_types/0</code></a></p></li><li><p><code class="inline">locale</code> is any valid locale name returned by <a href="Plausible.Cldr.html#known_locale_names/0"><code class="inline">Plausible.Cldr.known_locale_names/0</code></a> returned by <a href="Plausible.Cldr.html#known_number_system_types/0"><code class="inline">Plausible.Cldr.known_number_system_types/0</code></a></p></li><li><p><code class="inline">locale</code> is any valid locale name returned by <a href="Plausible.Cldr.html#known_locale_names/0"><code class="inline">Plausible.Cldr.known_locale_names/0</code></a>
or a <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.LanguageTag.html"><code class="inline">Cldr.LanguageTag</code></a> struct returned by <a href="Plausible.Cldr.Locale.html#new!/1"><code class="inline">Plausible.Cldr.Locale.new!/1</code></a></p></li></ul><p>Number systems can be references in one of two ways:</p><ul><li><p>As a number system type such as :default, :native, :traditional and or a <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.LanguageTag.html"><code class="inline">Cldr.LanguageTag</code></a> struct returned by <a href="Plausible.Cldr.Locale.html#new!/1"><code class="inline">Plausible.Cldr.Locale.new!/1</code></a></p></li></ul><p>Number systems can be references in one of two ways:</p><ul><li><p>As a number system type such as :default, :native, :traditional and
:finance. This allows references to a number system for a locale in a :finance. This allows references to a number system for a locale in a
consistent fashion for a given use</p></li><li><p>WIth the number system name directly, such as :latn, :arab or any of the consistent fashion for a given use</p></li><li><p>WIth the number system name directly, such as :latn, :arab or any of the
other 70 or so</p></li></ul><p>This function dereferences the supplied <code class="inline">system_name</code> and returns the other 70 or so</p></li></ul><p>This function dereferences the supplied <code class="inline">system_name</code> and returns the
@ -586,20 +586,20 @@ actual system name.</p><h2 id="system_name_from/2-examples" class="section-headi
</a> </a>
Examples Examples
</h2> </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="9646531626-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="9646531626-1">)</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="9682946431-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="9682946431-1">)</span><span class="w">
</span><span class="p" data-group-id="9646531626-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="9646531626-2">}</span><span class="w"> </span><span class="p" data-group-id="9682946431-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="9682946431-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="9646531626-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="9646531626-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">system_name_from</span><span class="p" data-group-id="9682946431-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="9682946431-3">)</span><span class="w">
</span><span class="p" data-group-id="9646531626-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="9646531626-4">}</span><span class="w"> </span><span class="p" data-group-id="9682946431-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="9682946431-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="9646531626-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="9646531626-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">system_name_from</span><span class="p" data-group-id="9682946431-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="9682946431-5">)</span><span class="w">
</span><span class="p" data-group-id="9646531626-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="9646531626-6">}</span><span class="w"> </span><span class="p" data-group-id="9682946431-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="9682946431-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="9646531626-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="9646531626-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">system_name_from</span><span class="p" data-group-id="9682946431-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="9682946431-7">)</span><span class="w">
</span><span class="p" data-group-id="9646531626-8">{</span><span class="w"> </span><span class="p" data-group-id="9682946431-8">{</span><span class="w">
</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="ss">:error</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="9646531626-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="9646531626-9">}</span><span class="w"> </span><span class="p" data-group-id="9682946431-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="9682946431-9">}</span><span class="w">
</span><span class="p" data-group-id="9646531626-8">}</span></code></pre><p>Note that return value is not guaranteed to be a valid </span><span class="p" data-group-id="9682946431-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> number system for the given locale as demonstrated in the third example.</p>
</section> </section>
</section> </section>
@ -626,16 +626,16 @@ number system for the given locale as demonstrated in the third example.</p>
a non-latin number system.</p><p>This function converts numbers to a known a non-latin number system.</p><p>This function converts numbers to a known
number system only, it does not provide number number system only, it does not provide number
formatting.</p><ul><li><p><code class="inline">number</code> is a <code class="inline">float</code>, <code class="inline">integer</code> or <a href="https://hexdocs.pm/decimal/2.1.1/Decimal.html"><code class="inline">Decimal</code></a></p></li><li><p><code class="inline">system_name</code> is any number system name returned by formatting.</p><ul><li><p><code class="inline">number</code> is a <code class="inline">float</code>, <code class="inline">integer</code> or <a href="https://hexdocs.pm/decimal/2.1.1/Decimal.html"><code class="inline">Decimal</code></a></p></li><li><p><code class="inline">system_name</code> is any number system name returned by
<a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.html#known_number_systems/0"><code class="inline">Cldr.known_number_systems/0</code></a> or a number system type <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.html#known_number_systems/0"><code class="inline">Cldr.known_number_systems/0</code></a> or a number system type
returned by <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.html#known_number_system_types/0"><code class="inline">Cldr.known_number_system_types/0</code></a></p></li></ul><p>There are two types of number systems in CLDR:</p><ul><li><p><code class="inline">:numeric</code> in which the number system defines returned by <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.html#known_number_system_types/0"><code class="inline">Cldr.known_number_system_types/0</code></a></p></li></ul><p>There are two types of number systems in CLDR:</p><ul><li><p><code class="inline">:numeric</code> in which the number system defines
a direct mapping between the latin digits <code class="inline">0..9</code> a direct mapping between the latin digits <code class="inline">0..9</code>
into a the number system equivalent. In this case, into a the number system equivalent. In this case,
<a href="#to_system/2"><code class="inline">to_system/2</code></a> invokes <a href="https://hexdocs.pm/ex_cldr_numbers/2.30.1/Cldr.Number.Transliterate.html#transliterate_digits/3"><code class="inline">Cldr.Number.Transliterate.transliterate_digits/3</code></a> <a href="#to_system/2"><code class="inline">to_system/2</code></a> invokes <a href="https://hexdocs.pm/ex_cldr_numbers/2.31.3/Cldr.Number.Transliterate.html#transliterate_digits/3"><code class="inline">Cldr.Number.Transliterate.transliterate_digits/3</code></a>
for the given number.</p></li><li><p><code class="inline">:algorithmic</code> in which the number system for the given number.</p></li><li><p><code class="inline">:algorithmic</code> in which the number system
does not have the same structure as the <code class="inline">:latn</code> does not have the same structure as the <code class="inline">:latn</code>
number system and therefore the conversion is number system and therefore the conversion is
done algorithmically. For CLDR the algorithm done algorithmically. For CLDR the algorithm
is implemented through <a href="https://hexdocs.pm/ex_cldr_numbers/2.30.1/Cldr.Rbnf.html"><code class="inline">Cldr.Rbnf</code></a> rulesets. is implemented through <a href="https://hexdocs.pm/ex_cldr_numbers/2.31.3/Cldr.Rbnf.html"><code class="inline">Cldr.Rbnf</code></a> rulesets.
These rulesets are considered by CLDR to be These rulesets are considered by CLDR to be
less rigorous than the <code class="inline">:numeric</code> number systems less rigorous than the <code class="inline">:numeric</code> number systems
and caution and testing for a specific use case and caution and testing for a specific use case
@ -646,16 +646,16 @@ is recommended.</p></li></ul><h2 id="to_system/2-examples" class="section-headin
Examples Examples
</h2> </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"> <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="5043574274-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="5043574274-1">}</span><span class="w"> </span><span class="p" data-group-id="3420574912-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="3420574912-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="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="5043574274-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="5043574274-2">}</span><span class="w"> </span><span class="p" data-group-id="3420574912-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="3420574912-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="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="5043574274-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="5043574274-3">}</span><span class="w"> </span><span class="p" data-group-id="3420574912-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="3420574912-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="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="5043574274-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="5043574274-4">}</span></code></pre> </span><span class="p" data-group-id="3420574912-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="3420574912-4">}</span></code></pre>
</section> </section>
</section> </section>
<section class="detail" id="to_system!/2"> <section class="detail" id="to_system!/2">

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>
@ -128,18 +128,18 @@ fast than when formal transliteration is required.</p><h3 id="module-configuring
</a> </a>
Configuring precompilation of digit transliterations Configuring precompilation of digit transliterations
</h3> </h3>
<p>This module includes <a href="https://hexdocs.pm/ex_cldr_numbers/2.30.1/Cldr.Number.Transliterate.html#transliterate_digits/3"><code class="inline">Cldr.Number.Transliterate.transliterate_digits/3</code></a> which transliterates <p>This module includes <a href="https://hexdocs.pm/ex_cldr_numbers/2.31.3/Cldr.Number.Transliterate.html#transliterate_digits/3"><code class="inline">Cldr.Number.Transliterate.transliterate_digits/3</code></a> which transliterates
digits between number systems. For example from :arabic to :latn. Since generating a digits between number systems. For example from :arabic to :latn. Since generating a
transliteration map is slow, pairs of transliterations can be configured so that the 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 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 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="6515634579-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="7464712177-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="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="6515634579-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="6515634579-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="7464712177-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="7464712177-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">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="6515634579-3">[</span><span class="p" data-group-id="6515634579-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="6515634579-4">}</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="6515634579-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="6515634579-5">}</span><span class="p" data-group-id="6515634579-3">]</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="7464712177-3">[</span><span class="p" data-group-id="7464712177-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="7464712177-4">}</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="7464712177-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="7464712177-5">}</span><span class="p" data-group-id="7464712177-3">]</span><span class="w">
</span><span class="k" data-group-id="6515634579-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="k" data-group-id="7464712177-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.30.1/Cldr.Number.System.html#systems_with_digits/0"><code class="inline">Cldr.Number.System.systems_with_digits/0</code></a>.</p><p>If a transliteration is requested between two number pairs that have not been configured for 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.31.3/Cldr.Number.System.html#systems_with_digits/0"><code class="inline">Cldr.Number.System.systems_with_digits/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> precompilation, a warning is logged.</p>
</section> </section>
@ -226,8 +226,8 @@ Functions
<pre translate="no"><span class="attribute">@spec</span> transliterate( <pre translate="no"><span class="attribute">@spec</span> transliterate(
<a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>(), <a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>(),
<a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.LanguageTag.html#t:t/0">Cldr.LanguageTag.t</a>() | <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.Locale.html#t:locale_name/0">Cldr.Locale.locale_name</a>(), <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.LanguageTag.html#t:t/0">Cldr.LanguageTag.t</a>() | <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.Locale.html#t:locale_name/0">Cldr.Locale.locale_name</a>(),
<a href="https://hexdocs.pm/ex_cldr_numbers/2.30.1/Cldr.Number.System.html#t:system_name/0">Cldr.Number.System.system_name</a>() | <a href="https://hexdocs.pm/ex_cldr_numbers/2.30.1/Cldr.Number.System.html#t:types/0">Cldr.Number.System.types</a>() <a href="https://hexdocs.pm/ex_cldr_numbers/2.31.3/Cldr.Number.System.html#t:system_name/0">Cldr.Number.System.system_name</a>() | <a href="https://hexdocs.pm/ex_cldr_numbers/2.31.3/Cldr.Number.System.html#t:types/0">Cldr.Number.System.types</a>()
) :: <a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>() | {:error, {<a href="https://hexdocs.pm/elixir/typespecs.html#built-in-types">module</a>(), <a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>()}}</pre> ) :: <a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>() | {:error, {<a href="https://hexdocs.pm/elixir/typespecs.html#built-in-types">module</a>(), <a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>()}}</pre>
</div> </div>
@ -246,7 +246,7 @@ is the actual name of a known number system. If epressed as an <code class="inli
used as a key to look up a number system for the locale (the usual keys are used as a key to look up a number system for the locale (the usual keys are
<code class="inline">:default</code> and <code class="inline">:native</code> but :traditional and :finance are also part of the <code class="inline">:default</code> and <code class="inline">:native</code> but :traditional and :finance are also part of the
standard). See <a href="Plausible.Cldr.Number.System.html#number_systems_for/1"><code class="inline">Plausible.Cldr.Number.System.number_systems_for/1</code></a> for a locale to standard). See <a href="Plausible.Cldr.Number.System.html#number_systems_for/1"><code class="inline">Plausible.Cldr.Number.System.number_systems_for/1</code></a> for a locale to
see what number system types are defined. The default is <code class="inline">:default</code>.</p></li></ul><p>For available number systems see <a href="https://hexdocs.pm/ex_cldr_numbers/2.30.1/Cldr.Number.System.html#number_systems/0"><code class="inline">Cldr.Number.System.number_systems/0</code></a> see what number system types are defined. The default is <code class="inline">:default</code>.</p></li></ul><p>For available number systems see <a href="https://hexdocs.pm/ex_cldr_numbers/2.31.3/Cldr.Number.System.html#number_systems/0"><code class="inline">Cldr.Number.System.number_systems/0</code></a>
and <a href="Plausible.Cldr.Number.System.html#number_systems_for/1"><code class="inline">Plausible.Cldr.Number.System.number_systems_for/1</code></a>. Also see and <a href="Plausible.Cldr.Number.System.html#number_systems_for/1"><code class="inline">Plausible.Cldr.Number.System.number_systems_for/1</code></a>. Also see
<a href="Plausible.Cldr.Number.Symbol.html#number_symbols_for/1"><code class="inline">Plausible.Cldr.Number.Symbol.number_symbols_for/1</code></a>.</p><h2 id="transliterate/3-examples" class="section-heading"> <a href="Plausible.Cldr.Number.Symbol.html#number_symbols_for/1"><code class="inline">Plausible.Cldr.Number.Symbol.number_symbols_for/1</code></a>.</p><h2 id="transliterate/3-examples" class="section-heading">
<a href="#transliterate/3-examples" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i> <a href="#transliterate/3-examples" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
@ -254,22 +254,22 @@ and <a href="Plausible.Cldr.Number.System.html#number_systems_for/1"><code class
</a> </a>
Examples Examples
</h2> </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="5718620764-1">(</span><span class="s">&quot;123556&quot;</span><span class="p" data-group-id="5718620764-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="0042156105-1">(</span><span class="s">&quot;123556&quot;</span><span class="p" data-group-id="0042156105-1">)</span><span class="w">
</span><span class="s">&quot;123556&quot;</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="5718620764-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="5718620764-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="0042156105-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="0042156105-2">)</span><span class="w">
</span><span class="s">&quot;123556,000&quot;</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="5718620764-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="5718620764-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="0042156105-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="0042156105-3">)</span><span class="w">
</span><span class="s">&quot;123556&quot;</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="5718620764-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="5718620764-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="0042156105-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="0042156105-4">)</span><span class="w">
</span><span class="s">&quot;๑๒๓๕๕๖&quot;</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="5718620764-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="5718620764-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="0042156105-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="0042156105-5">)</span><span class="w">
</span><span class="s">&quot;๑๒๓๕๕๖&quot;</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="5718620764-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="5718620764-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="0042156105-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="0042156105-6">)</span><span class="w">
</span><span class="s">&quot;Some number is: ๑๒๓๕๕๖&quot;</span></code></pre> </span><span class="s">&quot;Some number is: ๑๒๓๕๕๖&quot;</span></code></pre>
</section> </section>
</section> </section>
@ -318,14 +318,14 @@ and <a href="Plausible.Cldr.Number.System.html#number_systems_for/1"><code class
<pre translate="no"><span class="attribute">@spec</span> transliterate_digits( <pre translate="no"><span class="attribute">@spec</span> transliterate_digits(
<a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>(), <a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>(),
<a href="https://hexdocs.pm/ex_cldr_numbers/2.30.1/Cldr.Number.System.html#t:system_name/0">Cldr.Number.System.system_name</a>(), <a href="https://hexdocs.pm/ex_cldr_numbers/2.31.3/Cldr.Number.System.html#t:system_name/0">Cldr.Number.System.system_name</a>(),
<a href="https://hexdocs.pm/ex_cldr_numbers/2.30.1/Cldr.Number.System.html#t:system_name/0">Cldr.Number.System.system_name</a>() <a href="https://hexdocs.pm/ex_cldr_numbers/2.31.3/Cldr.Number.System.html#t:system_name/0">Cldr.Number.System.system_name</a>()
) :: <a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>()</pre> ) :: <a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>()</pre>
</div> </div>
<p>Transliterates digits from one number system to another number system</p><ul><li><p><code class="inline">digits</code> is binary representation of a number</p></li><li><p><code class="inline">from_system</code> and <code class="inline">to_system</code> are number system names in atom form. See <p>Transliterates digits from one number system to another number system</p><ul><li><p><code class="inline">digits</code> is binary representation of a number</p></li><li><p><code class="inline">from_system</code> and <code class="inline">to_system</code> are number system names in atom form. See
<a href="https://hexdocs.pm/ex_cldr_numbers/2.30.1/Cldr.Number.System.html#systems_with_digits/0"><code class="inline">Cldr.Number.System.systems_with_digits/0</code></a> for available number systems.</p></li></ul><h2 id="transliterate_digits/3-example" class="section-heading"> <a href="https://hexdocs.pm/ex_cldr_numbers/2.31.3/Cldr.Number.System.html#systems_with_digits/0"><code class="inline">Cldr.Number.System.systems_with_digits/0</code></a> for available number systems.</p></li></ul><h2 id="transliterate_digits/3-example" class="section-heading">
<a href="#transliterate_digits/3-example" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i> <a href="#transliterate_digits/3-example" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
<p class="sr-only">example</p> <p class="sr-only">example</p>
</a> </a>

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>
@ -117,7 +117,7 @@ Plausible
<p>Formats numbers and currencies based upon CLDR's decimal formats specification.</p><p>The format specification is documentated in <a href="http://unicode.org/reports/tr35/tr35-numbers.html#Number_Formats">Unicode TR35</a>. <p>Formats numbers and currencies based upon CLDR's decimal formats specification.</p><p>The format specification is documentated in <a href="http://unicode.org/reports/tr35/tr35-numbers.html#Number_Formats">Unicode TR35</a>.
There are several classes of formatting including non-scientific, scientific, There are several classes of formatting including non-scientific, scientific,
rules based (for spelling and ordinal formats), compact formats that display <code class="inline">1k</code> rules based (for spelling and ordinal formats), compact formats that display <code class="inline">1k</code>
rather than <code class="inline">1,000</code> and so on. See <a href="https://hexdocs.pm/ex_cldr_numbers/2.30.1/Cldr.Number.html#to_string/2"><code class="inline">Cldr.Number.to_string/2</code></a> for specific formatting rather than <code class="inline">1,000</code> and so on. See <a href="https://hexdocs.pm/ex_cldr_numbers/2.31.3/Cldr.Number.html#to_string/2"><code class="inline">Cldr.Number.to_string/2</code></a> for specific formatting
options.</p><h3 id="module-non-scientific-notation-formatting" class="section-heading"> options.</p><h3 id="module-non-scientific-notation-formatting" class="section-heading">
<a href="#module-non-scientific-notation-formatting" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i> <a href="#module-non-scientific-notation-formatting" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
<p class="sr-only">non-scientific-notation-formatting</p> <p class="sr-only">non-scientific-notation-formatting</p>
@ -414,19 +414,19 @@ using the Elixir standard library functions.</p><h2 id="parse/2-examples" class=
</a> </a>
Examples Examples
</h2> </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="8740511091-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="8740511091-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">parse</span><span class="p" data-group-id="3722544740-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="3722544740-1">)</span><span class="w">
</span><span class="p" data-group-id="8740511091-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="8740511091-2">}</span><span class="w"> </span><span class="p" data-group-id="3722544740-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="3722544740-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="8740511091-3">(</span><span class="s">&quot;-1_000_000.34&quot;</span><span class="p" data-group-id="8740511091-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">parse</span><span class="p" data-group-id="3722544740-3">(</span><span class="s">&quot;-1_000_000.34&quot;</span><span class="p" data-group-id="3722544740-3">)</span><span class="w">
</span><span class="p" data-group-id="8740511091-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="8740511091-4">}</span><span class="w"> </span><span class="p" data-group-id="3722544740-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="3722544740-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="8740511091-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="8740511091-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">parse</span><span class="p" data-group-id="3722544740-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="3722544740-5">)</span><span class="w">
</span><span class="p" data-group-id="8740511091-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="8740511091-6">}</span><span class="w"> </span><span class="p" data-group-id="3722544740-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="3722544740-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="8740511091-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="8740511091-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">parse</span><span class="p" data-group-id="3722544740-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="3722544740-7">)</span><span class="w">
</span><span class="p" data-group-id="8740511091-8">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="3722544740-8">{</span><span class="ss">:error</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="8740511091-9">{</span><span class="nc">Cldr.Number.ParseError</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="3722544740-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="8740511091-9">}</span><span class="p" data-group-id="8740511091-8">}</span></code></pre> </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="3722544740-9">}</span><span class="p" data-group-id="3722544740-8">}</span></code></pre>
</section> </section>
</section> </section>
<section class="detail" id="resolve_currencies/2"> <section class="detail" id="resolve_currencies/2">
@ -464,8 +464,8 @@ names and symbols are expected</p></li><li><p><code class="inline">options</code
</a> </a>
Options Options
</h2> </h2>
<ul><li><p><code class="inline">:locale</code> is any valid locale returned by <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.html#known_locale_names/1"><code class="inline">Cldr.known_locale_names/1</code></a> <ul><li><p><code class="inline">:locale</code> is any valid locale returned by <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.html#known_locale_names/1"><code class="inline">Cldr.known_locale_names/1</code></a>
or a <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.LanguageTag.html"><code class="inline">Cldr.LanguageTag</code></a> struct returned by <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.Locale.html#new!/2"><code class="inline">Cldr.Locale.new!/2</code></a> or a <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.LanguageTag.html"><code class="inline">Cldr.LanguageTag</code></a> struct returned by <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.Locale.html#new!/2"><code class="inline">Cldr.Locale.new!/2</code></a>
The default is <code class="inline">Plausible.Cldr.get_locale()</code></p></li><li><p><code class="inline">:only</code> is an <code class="inline">atom</code> or list of <code class="inline">atoms</code> representing the The default is <code class="inline">Plausible.Cldr.get_locale()</code></p></li><li><p><code class="inline">:only</code> is an <code class="inline">atom</code> or list of <code class="inline">atoms</code> representing the
currencies or currency types to be considered for a match. currencies or currency types to be considered for a match.
The equates to a list of acceptable currencies for parsing. The equates to a list of acceptable currencies for parsing.
@ -498,17 +498,17 @@ financial instruments.</p></li></ul><h2 id="resolve_currencies/2-examples" class
</a> </a>
Examples Examples
</h2> </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="4359855336-1">(</span><span class="s">&quot;100 US dollars&quot;</span><span class="p" data-group-id="4359855336-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="7257081284-1">(</span><span class="s">&quot;100 US dollars&quot;</span><span class="p" data-group-id="7257081284-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="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="4359855336-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="4359855336-2">]</span><span class="w"> </span><span class="p" data-group-id="7257081284-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="7257081284-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="4359855336-3">(</span><span class="s">&quot;100 eurosports&quot;</span><span class="p" data-group-id="4359855336-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">scan</span><span class="p" data-group-id="7257081284-3">(</span><span class="s">&quot;100 eurosports&quot;</span><span class="p" data-group-id="7257081284-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="4359855336-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="4359855336-4">)</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="7257081284-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="7257081284-4">)</span><span class="w">
</span><span class="p" data-group-id="4359855336-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="4359855336-5">]</span><span class="w"> </span><span class="p" data-group-id="7257081284-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="7257081284-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="4359855336-6">(</span><span class="s">&quot;100 dollars des États-Unis&quot;</span><span class="p" data-group-id="4359855336-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="7257081284-6">(</span><span class="s">&quot;100 dollars des États-Unis&quot;</span><span class="p" data-group-id="7257081284-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="4359855336-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="4359855336-7">)</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="7257081284-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="7257081284-7">)</span><span class="w">
</span><span class="p" data-group-id="4359855336-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="4359855336-8">]</span></code></pre> </span><span class="p" data-group-id="7257081284-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="7257081284-8">]</span></code></pre>
</section> </section>
</section> </section>
<section class="detail" id="resolve_currency/2"> <section class="detail" id="resolve_currency/2">
@ -545,8 +545,8 @@ names and symbols are expected</p></li><li><p><code class="inline">options</code
</a> </a>
Options Options
</h2> </h2>
<ul><li><p><code class="inline">:locale</code> is any valid locale returned by <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.html#known_locale_names/1"><code class="inline">Cldr.known_locale_names/1</code></a> <ul><li><p><code class="inline">:locale</code> is any valid locale returned by <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.html#known_locale_names/1"><code class="inline">Cldr.known_locale_names/1</code></a>
or a <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.LanguageTag.html"><code class="inline">Cldr.LanguageTag</code></a> struct returned by <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.Locale.html#new!/2"><code class="inline">Cldr.Locale.new!/2</code></a> or a <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.LanguageTag.html"><code class="inline">Cldr.LanguageTag</code></a> struct returned by <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.Locale.html#new!/2"><code class="inline">Cldr.Locale.new!/2</code></a>
The default is <code class="inline">Plausible.Cldr.get_locale()</code></p></li><li><p><code class="inline">:only</code> is an <code class="inline">atom</code> or list of <code class="inline">atoms</code> representing the The default is <code class="inline">Plausible.Cldr.get_locale()</code></p></li><li><p><code class="inline">:only</code> is an <code class="inline">atom</code> or list of <code class="inline">atoms</code> representing the
currencies or currency types to be considered for a match. currencies or currency types to be considered for a match.
The equates to a list of acceptable currencies for parsing. The equates to a list of acceptable currencies for parsing.
@ -585,19 +585,19 @@ financial instruments.</p></li></ul><h2 id="resolve_currency/2-examples" class="
</a> </a>
Examples Examples
</h2> </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="9118603349-1">(</span><span class="s">&quot;US dollars&quot;</span><span class="p" data-group-id="9118603349-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">resolve_currency</span><span class="p" data-group-id="1872046209-1">(</span><span class="s">&quot;US dollars&quot;</span><span class="p" data-group-id="1872046209-1">)</span><span class="w">
</span><span class="p" data-group-id="9118603349-2">[</span><span class="ss">:USD</span><span class="p" data-group-id="9118603349-2">]</span><span class="w"> </span><span class="p" data-group-id="1872046209-2">[</span><span class="ss">:USD</span><span class="p" data-group-id="1872046209-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="9118603349-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="9118603349-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">resolve_currency</span><span class="p" data-group-id="1872046209-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="1872046209-3">)</span><span class="w">
</span><span class="p" data-group-id="9118603349-4">[</span><span class="ss">:EUR</span><span class="p" data-group-id="9118603349-4">]</span><span class="w"> </span><span class="p" data-group-id="1872046209-4">[</span><span class="ss">:EUR</span><span class="p" data-group-id="1872046209-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="9118603349-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="9118603349-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">resolve_currency</span><span class="p" data-group-id="1872046209-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="1872046209-5">)</span><span class="w">
</span><span class="p" data-group-id="9118603349-6">[</span><span class="ss">:USD</span><span class="p" data-group-id="9118603349-6">]</span><span class="w"> </span><span class="p" data-group-id="1872046209-6">[</span><span class="ss">:USD</span><span class="p" data-group-id="1872046209-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="9118603349-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="9118603349-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">resolve_currency</span><span class="p" data-group-id="1872046209-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="1872046209-7">)</span><span class="w">
</span><span class="p" data-group-id="9118603349-8">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1872046209-8">{</span><span class="ss">:error</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="9118603349-9">{</span><span class="nc">Cldr.UnknownCurrencyError</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1872046209-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="9118603349-9">}</span><span class="p" data-group-id="9118603349-8">}</span></code></pre> </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="1872046209-9">}</span><span class="p" data-group-id="1872046209-8">}</span></code></pre>
</section> </section>
</section> </section>
<section class="detail" id="resolve_per/2"> <section class="detail" id="resolve_per/2">
@ -626,8 +626,8 @@ financial instruments.</p></li></ul><h2 id="resolve_currency/2-examples" class="
<div class="specs"> <div class="specs">
<pre translate="no"><span class="attribute">@spec</span> resolve_per(<a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>(), <a href="https://hexdocs.pm/elixir/Keyword.html#t:t/0">Keyword.t</a>()) :: <pre translate="no"><span class="attribute">@spec</span> resolve_per(<a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>(), <a href="https://hexdocs.pm/elixir/Keyword.html#t:t/0">Keyword.t</a>()) ::
<a href="https://hexdocs.pm/ex_cldr_numbers/2.30.1/Cldr.Number.Parser.html#t:per/0">Cldr.Number.Parser.per</a>() <a href="https://hexdocs.pm/ex_cldr_numbers/2.31.3/Cldr.Number.Parser.html#t:per/0">Cldr.Number.Parser.per</a>()
| [<a href="https://hexdocs.pm/ex_cldr_numbers/2.30.1/Cldr.Number.Parser.html#t:per/0">Cldr.Number.Parser.per</a>() | <a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>()] | [<a href="https://hexdocs.pm/ex_cldr_numbers/2.31.3/Cldr.Number.Parser.html#t:per/0">Cldr.Number.Parser.per</a>() | <a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>()]
| {:error, {<a href="https://hexdocs.pm/elixir/typespecs.html#built-in-types">module</a>(), <a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>()}}</pre> | {:error, {<a href="https://hexdocs.pm/elixir/typespecs.html#built-in-types">module</a>(), <a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>()}}</pre>
</div> </div>
@ -646,8 +646,8 @@ and permille symbols are expected</p></li><li><p><code class="inline">options</c
</a> </a>
Options Options
</h2> </h2>
<ul><li><code class="inline">:locale</code> is any valid locale returned by <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.html#known_locale_names/1"><code class="inline">Cldr.known_locale_names/1</code></a> <ul><li><code class="inline">:locale</code> is any valid locale returned by <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.html#known_locale_names/1"><code class="inline">Cldr.known_locale_names/1</code></a>
or a <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.LanguageTag.html"><code class="inline">Cldr.LanguageTag</code></a> struct returned by <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.Locale.html#new!/2"><code class="inline">Cldr.Locale.new!/2</code></a> or a <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.LanguageTag.html"><code class="inline">Cldr.LanguageTag</code></a> struct returned by <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.Locale.html#new!/2"><code class="inline">Cldr.Locale.new!/2</code></a>
The default is <code class="inline">options[:backend].get_locale()</code></li></ul><h2 id="resolve_per/2-returns" class="section-heading"> The default is <code class="inline">options[:backend].get_locale()</code></li></ul><h2 id="resolve_per/2-returns" class="section-heading">
<a href="#resolve_per/2-returns" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i> <a href="#resolve_per/2-returns" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
<p class="sr-only">returns</p> <p class="sr-only">returns</p>
@ -661,13 +661,13 @@ The default is <code class="inline">options[:backend].get_locale()</code></li></
Examples Examples
</h2> </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"> <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="8100792597-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="8100792597-1">]</span><span class="w"> </span><span class="p" data-group-id="5871066644-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="5871066644-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="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="8100792597-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="8100792597-2">]</span><span class="w"> </span><span class="p" data-group-id="5871066644-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="5871066644-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="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="8100792597-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="8100792597-3">]</span></code></pre> </span><span class="p" data-group-id="5871066644-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="5871066644-3">]</span></code></pre>
</section> </section>
</section> </section>
<section class="detail" id="resolve_pers/2"> <section class="detail" id="resolve_pers/2">
@ -696,7 +696,7 @@ The default is <code class="inline">options[:backend].get_locale()</code></li></
<div class="specs"> <div class="specs">
<pre translate="no"><span class="attribute">@spec</span> resolve_pers([<a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>(), ...], <a href="https://hexdocs.pm/elixir/Keyword.html#t:t/0">Keyword.t</a>()) :: [ <pre translate="no"><span class="attribute">@spec</span> resolve_pers([<a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>(), ...], <a href="https://hexdocs.pm/elixir/Keyword.html#t:t/0">Keyword.t</a>()) :: [
<a href="https://hexdocs.pm/ex_cldr_numbers/2.30.1/Cldr.Number.Parser.html#t:per/0">Cldr.Number.Parser.per</a>() | <a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>() <a href="https://hexdocs.pm/ex_cldr_numbers/2.31.3/Cldr.Number.Parser.html#t:per/0">Cldr.Number.Parser.per</a>() | <a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>()
]</pre> ]</pre>
</div> </div>
@ -716,17 +716,17 @@ permille symbols are expected</p></li><li><p><code class="inline">options</code>
</a> </a>
Options Options
</h2> </h2>
<ul><li><code class="inline">:locale</code> is any valid locale returned by <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.html#known_locale_names/1"><code class="inline">Cldr.known_locale_names/1</code></a> <ul><li><code class="inline">:locale</code> is any valid locale returned by <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.html#known_locale_names/1"><code class="inline">Cldr.known_locale_names/1</code></a>
or a <code class="inline">t:Cldr.LanguageTag</code> struct returned by <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.Locale.html#new!/2"><code class="inline">Cldr.Locale.new!/2</code></a> or a <code class="inline">t:Cldr.LanguageTag</code> struct returned by <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.Locale.html#new!/2"><code class="inline">Cldr.Locale.new!/2</code></a>
The default is <code class="inline">options[:backend].get_locale()</code></li></ul><h2 id="resolve_pers/2-examples" class="section-heading"> The default is <code class="inline">options[:backend].get_locale()</code></li></ul><h2 id="resolve_pers/2-examples" class="section-heading">
<a href="#resolve_pers/2-examples" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i> <a href="#resolve_pers/2-examples" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
<p class="sr-only">examples</p> <p class="sr-only">examples</p>
</a> </a>
Examples Examples
</h2> </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="6717302410-1">(</span><span class="s">&quot;100%&quot;</span><span class="p" data-group-id="6717302410-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="1398461180-1">(</span><span class="s">&quot;100%&quot;</span><span class="p" data-group-id="1398461180-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="6717302410-2">(</span><span class="p" data-group-id="6717302410-2">)</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="1398461180-2">(</span><span class="p" data-group-id="1398461180-2">)</span><span class="w">
</span><span class="p" data-group-id="6717302410-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="6717302410-3">]</span></code></pre> </span><span class="p" data-group-id="1398461180-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="1398461180-3">]</span></code></pre>
</section> </section>
</section> </section>
<section class="detail" id="scan/2"> <section class="detail" id="scan/2">
@ -766,7 +766,7 @@ a list of strings and numbers.</p><h2 id="scan/2-arguments" class="section-headi
<ul><li><p><code class="inline">:number</code> is one of <code class="inline">:integer</code>, <code class="inline">:float</code>, <ul><li><p><code class="inline">:number</code> is one of <code class="inline">:integer</code>, <code class="inline">:float</code>,
<code class="inline">:decimal</code> or <code class="inline">nil</code>. The default is <code class="inline">nil</code> <code class="inline">:decimal</code> or <code class="inline">nil</code>. The default is <code class="inline">nil</code>
meaning that the type auto-detected as either meaning that the type auto-detected as either
an <code class="inline">integer</code> or a <code class="inline">float</code>.</p></li><li><p><code class="inline">:locale</code> is any locale returned by <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.html#known_locale_names/1"><code class="inline">Cldr.known_locale_names/1</code></a> an <code class="inline">integer</code> or a <code class="inline">float</code>.</p></li><li><p><code class="inline">:locale</code> is any locale returned by <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.html#known_locale_names/1"><code class="inline">Cldr.known_locale_names/1</code></a>
or a <code class="inline">Cldr.LanguageTag.t</code>. The default is <a href="Plausible.Cldr.html#get_locale/0"><code class="inline">Plausible.Cldr.get_locale/0</code></a>.</p></li></ul><h2 id="scan/2-returns" class="section-heading"> or a <code class="inline">Cldr.LanguageTag.t</code>. The default is <a href="Plausible.Cldr.html#get_locale/0"><code class="inline">Plausible.Cldr.get_locale/0</code></a>.</p></li></ul><h2 id="scan/2-returns" class="section-heading">
<a href="#scan/2-returns" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i> <a href="#scan/2-returns" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
<p class="sr-only">returns</p> <p class="sr-only">returns</p>
@ -779,27 +779,27 @@ or a <code class="inline">Cldr.LanguageTag.t</code>. The default is <a href="Pla
</a> </a>
Notes Notes
</h2> </h2>
<p>Number parsing is performed by <a href="https://hexdocs.pm/ex_cldr_numbers/2.30.1/Cldr.Number.Parser.html#parse/2"><code class="inline">Cldr.Number.Parser.parse/2</code></a> <p>Number parsing is performed by <a href="https://hexdocs.pm/ex_cldr_numbers/2.31.3/Cldr.Number.Parser.html#parse/2"><code class="inline">Cldr.Number.Parser.parse/2</code></a>
and any options provided are passed to that function.</p><h2 id="scan/2-examples" class="section-heading"> and any options provided are passed to that function.</p><h2 id="scan/2-examples" class="section-heading">
<a href="#scan/2-examples" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i> <a href="#scan/2-examples" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
<p class="sr-only">examples</p> <p class="sr-only">examples</p>
</a> </a>
Examples Examples
</h2> </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="0565525577-1">(</span><span class="s">&quot;£1_000_000.34&quot;</span><span class="p" data-group-id="0565525577-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="7136270898-1">(</span><span class="s">&quot;£1_000_000.34&quot;</span><span class="p" data-group-id="7136270898-1">)</span><span class="w">
</span><span class="p" data-group-id="0565525577-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="0565525577-2">]</span><span class="w"> </span><span class="p" data-group-id="7136270898-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="7136270898-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="0565525577-3">(</span><span class="s">&quot;I want £1_000_000 dollars&quot;</span><span class="p" data-group-id="0565525577-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">scan</span><span class="p" data-group-id="7136270898-3">(</span><span class="s">&quot;I want £1_000_000 dollars&quot;</span><span class="p" data-group-id="7136270898-3">)</span><span class="w">
</span><span class="p" data-group-id="0565525577-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="0565525577-4">]</span><span class="w"> </span><span class="p" data-group-id="7136270898-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="7136270898-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="0565525577-5">(</span><span class="s">&quot;The prize is 23&quot;</span><span class="p" data-group-id="0565525577-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="7136270898-5">(</span><span class="s">&quot;The prize is 23&quot;</span><span class="p" data-group-id="7136270898-5">)</span><span class="w">
</span><span class="p" data-group-id="0565525577-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="0565525577-6">]</span><span class="w"> </span><span class="p" data-group-id="7136270898-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="7136270898-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="0565525577-7">(</span><span class="s">&quot;The lottery number is 23 for the next draw&quot;</span><span class="p" data-group-id="0565525577-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">scan</span><span class="p" data-group-id="7136270898-7">(</span><span class="s">&quot;The lottery number is 23 for the next draw&quot;</span><span class="p" data-group-id="7136270898-7">)</span><span class="w">
</span><span class="p" data-group-id="0565525577-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="0565525577-8">]</span><span class="w"> </span><span class="p" data-group-id="7136270898-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="7136270898-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="0565525577-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="0565525577-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">scan</span><span class="p" data-group-id="7136270898-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="7136270898-9">)</span><span class="w">
</span><span class="p" data-group-id="0565525577-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="0565525577-10">]</span></code></pre> </span><span class="p" data-group-id="7136270898-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="7136270898-10">]</span></code></pre>
</section> </section>
</section> </section>
<section class="detail" id="to_approx_string/2"> <section class="detail" id="to_approx_string/2">
@ -838,7 +838,7 @@ a locale and number system.</p><h2 id="to_approx_string/2-arguments" class="sect
Arguments Arguments
</h2> </h2>
<ul><li><p><code class="inline">number</code> is an integer, float or Decimal to be formatted</p></li><li><p><code class="inline">options</code> is a keyword list defining how the number is to be formatted. <ul><li><p><code class="inline">number</code> is an integer, float or Decimal to be formatted</p></li><li><p><code class="inline">options</code> is a keyword list defining how the number is to be formatted.
See <a href="https://hexdocs.pm/ex_cldr_numbers/2.30.1/Cldr.Number.html#to_string/3"><code class="inline">Cldr.Number.to_string/3</code></a> for a description of the available See <a href="https://hexdocs.pm/ex_cldr_numbers/2.31.3/Cldr.Number.html#to_string/3"><code class="inline">Cldr.Number.to_string/3</code></a> for a description of the available
options.</p></li></ul><h2 id="to_approx_string/2-example" class="section-heading"> options.</p></li></ul><h2 id="to_approx_string/2-example" class="section-heading">
<a href="#to_approx_string/2-example" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i> <a href="#to_approx_string/2-example" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
<p class="sr-only">example</p> <p class="sr-only">example</p>
@ -846,7 +846,7 @@ options.</p></li></ul><h2 id="to_approx_string/2-example" class="section-heading
Example Example
</h2> </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"> <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="6074538763-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="6074538763-1">}</span></code></pre> </span><span class="p" data-group-id="3013393938-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="3013393938-1">}</span></code></pre>
</section> </section>
</section> </section>
<section class="detail" id="to_at_least_string/2"> <section class="detail" id="to_at_least_string/2">
@ -893,7 +893,7 @@ options.</p></li></ul><h2 id="to_at_least_string/2-example" class="section-headi
Example Example
</h2> </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"> <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="6265086081-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="6265086081-1">}</span></code></pre> </span><span class="p" data-group-id="7703979014-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="7703979014-1">}</span></code></pre>
</section> </section>
</section> </section>
<section class="detail" id="to_at_most_string/2"> <section class="detail" id="to_at_most_string/2">
@ -932,7 +932,7 @@ a locale and number system.</p><h2 id="to_at_most_string/2-arguments" class="sec
Arguments Arguments
</h2> </h2>
<ul><li><p><code class="inline">number</code> is an integer, float or Decimal to be formatted</p></li><li><p><code class="inline">options</code> is a keyword list defining how the number is to be formatted. <ul><li><p><code class="inline">number</code> is an integer, float or Decimal to be formatted</p></li><li><p><code class="inline">options</code> is a keyword list defining how the number is to be formatted.
See <a href="https://hexdocs.pm/ex_cldr_numbers/2.30.1/Cldr.Number.html#to_string/3"><code class="inline">Cldr.Number.to_string/3</code></a> for a description of the available See <a href="https://hexdocs.pm/ex_cldr_numbers/2.31.3/Cldr.Number.html#to_string/3"><code class="inline">Cldr.Number.to_string/3</code></a> for a description of the available
options.</p></li></ul><h2 id="to_at_most_string/2-example" class="section-heading"> options.</p></li></ul><h2 id="to_at_most_string/2-example" class="section-heading">
<a href="#to_at_most_string/2-example" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i> <a href="#to_at_most_string/2-example" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
<p class="sr-only">example</p> <p class="sr-only">example</p>
@ -940,7 +940,7 @@ options.</p></li></ul><h2 id="to_at_most_string/2-example" class="section-headin
Example Example
</h2> </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"> <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="6151999187-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="6151999187-1">}</span></code></pre> </span><span class="p" data-group-id="6298946841-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="6298946841-1">}</span></code></pre>
</section> </section>
</section> </section>
<section class="detail" id="to_range_string/2"> <section class="detail" id="to_range_string/2">
@ -979,7 +979,7 @@ the <code class="inline">:range</code> format for a locale and number system.</p
Arguments Arguments
</h2> </h2>
<ul><li><p><code class="inline">number</code> is an integer, float or Decimal to be formatted</p></li><li><p><code class="inline">options</code> is a keyword list defining how the number is to be formatted. <ul><li><p><code class="inline">number</code> is an integer, float or Decimal to be formatted</p></li><li><p><code class="inline">options</code> is a keyword list defining how the number is to be formatted.
See <a href="https://hexdocs.pm/ex_cldr_numbers/2.30.1/Cldr.Number.html#to_string/3"><code class="inline">Cldr.Number.to_string/3</code></a> for a description of the available See <a href="https://hexdocs.pm/ex_cldr_numbers/2.31.3/Cldr.Number.html#to_string/3"><code class="inline">Cldr.Number.to_string/3</code></a> for a description of the available
options.</p></li></ul><h2 id="to_range_string/2-example" class="section-heading"> options.</p></li></ul><h2 id="to_range_string/2-example" class="section-heading">
<a href="#to_range_string/2-example" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i> <a href="#to_range_string/2-example" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
<p class="sr-only">example</p> <p class="sr-only">example</p>
@ -987,7 +987,7 @@ options.</p></li></ul><h2 id="to_range_string/2-example" class="section-heading"
Example Example
</h2> </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"> <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="6172067937-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="6172067937-1">}</span></code></pre> </span><span class="p" data-group-id="8818869656-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="8818869656-1">}</span></code></pre>
</section> </section>
</section> </section>
<section class="detail" id="to_string/2"> <section class="detail" id="to_string/2">
@ -1031,14 +1031,14 @@ options.</p></li></ul><h2 id="to_range_string/2-example" class="section-heading"
Options Options
</h2> </h2>
<ul><li><p><code class="inline">format</code>: the format style or a format string defining how the number is <ul><li><p><code class="inline">format</code>: the format style or a format string defining how the number is
formatted. See <a href="https://hexdocs.pm/ex_cldr_numbers/2.30.1/Cldr.Number.Format.html"><code class="inline">Cldr.Number.Format</code></a> for how format strings can be constructed. formatted. See <a href="https://hexdocs.pm/ex_cldr_numbers/2.31.3/Cldr.Number.Format.html"><code class="inline">Cldr.Number.Format</code></a> for how format strings can be constructed.
See <a href="https://hexdocs.pm/ex_cldr_numbers/2.30.1/Cldr.Number.Format.html#format_styles_for/3"><code class="inline">Cldr.Number.Format.format_styles_for/3</code></a> to return available format styles See <a href="https://hexdocs.pm/ex_cldr_numbers/2.31.3/Cldr.Number.Format.html#format_styles_for/3"><code class="inline">Cldr.Number.Format.format_styles_for/3</code></a> to return available format styles
for a locale. The default <code class="inline">format</code> is <code class="inline">:standard</code>.</p></li><li><p>If <code class="inline">:format</code> is set to <code class="inline">:long</code> or <code class="inline">:short</code> then the formatting depends on for a locale. The default <code class="inline">format</code> is <code class="inline">:standard</code>.</p></li><li><p>If <code class="inline">:format</code> is set to <code class="inline">:long</code> or <code class="inline">:short</code> then the formatting depends on
whether <code class="inline">:currency</code> is specified. If not specified then the number is whether <code class="inline">:currency</code> is specified. If not specified then the number is
formatted as <code class="inline">:decimal_long</code> or <code class="inline">:decimal_short</code>. If <code class="inline">:currency</code> is formatted as <code class="inline">:decimal_long</code> or <code class="inline">:decimal_short</code>. If <code class="inline">:currency</code> is
specified the number is formatted as <code class="inline">:currency_long</code> or specified the number is formatted as <code class="inline">:currency_long</code> or
<code class="inline">:currency_short</code> and <code class="inline">:fractional_digits</code> is set to 0 as a default.</p></li><li><p><code class="inline">:format</code> may also be a format defined by CLDR's Rules Based Number <code class="inline">:currency_short</code> and <code class="inline">:fractional_digits</code> is set to 0 as a default.</p></li><li><p><code class="inline">:format</code> may also be a format defined by CLDR's Rules Based Number
Formats (RBNF). Further information is found in the module <a href="https://hexdocs.pm/ex_cldr_numbers/2.30.1/Cldr.Rbnf.html"><code class="inline">Cldr.Rbnf</code></a>. Formats (RBNF). Further information is found in the module <a href="https://hexdocs.pm/ex_cldr_numbers/2.31.3/Cldr.Rbnf.html"><code class="inline">Cldr.Rbnf</code></a>.
The most commonly used formats in this category are to spell out the The most commonly used formats in this category are to spell out the
number in a the locales language. The applicable formats are <code class="inline">:spellout</code>, number in a the locales language. The applicable formats are <code class="inline">:spellout</code>,
<code class="inline">:spellout_year</code>, <code class="inline">:ordinal</code>. A number can also be formatted as roman <code class="inline">:spellout_year</code>, <code class="inline">:ordinal</code>. A number can also be formatted as roman
@ -1065,10 +1065,10 @@ should be used to define the separators and digits for the formatted
number. If <code class="inline">number_system</code> is an <code class="inline">atom</code> then <code class="inline">number_system</code> is number. If <code class="inline">number_system</code> is an <code class="inline">atom</code> then <code class="inline">number_system</code> is
interpreted as a number system. If the <code class="inline">:number_system</code> is interpreted as a number system. If the <code class="inline">:number_system</code> is
<code class="inline">binary</code> then it is interpreted as a number system name. See <code class="inline">binary</code> then it is interpreted as a number system name. See
<a href="https://hexdocs.pm/ex_cldr_numbers/2.30.1/Cldr.Number.System.html#number_system_names_for/2"><code class="inline">Cldr.Number.System.number_system_names_for/2</code></a>. The default is <code class="inline">:default</code>.</p></li><li><p><code class="inline">:locale</code>: determines the locale in which the number is formatted. See <a href="https://hexdocs.pm/ex_cldr_numbers/2.31.3/Cldr.Number.System.html#number_system_names_for/2"><code class="inline">Cldr.Number.System.number_system_names_for/2</code></a>. The default is <code class="inline">:default</code>.</p></li><li><p><code class="inline">:locale</code>: determines the locale in which the number is formatted. See
<a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.html#known_locale_names/0"><code class="inline">Cldr.known_locale_names/0</code></a>. The default is<a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.html#get_locale/0"><code class="inline">Cldr.get_locale/0</code></a> which is the <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.html#known_locale_names/0"><code class="inline">Cldr.known_locale_names/0</code></a>. The default is<a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.html#get_locale/0"><code class="inline">Cldr.get_locale/0</code></a> which is the
locale currently in affect for this <a href="https://hexdocs.pm/elixir/Process.html"><code class="inline">Process</code></a> and which is set by locale currently in affect for this <a href="https://hexdocs.pm/elixir/Process.html"><code class="inline">Process</code></a> and which is set by
<a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.html#put_locale/1"><code class="inline">Cldr.put_locale/1</code></a>.</p></li><li><p>If <code class="inline">:fractional_digits</code> is set to a positive integer value then the number <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.html#put_locale/1"><code class="inline">Cldr.put_locale/1</code></a>.</p></li><li><p>If <code class="inline">:fractional_digits</code> is set to a positive integer value then the number
will be rounded to that number of digits and displayed accordingly - overriding will be rounded to that number of digits and displayed accordingly - overriding
settings that would be applied by default. For example, currencies have settings that would be applied by default. For example, currencies have
fractional digits defined reflecting each currencies minor unit. Setting fractional digits defined reflecting each currencies minor unit. Setting
@ -1106,21 +1106,21 @@ extensions.</p><h2 id="to_string/2-wrapping-format-elements" class="section-head
</h2> </h2>
<p>Wrapping elements is particularly useful when formatting a number with a <p>Wrapping elements is particularly useful when formatting a number with a
currency symbol and the requirement is to have different HTML formatting 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="9629363654-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="9629363654-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="0711327112-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="0711327112-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">: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">: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="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="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="9629363654-2">end</span><span class="p" data-group-id="9629363654-1">)</span><span class="w"> </span><span class="gp unselectable">...&gt; </span><span class="k" data-group-id="0711327112-2">end</span><span class="p" data-group-id="0711327112-1">)</span><span class="w">
</span><span class="p" data-group-id="9629363654-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="9629363654-3">}</span></code></pre><p>It is also possible and recommended to use the <a href="https://hexdocs.pm/phoenix_html/3.3.1/Phoenix.HTML.Tag.html#content_tag/3"><code class="inline">Phoenix.HTML.Tag.content_tag/3</code></a> </span><span class="p" data-group-id="0711327112-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="0711327112-3">}</span></code></pre><p>It is also possible and recommended to use the <a href="https://hexdocs.pm/phoenix_html/3.3.1/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 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="7405189700-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="7405189700-2">fn</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="8422440487-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="8422440487-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="7405189700-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="7405189700-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">: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="8422440487-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="8422440487-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="7405189700-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="7405189700-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">: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="8422440487-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="8422440487-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="7405189700-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="7405189700-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="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="8422440487-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="8422440487-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="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="7405189700-2">end</span><span class="p" data-group-id="7405189700-1">)</span><span class="w"> </span><span class="gp unselectable">...&gt; </span><span class="k" data-group-id="8422440487-2">end</span><span class="p" data-group-id="8422440487-1">)</span><span class="w">
</span><span class="p" data-group-id="7405189700-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="7405189700-6">}</span></code></pre><p>When formatting a number the format is parsed into format elements that might include </span><span class="p" data-group-id="8422440487-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="8422440487-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 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 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. some cases it is helpful to be apply specific formatting to each element.
@ -1141,80 +1141,80 @@ inserted in the final formatted number.</p><h2 id="to_string/2-returns" class="s
Examples Examples
</h2> </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"> <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="9443141492-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="9443141492-1">}</span><span class="w"> </span><span class="p" data-group-id="4507640006-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="4507640006-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="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="9443141492-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="9443141492-2">}</span><span class="w"> </span><span class="p" data-group-id="4507640006-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="4507640006-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="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="9443141492-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="9443141492-3">}</span><span class="w"> </span><span class="p" data-group-id="4507640006-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="4507640006-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="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="9443141492-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="9443141492-4">}</span><span class="w"> </span><span class="p" data-group-id="4507640006-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="4507640006-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="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="9443141492-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="9443141492-5">}</span><span class="w"> </span><span class="p" data-group-id="4507640006-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="4507640006-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="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="9443141492-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="9443141492-6">}</span><span class="w"> </span><span class="p" data-group-id="4507640006-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="4507640006-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="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="9443141492-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="9443141492-7">}</span><span class="w"> </span><span class="p" data-group-id="4507640006-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="4507640006-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="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="9443141492-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="9443141492-8">}</span><span class="w"> </span><span class="p" data-group-id="4507640006-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="4507640006-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">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="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="9443141492-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="9443141492-9">}</span><span class="w"> </span><span class="p" data-group-id="4507640006-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="4507640006-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">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="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="9443141492-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="9443141492-10">}</span><span class="w"> </span><span class="p" data-group-id="4507640006-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="4507640006-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="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="9443141492-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="9443141492-11">}</span><span class="w"> </span><span class="p" data-group-id="4507640006-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="4507640006-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="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="9443141492-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="9443141492-12">}</span><span class="w"> </span><span class="p" data-group-id="4507640006-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="4507640006-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="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="9443141492-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="9443141492-13">}</span><span class="w"> </span><span class="p" data-group-id="4507640006-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="4507640006-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="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="9443141492-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="9443141492-14">}</span><span class="w"> </span><span class="p" data-group-id="4507640006-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="4507640006-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="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="9443141492-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="9443141492-15">}</span><span class="w"> </span><span class="p" data-group-id="4507640006-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="4507640006-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="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="9443141492-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="9443141492-16">}</span><span class="w"> </span><span class="p" data-group-id="4507640006-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="4507640006-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="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="9443141492-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="9443141492-17">}</span><span class="w"> </span><span class="p" data-group-id="4507640006-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="4507640006-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="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="9443141492-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="9443141492-18">}</span><span class="w"> </span><span class="p" data-group-id="4507640006-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="4507640006-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="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="9443141492-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="9443141492-19">}</span><span class="w"> </span><span class="p" data-group-id="4507640006-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="4507640006-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="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="9443141492-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="9443141492-20">}</span></code></pre><h2 id="to_string/2-errors" class="section-heading"> </span><span class="p" data-group-id="4507640006-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="4507640006-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 href="#to_string/2-errors" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
<p class="sr-only">errors</p> <p class="sr-only">errors</p>
</a> </a>
Errors Errors
</h2> </h2>
<p>An error tuple <code class="inline">{:error, reason}</code> will be returned if an error is detected. <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="8765242682-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="8765242682-1">)</span><span class="w"> 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="8496596036-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="8496596036-1">)</span><span class="w">
</span><span class="p" data-group-id="8765242682-2">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="8765242682-3">{</span><span class="nc">Cldr.FormatCompileError</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="8496596036-2">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="8496596036-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="8765242682-3">}</span><span class="p" data-group-id="8765242682-2">}</span></code></pre><ul><li>The format style requested is not defined for the <code class="inline">locale</code> and </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="8496596036-3">}</span><span class="p" data-group-id="8496596036-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">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 <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="9924223580-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" data-group-id="9924223580-1">)</span><span class="w"> 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="0186197059-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" data-group-id="0186197059-1">)</span><span class="w">
</span><span class="p" data-group-id="9924223580-2">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="9924223580-3">{</span><span class="nc">Cldr.UnknownFormatError</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="0186197059-2">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="0186197059-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 :standard&quot;</span><span class="p" data-group-id="9924223580-3">}</span><span class="p" data-group-id="9924223580-2">}</span></code></pre> </span><span class="s">&quot;The locale :he with number system :hebr does not define a format :standard&quot;</span><span class="p" data-group-id="0186197059-3">}</span><span class="p" data-group-id="0186197059-2">}</span></code></pre>
</section> </section>
</section> </section>
<section class="detail" id="to_string!/2"> <section class="detail" id="to_string!/2">
@ -1293,9 +1293,9 @@ returned.</p><h2 id="to_string!/2-arguments" class="section-heading">
<div class="specs"> <div class="specs">
<pre translate="no"><span class="attribute">@spec</span> validate_number_system( <pre translate="no"><span class="attribute">@spec</span> validate_number_system(
<a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.Locale.html#t:locale_name/0">Cldr.Locale.locale_name</a>() | <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.LanguageTag.html#t:t/0">Cldr.LanguageTag.t</a>(), <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.Locale.html#t:locale_name/0">Cldr.Locale.locale_name</a>() | <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.LanguageTag.html#t:t/0">Cldr.LanguageTag.t</a>(),
<a href="https://hexdocs.pm/ex_cldr_numbers/2.30.1/Cldr.Number.System.html#t:system_name/0">Cldr.Number.System.system_name</a>() | <a href="https://hexdocs.pm/ex_cldr_numbers/2.30.1/Cldr.Number.System.html#t:types/0">Cldr.Number.System.types</a>() <a href="https://hexdocs.pm/ex_cldr_numbers/2.31.3/Cldr.Number.System.html#t:system_name/0">Cldr.Number.System.system_name</a>() | <a href="https://hexdocs.pm/ex_cldr_numbers/2.31.3/Cldr.Number.System.html#t:types/0">Cldr.Number.System.types</a>()
) :: {:ok, <a href="https://hexdocs.pm/ex_cldr_numbers/2.30.1/Cldr.Number.System.html#t:system_name/0">Cldr.Number.System.system_name</a>()} | {:error, {<a href="https://hexdocs.pm/elixir/typespecs.html#built-in-types">module</a>(), <a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>()}}</pre> ) :: {:ok, <a href="https://hexdocs.pm/ex_cldr_numbers/2.31.3/Cldr.Number.System.html#t:system_name/0">Cldr.Number.System.system_name</a>()} | {:error, {<a href="https://hexdocs.pm/elixir/typespecs.html#built-in-types">module</a>(), <a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>()}}</pre>
</div> </div>
@ -1308,27 +1308,27 @@ underlying number system is returned.</p><h2 id="validate_number_system/2-argume
</a> </a>
Arguments Arguments
</h2> </h2>
<ul><li><p><code class="inline">locale</code> is any valid locale name returned by <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.html#known_locale_names/1"><code class="inline">Cldr.known_locale_names/1</code></a> <ul><li><p><code class="inline">locale</code> is any valid locale name returned by <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.html#known_locale_names/1"><code class="inline">Cldr.known_locale_names/1</code></a>
or a <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.LanguageTag.html"><code class="inline">Cldr.LanguageTag</code></a> struct returned by <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.Locale.html#new!/2"><code class="inline">Cldr.Locale.new!/2</code></a></p></li><li><p><code class="inline">system_name</code> is any number system name returned by or a <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.LanguageTag.html"><code class="inline">Cldr.LanguageTag</code></a> struct returned by <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.Locale.html#new!/2"><code class="inline">Cldr.Locale.new!/2</code></a></p></li><li><p><code class="inline">system_name</code> is any number system name returned by
<a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.html#known_number_systems/0"><code class="inline">Cldr.known_number_systems/0</code></a> or a number system type <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.html#known_number_systems/0"><code class="inline">Cldr.known_number_systems/0</code></a> or a number system type
returned by <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.html#known_number_system_types/0"><code class="inline">Cldr.known_number_system_types/0</code></a></p></li></ul><h2 id="validate_number_system/2-examples" class="section-heading"> returned by <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.html#known_number_system_types/0"><code class="inline">Cldr.known_number_system_types/0</code></a></p></li></ul><h2 id="validate_number_system/2-examples" class="section-heading">
<a href="#validate_number_system/2-examples" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i> <a href="#validate_number_system/2-examples" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
<p class="sr-only">examples</p> <p class="sr-only">examples</p>
</a> </a>
Examples Examples
</h2> </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"> <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="5863035240-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="5863035240-1">}</span><span class="w"> </span><span class="p" data-group-id="0281351616-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="0281351616-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="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="5863035240-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="5863035240-2">}</span><span class="w"> </span><span class="p" data-group-id="0281351616-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="0281351616-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="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="5863035240-3">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="0281351616-3">{</span><span class="ss">:error</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="5863035240-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="5863035240-4">}</span><span class="p" data-group-id="5863035240-3">}</span><span class="w"> </span><span class="p" data-group-id="0281351616-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="0281351616-4">}</span><span class="p" data-group-id="0281351616-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="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="5863035240-5">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="5863035240-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="5863035240-6">}</span><span class="p" data-group-id="5863035240-5">}</span></code></pre> </span><span class="p" data-group-id="0281351616-5">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="0281351616-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="0281351616-6">}</span><span class="p" data-group-id="0281351616-5">}</span></code></pre>
</section> </section>
</section> </section>

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>
@ -115,13 +115,26 @@ Plausible
<section id="moduledoc"> <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 <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.30.1/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 number formatting.</p><p>The standard public API for RBNF is via the <a href="https://hexdocs.pm/ex_cldr_numbers/2.31.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="0693193074-1">(</span><span class="ss">:und</span><span class="p" data-group-id="0693193074-1">)</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="2180675098-1">(</span><span class="ss">:und</span><span class="p" data-group-id="2180675098-1">)</span><span class="w">
</span><span class="p" data-group-id="0693193074-2">[</span><span class="ss">:zz_default</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">:roman_upper</span><span class="p">,</span><span class="w"> </span><span class="ss">:roman_lower</span><span class="p">,</span><span class="w"> </span><span class="ss">:hebrew_item</span><span class="p">,</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="2180675098-2">(</span><span class="p" data-group-id="2180675098-2">)</span><span class="w">
</span><span class="ss">:hebrew</span><span class="p">,</span><span class="w"> </span><span class="ss">:greek_upper</span><span class="p">,</span><span class="w"> </span><span class="ss">:greek_lower</span><span class="p">,</span><span class="w"> </span><span class="ss">:georgian</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="2180675098-3">[</span><span class="w">
</span><span class="ss">:ethiopic</span><span class="p">,</span><span class="w"> </span><span class="ss">:cyrillic_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">:armenian_lower</span><span class="p" data-group-id="0693193074-2">]</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="4483217656-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="4483217656-1">)</span><span class="w"> </span><span class="ss">:armenian_lower</span><span class="p">,</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="8773106754-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="8773106754-1">)</span><span class="w"> </span><span class="ss">:armenian_upper</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="8773106754-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="8773106754-2">}</span></code></pre> </span><span class="ss">:cyrillic_lower</span><span class="p">,</span><span class="w">
</span><span class="ss">:ethiopic</span><span class="p">,</span><span class="w">
</span><span class="ss">:georgian</span><span class="p">,</span><span class="w">
</span><span class="ss">:greek_lower</span><span class="p">,</span><span class="w">
</span><span class="ss">:greek_upper</span><span class="p">,</span><span class="w">
</span><span class="ss">:hebrew</span><span class="p">,</span><span class="w">
</span><span class="ss">:hebrew_item</span><span class="p">,</span><span class="w">
</span><span class="ss">:roman_lower</span><span class="p">,</span><span class="w">
</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="2180675098-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="4544510567-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="4544510567-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="4640614666-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="4640614666-1">)</span><span class="w">
</span><span class="p" data-group-id="4640614666-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="4640614666-2">}</span></code></pre>
</section> </section>

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>
@ -115,20 +115,21 @@ Plausible
<section id="moduledoc"> <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 <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.30.1/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 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.31.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="4369967951-1">(</span><span class="ss">:en</span><span class="p" data-group-id="4369967951-1">)</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="2814017135-1">(</span><span class="ss">:en</span><span class="p" data-group-id="2814017135-1">)</span><span class="w">
</span><span class="p" data-group-id="4369967951-2">[</span><span class="ss">:digits_ordinal</span><span class="p" data-group-id="4369967951-2">]</span><span class="w"> </span><span class="p" data-group-id="2814017135-2">[</span><span class="ss">:digits_ordinal</span><span class="p" data-group-id="2814017135-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="4369967951-3">(</span><span class="s">&quot;fr&quot;</span><span class="p" data-group-id="4369967951-3">)</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="2814017135-3">(</span><span class="s">&quot;fr&quot;</span><span class="p" data-group-id="2814017135-3">)</span><span class="w">
</span><span class="p" data-group-id="4369967951-4">[</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="2814017135-4">(</span><span class="p" data-group-id="2814017135-4">)</span><span class="w">
</span><span class="ss">:digits_ordinal_masculine_plural</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="2814017135-5">[</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</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_feminine</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</span><span class="w"> </span><span class="ss">:digits_ordinal_feminine_plural</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="4369967951-4">]</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="1472870427-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="1472870427-1">)</span><span class="w"> </span><span class="ss">:digits_ordinal_masculine</span><span class="p">,</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="8880841019-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="8880841019-1">)</span><span class="w"> </span><span class="ss">:digits_ordinal_masculine_plural</span><span class="w">
</span><span class="p" data-group-id="8880841019-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="8880841019-2">}</span></code></pre> </span><span class="p" data-group-id="2814017135-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="3449265235-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="3449265235-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="2918948911-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="2918948911-1">)</span><span class="w">
</span><span class="p" data-group-id="2918948911-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="2918948911-2">}</span></code></pre>
</section> </section>

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>
@ -115,13 +115,20 @@ Plausible
<section id="moduledoc"> <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 <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.30.1/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 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.31.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="9657479954-1">(</span><span class="s">&quot;en&quot;</span><span class="p" data-group-id="9657479954-1">)</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="3779024382-1">(</span><span class="s">&quot;en&quot;</span><span class="p" data-group-id="3779024382-1">)</span><span class="w">
</span><span class="p" data-group-id="9657479954-2">[</span><span class="ss">:spellout_ordinal_verbose</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_numbering_year</span><span class="p">,</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="3779024382-2">(</span><span class="p" data-group-id="3779024382-2">)</span><span class="w">
</span><span class="ss">:spellout_numbering_verbose</span><span class="p">,</span><span class="w"> </span><span class="ss">:spellout_numbering</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="p" data-group-id="3779024382-3">[</span><span class="w">
</span><span class="ss">:spellout_cardinal</span><span class="p" data-group-id="9657479954-2">]</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="5651087231-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="5651087231-1">)</span><span class="w"> </span><span class="ss">:spellout_cardinal</span><span class="p">,</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="3620060348-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="3620060348-1">)</span><span class="w"> </span><span class="ss">:spellout_cardinal_verbose</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="3620060348-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="3620060348-2">}</span></code></pre> </span><span class="ss">:spellout_numbering</span><span class="p">,</span><span class="w">
</span><span class="ss">:spellout_numbering_verbose</span><span class="p">,</span><span class="w">
</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="3779024382-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="9142501103-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="9142501103-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="3279602466-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="3279602466-1">)</span><span class="w">
</span><span class="p" data-group-id="3279602466-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="3279602466-2">}</span></code></pre>
</section> </section>
@ -138,14 +145,6 @@ defined in the Unicode CLDR data repository. Available rules are identified by:
<a href="#functions">Functions</a> <a href="#functions">Functions</a>
</h2> </h2>
<div class="summary-row">
<div class="summary-signature">
<a href="#2d_year/2" translate="no">2d_year(number, language_tag)</a>
</div>
</div>
<div class="summary-row"> <div class="summary-row">
<div class="summary-signature"> <div class="summary-signature">
<a href="#all_rule_sets/0" translate="no">all_rule_sets()</a> <a href="#all_rule_sets/0" translate="no">all_rule_sets()</a>
@ -186,6 +185,14 @@ defined in the Unicode CLDR data repository. Available rules are identified by:
</div> </div>
<div class="summary-row">
<div class="summary-signature">
<a href="#r2d_year/2" translate="no">r2d_year(number, language_tag)</a>
</div>
</div>
<div class="summary-row"> <div class="summary-row">
<div class="summary-signature"> <div class="summary-signature">
<a href="#rule_sets/0" translate="no">rule_sets()</a> <a href="#rule_sets/0" translate="no">rule_sets()</a>
@ -288,28 +295,6 @@ defined in the Unicode CLDR data repository. Available rules are identified by:
Functions Functions
</h1> </h1>
<div class="functions-list"> <div class="functions-list">
<section class="detail" id="2d_year/2">
<div class="detail-header">
<a href="#2d_year/2" class="detail-link" title="Link to this function">
<i class="ri-link-m" aria-hidden="true"></i>
<span class="sr-only">Link to this function</span>
</a>
<h1 class="signature" translate="no">2d_year(number, language_tag)</h1>
<a href="https://github.com/plausible/analytics/blob/main/lib/plausible/cldr.ex#L1" class="icon-action" rel="help" title="View Source">
<i class="ri-code-s-slash-line" aria-hidden="true"></i>
<span class="sr-only">View Source</span>
</a>
</div>
<section class="docstring">
</section>
</section>
<section class="detail" id="all_rule_sets/0"> <section class="detail" id="all_rule_sets/0">
<div class="detail-header"> <div class="detail-header">
@ -418,6 +403,28 @@ Functions
<section class="docstring"> <section class="docstring">
</section>
</section>
<section class="detail" id="r2d_year/2">
<div class="detail-header">
<a href="#r2d_year/2" class="detail-link" title="Link to this function">
<i class="ri-link-m" aria-hidden="true"></i>
<span class="sr-only">Link to this function</span>
</a>
<h1 class="signature" translate="no">r2d_year(number, language_tag)</h1>
<a href="https://github.com/plausible/analytics/blob/main/lib/plausible/cldr.ex#L1" class="icon-action" rel="help" title="View Source">
<i class="ri-code-s-slash-line" aria-hidden="true"></i>
<span class="sr-only">View Source</span>
</a>
</div>
<section class="docstring">
</section> </section>
</section> </section>
<section class="detail" id="rule_sets/0"> <section class="detail" id="rule_sets/0">

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>
@ -141,7 +141,7 @@ territories.</p>
</div> </div>
<div class="summary-synopsis"><p>See <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.html#available_locale_name?/1"><code class="inline">Cldr.available_locale_name?/1</code></a>.</p></div> <div class="summary-synopsis"><p>See <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.html#available_locale_name?/1"><code class="inline">Cldr.available_locale_name?/1</code></a>.</p></div>
</div> </div>
@ -182,7 +182,7 @@ does not specify one and none can be inferred.</p></div>
</div> </div>
<div class="summary-synopsis"><p>Return the current locale to be used for <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.html"><code class="inline">Cldr</code></a> functions that <div class="summary-synopsis"><p>Return the current locale to be used for <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.html"><code class="inline">Cldr</code></a> functions that
take an optional locale parameter for which a locale is not supplied.</p></div> take an optional locale parameter for which a locale is not supplied.</p></div>
</div> </div>
@ -193,7 +193,7 @@ take an optional locale parameter for which a locale is not supplied.</p></div>
</div> </div>
<div class="summary-synopsis"><p>See <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.html#known_calendars/0"><code class="inline">Cldr.known_calendars/0</code></a>.</p></div> <div class="summary-synopsis"><p>See <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.html#known_calendars/0"><code class="inline">Cldr.known_calendars/0</code></a>.</p></div>
</div> </div>
@ -203,7 +203,7 @@ take an optional locale parameter for which a locale is not supplied.</p></div>
</div> </div>
<div class="summary-synopsis"><p>See <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.html#known_currencies/0"><code class="inline">Cldr.known_currencies/0</code></a>.</p></div> <div class="summary-synopsis"><p>See <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.html#known_currencies/0"><code class="inline">Cldr.known_currencies/0</code></a>.</p></div>
</div> </div>
@ -215,7 +215,7 @@ take an optional locale parameter for which a locale is not supplied.</p></div>
<div class="summary-synopsis"><p>Returns either the Gettext <code class="inline">locale_name</code> in Cldr format or <div class="summary-synopsis"><p>Returns either the Gettext <code class="inline">locale_name</code> in Cldr format or
<code class="inline">false</code> based upon whether the locale name is configured in <code class="inline">false</code> based upon whether the locale name is configured in
<a href="https://hexdocs.pm/gettext/0.19.1/Gettext.html"><code class="inline">Gettext</code></a>.</p></div> <a href="https://hexdocs.pm/gettext/0.22.3/Gettext.html"><code class="inline">Gettext</code></a>.</p></div>
</div> </div>
@ -238,7 +238,7 @@ name is configured and available in Gettext.</p></div>
<div class="summary-synopsis"><p>Returns a list of Gettext locale names but in CLDR format with <div class="summary-synopsis"><p>Returns a list of Gettext locale names but in CLDR format with
underscore replaced by hyphen in order to facilitate comparisons underscore replaced by hyphen in order to facilitate comparisons
with <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.html"><code class="inline">Cldr</code></a> locale names.</p></div> with <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.html"><code class="inline">Cldr</code></a> locale names.</p></div>
</div> </div>
@ -249,7 +249,7 @@ with <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.html"><code class="inline">
</div> </div>
<div class="summary-synopsis"><p>Returns either the <code class="inline">locale_name</code> or <code class="inline">false</code> based upon <div class="summary-synopsis"><p>Returns either the <code class="inline">locale_name</code> or <code class="inline">false</code> based upon
whether the locale name is configured in <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.html"><code class="inline">Cldr</code></a>.</p></div> whether the locale name is configured in <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.html"><code class="inline">Cldr</code></a>.</p></div>
</div> </div>
@ -280,7 +280,7 @@ name is configured and available in Cldr.</p></div>
</div> </div>
<div class="summary-synopsis"><p>Returns a list of atoms representing the number systems types known to <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.html"><code class="inline">Cldr</code></a>.</p></div> <div class="summary-synopsis"><p>Returns a list of atoms representing the number systems types known to <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.html"><code class="inline">Cldr</code></a>.</p></div>
</div> </div>
@ -290,7 +290,7 @@ name is configured and available in Cldr.</p></div>
</div> </div>
<div class="summary-synopsis"><p>See <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.html#known_number_systems/0"><code class="inline">Cldr.known_number_systems/0</code></a>.</p></div> <div class="summary-synopsis"><p>See <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.html#known_number_systems/0"><code class="inline">Cldr.known_number_systems/0</code></a>.</p></div>
</div> </div>
@ -301,7 +301,7 @@ name is configured and available in Cldr.</p></div>
</div> </div>
<div class="summary-synopsis"><p>Returns either the RBNF <code class="inline">locale_name</code> or <code class="inline">false</code> based upon <div class="summary-synopsis"><p>Returns either the RBNF <code class="inline">locale_name</code> or <code class="inline">false</code> based upon
whether the locale name is configured in <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.html"><code class="inline">Cldr</code></a> whether the locale name is configured in <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.html"><code class="inline">Cldr</code></a>
and has RBNF rules defined.</p></div> and has RBNF rules defined.</p></div>
</div> </div>
@ -335,7 +335,7 @@ formats (RBNF).</p></div>
</div> </div>
<div class="summary-synopsis"><p>See <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.html#known_territories/0"><code class="inline">Cldr.known_territories/0</code></a>.</p></div> <div class="summary-synopsis"><p>See <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.html#known_territories/0"><code class="inline">Cldr.known_territories/0</code></a>.</p></div>
</div> </div>
@ -356,7 +356,7 @@ of common symbols in numbers, currencies and dates</p></div>
</div> </div>
<div class="summary-synopsis"><p>Set the current locale to be used for <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.html"><code class="inline">Cldr</code></a> functions that <div class="summary-synopsis"><p>Set the current locale to be used for <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.html"><code class="inline">Cldr</code></a> functions that
take an optional locale parameter for which a locale is not supplied.</p></div> take an optional locale parameter for which a locale is not supplied.</p></div>
</div> </div>
@ -388,7 +388,7 @@ but not known in CLDR.</p></div>
</div> </div>
<div class="summary-synopsis"><p>See <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.html#validate_calendar/1"><code class="inline">Cldr.validate_calendar/1</code></a>.</p></div> <div class="summary-synopsis"><p>See <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.html#validate_calendar/1"><code class="inline">Cldr.validate_calendar/1</code></a>.</p></div>
</div> </div>
@ -398,7 +398,7 @@ but not known in CLDR.</p></div>
</div> </div>
<div class="summary-synopsis"><p>See <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.html#validate_currency/1"><code class="inline">Cldr.validate_currency/1</code></a>.</p></div> <div class="summary-synopsis"><p>See <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.html#validate_currency/1"><code class="inline">Cldr.validate_currency/1</code></a>.</p></div>
</div> </div>
@ -418,7 +418,7 @@ but not known in CLDR.</p></div>
</div> </div>
<div class="summary-synopsis"><p>See <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.html#validate_number_system/1"><code class="inline">Cldr.validate_number_system/1</code></a>.</p></div> <div class="summary-synopsis"><p>See <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.html#validate_number_system/1"><code class="inline">Cldr.validate_number_system/1</code></a>.</p></div>
</div> </div>
@ -438,7 +438,7 @@ but not known in CLDR.</p></div>
</div> </div>
<div class="summary-synopsis"><p>See <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.html#validate_territory/1"><code class="inline">Cldr.validate_territory/1</code></a>.</p></div> <div class="summary-synopsis"><p>See <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.html#validate_territory/1"><code class="inline">Cldr.validate_territory/1</code></a>.</p></div>
</div> </div>
@ -486,7 +486,7 @@ Functions
<section class="docstring"> <section class="docstring">
<p>See <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.html#available_locale_name?/1"><code class="inline">Cldr.available_locale_name?/1</code></a>.</p> <p>See <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.html#available_locale_name?/1"><code class="inline">Cldr.available_locale_name?/1</code></a>.</p>
</section> </section>
</section> </section>
<section class="detail" id="default_locale/0"> <section class="detail" id="default_locale/0">
@ -510,7 +510,7 @@ Functions
<div class="specs"> <div class="specs">
<pre translate="no"><span class="attribute">@spec</span> default_locale() :: <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.LanguageTag.html#t:t/0">Cldr.LanguageTag.t</a>() | <a href="https://hexdocs.pm/elixir/typespecs.html#built-in-types">no_return</a>()</pre> <pre translate="no"><span class="attribute">@spec</span> default_locale() :: <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.LanguageTag.html#t:t/0">Cldr.LanguageTag.t</a>() | <a href="https://hexdocs.pm/elixir/typespecs.html#built-in-types">no_return</a>()</pre>
</div> </div>
@ -520,24 +520,24 @@ Functions
</a> </a>
Example Example
</h2> </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="9754617476-1">(</span><span class="p" data-group-id="9754617476-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_locale</span><span class="p" data-group-id="3850363258-1">(</span><span class="p" data-group-id="3850363258-1">)</span><span class="w">
</span><span class="p" data-group-id="9754617476-2">%</span><span class="nc" data-group-id="9754617476-2">Cldr.LanguageTag</span><span class="p" data-group-id="9754617476-2">{</span><span class="w"> </span><span class="p" data-group-id="3850363258-2">%</span><span class="nc" data-group-id="3850363258-2">Cldr.LanguageTag</span><span class="p" data-group-id="3850363258-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">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">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">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="9754617476-3">[</span><span class="p" data-group-id="9754617476-3">]</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="3850363258-3">[</span><span class="p" data-group-id="3850363258-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="9754617476-4">%{</span><span class="p" data-group-id="9754617476-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="3850363258-4">%{</span><span class="p" data-group-id="3850363258-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">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">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="9754617476-5">%{</span><span class="p" data-group-id="9754617476-5">}</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="3850363258-5">%{</span><span class="p" data-group-id="3850363258-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="9754617476-6">[</span><span class="p" data-group-id="9754617476-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="3850363258-6">[</span><span class="p" data-group-id="3850363258-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">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">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">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">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="9754617476-7">%{</span><span class="p" data-group-id="9754617476-7">}</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="3850363258-7">%{</span><span class="p" data-group-id="3850363258-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="9754617476-8">[</span><span class="p" data-group-id="9754617476-8">]</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="3850363258-8">[</span><span class="p" data-group-id="3850363258-8">]</span><span class="w">
</span><span class="p" data-group-id="9754617476-2">}</span></code></pre> </span><span class="p" data-group-id="3850363258-2">}</span></code></pre>
</section> </section>
</section> </section>
<section class="detail" id="default_territory/0"> <section class="detail" id="default_territory/0">
@ -561,7 +561,7 @@ Functions
<div class="specs"> <div class="specs">
<pre translate="no"><span class="attribute">@spec</span> default_territory() :: <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.Locale.html#t:territory_code/0">Cldr.Locale.territory_code</a>()</pre> <pre translate="no"><span class="attribute">@spec</span> default_territory() :: <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.Locale.html#t:territory_code/0">Cldr.Locale.territory_code</a>()</pre>
</div> </div>
@ -572,7 +572,7 @@ does not specify one and none can be inferred.</p><h2 id="default_territory/0-ex
</a> </a>
Example Example
</h2> </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="9642039199-1">(</span><span class="p" data-group-id="9642039199-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="6167560651-1">(</span><span class="p" data-group-id="6167560651-1">)</span><span class="w">
</span><span class="ss">:&quot;001&quot;</span></code></pre> </span><span class="ss">:&quot;001&quot;</span></code></pre>
</section> </section>
</section> </section>
@ -611,8 +611,8 @@ does not specify one and none can be inferred.</p><h2 id="default_territory/0-ex
</h2> </h2>
<ul><li><p><code class="inline">string</code> is any <code class="inline">String.t</code> or a 2-element list <ul><li><p><code class="inline">string</code> is any <code class="inline">String.t</code> or a 2-element list
of <code class="inline">String.t</code> between which the ellipsis is inserted.</p></li><li><p><code class="inline">backend</code> is any module that includes <code class="inline">use Cldr</code> and therefore of <code class="inline">String.t</code> between which the ellipsis is inserted.</p></li><li><p><code class="inline">backend</code> is any module that includes <code class="inline">use Cldr</code> and therefore
is a <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.html"><code class="inline">Cldr</code></a> backend module. The default is <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.html#default_backend!/0"><code class="inline">Cldr.default_backend!/0</code></a>. is a <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.html"><code class="inline">Cldr</code></a> backend module. The default is <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.html#default_backend!/0"><code class="inline">Cldr.default_backend!/0</code></a>.
Note that <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.html#default_backend!/0"><code class="inline">Cldr.default_backend!/0</code></a> will raise an exception if Note that <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.html#default_backend!/0"><code class="inline">Cldr.default_backend!/0</code></a> will raise an exception if
no <code class="inline">:default_backend</code> is configured under the <code class="inline">:ex_cldr</code> key in no <code class="inline">:default_backend</code> is configured under the <code class="inline">:ex_cldr</code> key in
<code class="inline">config.exs</code>.</p></li><li><p><code class="inline">options</code> is a keyword list of options</p></li></ul><h2 id="ellipsis/2-options" class="section-heading"> <code class="inline">config.exs</code>.</p></li><li><p><code class="inline">options</code> is a keyword list of options</p></li></ul><h2 id="ellipsis/2-options" class="section-heading">
<a href="#ellipsis/2-options" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i> <a href="#ellipsis/2-options" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
@ -620,8 +620,8 @@ no <code class="inline">:default_backend</code> is configured under the <code cl
</a> </a>
Options Options
</h2> </h2>
<ul><li><p><code class="inline">:locale</code> is any valid locale name returned by <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.html#known_locale_names/1"><code class="inline">Cldr.known_locale_names/1</code></a>. <ul><li><p><code class="inline">:locale</code> is any valid locale name returned by <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.html#known_locale_names/1"><code class="inline">Cldr.known_locale_names/1</code></a>.
The default is <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.html#get_locale/0"><code class="inline">Cldr.get_locale/0</code></a>.</p></li><li><p><code class="inline">:location</code> determines where to place the ellipsis. The options are The default is <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.html#get_locale/0"><code class="inline">Cldr.get_locale/0</code></a>.</p></li><li><p><code class="inline">:location</code> determines where to place the ellipsis. The options are
<code class="inline">:after</code> (the default for a single string argument), <code class="inline">:between</code> <code class="inline">:after</code> (the default for a single string argument), <code class="inline">:between</code>
(the default and only valid location for an argument that is a list (the default and only valid location for an argument that is a list
of two strings) and <code class="inline">:before</code>.</p></li><li><p><code class="inline">:format</code> formats based upon whether the ellipsis of two strings) and <code class="inline">:before</code>.</p></li><li><p><code class="inline">:format</code> formats based upon whether the ellipsis
@ -635,13 +635,13 @@ is inserted between words or sentences. The valid options are
<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="w"> </span><span class="s">&quot;And furthermore&quot;</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="w"> </span><span class="s">&quot;And furthermore&quot;</span><span class="w">
</span><span class="s">&quot;And furthermore…&quot;</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="w"> </span><span class="p" data-group-id="4021685000-1">[</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="4021685000-1">]</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="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="w"> </span><span class="p" data-group-id="3169984552-1">[</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="3169984552-1">]</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="w">
</span><span class="s">&quot;And furthermore…there is much to be done&quot;</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="w"> </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="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="w"> </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="w">
</span><span class="s">&quot;And furthermore …&quot;</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="w"> </span><span class="p" data-group-id="4021685000-2">[</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="4021685000-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="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="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="w"> </span><span class="p" data-group-id="3169984552-2">[</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="3169984552-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="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="w">
</span><span class="s">&quot;And furthermore … there is much to be done&quot;</span></code></pre> </span><span class="s">&quot;And furthermore … there is much to be done&quot;</span></code></pre>
</section> </section>
</section> </section>
@ -666,34 +666,34 @@ is inserted between words or sentences. The valid options are
<div class="specs"> <div class="specs">
<pre translate="no"><span class="attribute">@spec</span> get_locale() :: <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.LanguageTag.html#t:t/0">Cldr.LanguageTag.t</a>()</pre> <pre translate="no"><span class="attribute">@spec</span> get_locale() :: <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.LanguageTag.html#t:t/0">Cldr.LanguageTag.t</a>()</pre>
</div> </div>
<p>Return the current locale to be used for <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.html"><code class="inline">Cldr</code></a> functions that <p>Return the current locale to be used for <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.html"><code class="inline">Cldr</code></a> functions that
take an optional locale parameter for which a locale is not supplied.</p><h2 id="get_locale/0-example" class="section-heading"> take an optional locale parameter for which a locale is not supplied.</p><h2 id="get_locale/0-example" class="section-heading">
<a href="#get_locale/0-example" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i> <a href="#get_locale/0-example" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
<p class="sr-only">example</p> <p class="sr-only">example</p>
</a> </a>
Example Example
</h2> </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="6438427351-1">(</span><span class="s">&quot;pl&quot;</span><span class="p" data-group-id="6438427351-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">put_locale</span><span class="p" data-group-id="6917654488-1">(</span><span class="s">&quot;pl&quot;</span><span class="p" data-group-id="6917654488-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="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="w">
</span><span class="p" data-group-id="6438427351-2">%</span><span class="nc" data-group-id="6438427351-2">Cldr.LanguageTag</span><span class="p" data-group-id="6438427351-2">{</span><span class="w"> </span><span class="p" data-group-id="6917654488-2">%</span><span class="nc" data-group-id="6917654488-2">Cldr.LanguageTag</span><span class="p" data-group-id="6917654488-2">{</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">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">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">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="6438427351-3">%{</span><span class="p" data-group-id="6438427351-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="6917654488-3">%{</span><span class="p" data-group-id="6917654488-3">}</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">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="6438427351-4">%{</span><span class="p" data-group-id="6438427351-4">}</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="6917654488-4">%{</span><span class="p" data-group-id="6917654488-4">}</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="6438427351-5">[</span><span class="p" data-group-id="6438427351-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="6917654488-5">[</span><span class="p" data-group-id="6917654488-5">]</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">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">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">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">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="6438427351-6">%{</span><span class="p" data-group-id="6438427351-6">}</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="6917654488-6">%{</span><span class="p" data-group-id="6917654488-6">}</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="6438427351-7">[</span><span class="p" data-group-id="6438427351-7">]</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="6917654488-7">[</span><span class="p" data-group-id="6917654488-7">]</span><span class="w">
</span><span class="p" data-group-id="6438427351-2">}</span></code></pre> </span><span class="p" data-group-id="6917654488-2">}</span></code></pre>
</section> </section>
</section> </section>
<section class="detail" id="known_calendars/0"> <section class="detail" id="known_calendars/0">
@ -715,7 +715,7 @@ take an optional locale parameter for which a locale is not supplied.</p><h2 id=
<section class="docstring"> <section class="docstring">
<p>See <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.html#known_calendars/0"><code class="inline">Cldr.known_calendars/0</code></a>.</p> <p>See <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.html#known_calendars/0"><code class="inline">Cldr.known_calendars/0</code></a>.</p>
</section> </section>
</section> </section>
<section class="detail" id="known_currencies/0"> <section class="detail" id="known_currencies/0">
@ -737,7 +737,7 @@ take an optional locale parameter for which a locale is not supplied.</p><h2 id=
<section class="docstring"> <section class="docstring">
<p>See <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.html#known_currencies/0"><code class="inline">Cldr.known_currencies/0</code></a>.</p> <p>See <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.html#known_currencies/0"><code class="inline">Cldr.known_currencies/0</code></a>.</p>
</section> </section>
</section> </section>
<section class="detail" id="known_gettext_locale_name/1"> <section class="detail" id="known_gettext_locale_name/1">
@ -767,7 +767,7 @@ take an optional locale parameter for which a locale is not supplied.</p><h2 id=
<p>Returns either the Gettext <code class="inline">locale_name</code> in Cldr format or <p>Returns either the Gettext <code class="inline">locale_name</code> in Cldr format or
<code class="inline">false</code> based upon whether the locale name is configured in <code class="inline">false</code> based upon whether the locale name is configured in
<a href="https://hexdocs.pm/gettext/0.19.1/Gettext.html"><code class="inline">Gettext</code></a>.</p><h2 id="known_gettext_locale_name/1-arguments" class="section-heading"> <a href="https://hexdocs.pm/gettext/0.22.3/Gettext.html"><code class="inline">Gettext</code></a>.</p><h2 id="known_gettext_locale_name/1-arguments" class="section-heading">
<a href="#known_gettext_locale_name/1-arguments" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i> <a href="#known_gettext_locale_name/1-arguments" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
<p class="sr-only">arguments</p> <p class="sr-only">arguments</p>
</a> </a>
@ -826,10 +826,10 @@ name is configured and available in Gettext.</p><h2 id="known_gettext_locale_nam
</a> </a>
Examples Examples
</h2> </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="6966520797-1">(</span><span class="s">&quot;en&quot;</span><span class="p" data-group-id="6966520797-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="0141417880-1">(</span><span class="s">&quot;en&quot;</span><span class="p" data-group-id="0141417880-1">)</span><span class="w">
</span><span class="no">true</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="6966520797-2">(</span><span class="s">&quot;!!&quot;</span><span class="p" data-group-id="6966520797-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="0141417880-2">(</span><span class="s">&quot;!!&quot;</span><span class="p" data-group-id="0141417880-2">)</span><span class="w">
</span><span class="no">false</span></code></pre> </span><span class="no">false</span></code></pre>
</section> </section>
</section> </section>
@ -860,7 +860,7 @@ name is configured and available in Gettext.</p><h2 id="known_gettext_locale_nam
<p>Returns a list of Gettext locale names but in CLDR format with <p>Returns a list of Gettext locale names but in CLDR format with
underscore replaced by hyphen in order to facilitate comparisons underscore replaced by hyphen in order to facilitate comparisons
with <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.html"><code class="inline">Cldr</code></a> locale names.</p> with <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.html"><code class="inline">Cldr</code></a> locale names.</p>
</section> </section>
</section> </section>
<section class="detail" id="known_locale_name/1"> <section class="detail" id="known_locale_name/1">
@ -884,12 +884,12 @@ with <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.html"><code class="inline">
<div class="specs"> <div class="specs">
<pre translate="no"><span class="attribute">@spec</span> known_locale_name(<a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.Locale.html#t:locale_name/0">Cldr.Locale.locale_name</a>()) :: <a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>() | false</pre> <pre translate="no"><span class="attribute">@spec</span> known_locale_name(<a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.Locale.html#t:locale_name/0">Cldr.Locale.locale_name</a>()) :: <a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>() | false</pre>
</div> </div>
<p>Returns either the <code class="inline">locale_name</code> or <code class="inline">false</code> based upon <p>Returns either the <code class="inline">locale_name</code> or <code class="inline">false</code> based upon
whether the locale name is configured in <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.html"><code class="inline">Cldr</code></a>.</p><p>This is helpful when building a list of <code class="inline">or</code> expressions whether the locale name is configured in <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.html"><code class="inline">Cldr</code></a>.</p><p>This is helpful when building a list of <code class="inline">or</code> expressions
to return the first known locale name from a list.</p><h2 id="known_locale_name/1-arguments" class="section-heading"> to return the first known locale name from a list.</p><h2 id="known_locale_name/1-arguments" class="section-heading">
<a href="#known_locale_name/1-arguments" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i> <a href="#known_locale_name/1-arguments" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
<p class="sr-only">arguments</p> <p class="sr-only">arguments</p>
@ -931,7 +931,7 @@ to return the first known locale name from a list.</p><h2 id="known_locale_name/
<div class="specs"> <div class="specs">
<pre translate="no"><span class="attribute">@spec</span> known_locale_name?(<a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.Locale.html#t:locale_name/0">Cldr.Locale.locale_name</a>()) :: <a href="https://hexdocs.pm/elixir/typespecs.html#built-in-types">boolean</a>()</pre> <pre translate="no"><span class="attribute">@spec</span> known_locale_name?(<a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.Locale.html#t:locale_name/0">Cldr.Locale.locale_name</a>()) :: <a href="https://hexdocs.pm/elixir/typespecs.html#built-in-types">boolean</a>()</pre>
</div> </div>
@ -948,10 +948,10 @@ name is configured and available in Cldr.</p><h2 id="known_locale_name?/1-argume
</a> </a>
Examples Examples
</h2> </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="6607709760-1">(</span><span class="ss">:en</span><span class="p" data-group-id="6607709760-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="1129385390-1">(</span><span class="ss">:en</span><span class="p" data-group-id="1129385390-1">)</span><span class="w">
</span><span class="no">true</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="6607709760-2">(</span><span class="ss">:&quot;!!&quot;</span><span class="p" data-group-id="6607709760-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="1129385390-2">(</span><span class="ss">:&quot;!!&quot;</span><span class="p" data-group-id="1129385390-2">)</span><span class="w">
</span><span class="no">false</span></code></pre> </span><span class="no">false</span></code></pre>
</section> </section>
</section> </section>
@ -977,7 +977,7 @@ name is configured and available in Cldr.</p><h2 id="known_locale_name?/1-argume
<p>Returns a list of the known locale names.</p><p>Known locales are those locales which <p>Returns a list of the known locale names.</p><p>Known locales are those locales which
are the subset of all CLDR locales that are the subset of all CLDR locales that
have been configured for use either have been configured for use either
in this module or in <a href="https://hexdocs.pm/gettext/0.19.1/Gettext.html"><code class="inline">Gettext</code></a>.</p> in this module or in <a href="https://hexdocs.pm/gettext/0.22.3/Gettext.html"><code class="inline">Gettext</code></a>.</p>
</section> </section>
</section> </section>
<section class="detail" id="known_number_system_types/0"> <section class="detail" id="known_number_system_types/0">
@ -999,14 +999,14 @@ in this module or in <a href="https://hexdocs.pm/gettext/0.19.1/Gettext.html"><c
<section class="docstring"> <section class="docstring">
<p>Returns a list of atoms representing the number systems types known to <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.html"><code class="inline">Cldr</code></a>.</p><h2 id="known_number_system_types/0-example" class="section-heading"> <p>Returns a list of atoms representing the number systems types known to <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.html"><code class="inline">Cldr</code></a>.</p><h2 id="known_number_system_types/0-example" class="section-heading">
<a href="#known_number_system_types/0-example" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i> <a href="#known_number_system_types/0-example" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
<p class="sr-only">example</p> <p class="sr-only">example</p>
</a> </a>
Example Example
</h2> </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="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_number_system_types</span><span class="w">
</span><span class="p" data-group-id="0056728819-1">[</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="0056728819-1">]</span></code></pre> </span><span class="p" data-group-id="5449795610-1">[</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="5449795610-1">]</span></code></pre>
</section> </section>
</section> </section>
<section class="detail" id="known_number_systems/0"> <section class="detail" id="known_number_systems/0">
@ -1028,7 +1028,7 @@ in this module or in <a href="https://hexdocs.pm/gettext/0.19.1/Gettext.html"><c
<section class="docstring"> <section class="docstring">
<p>See <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.html#known_number_systems/0"><code class="inline">Cldr.known_number_systems/0</code></a>.</p> <p>See <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.html#known_number_systems/0"><code class="inline">Cldr.known_number_systems/0</code></a>.</p>
</section> </section>
</section> </section>
<section class="detail" id="known_rbnf_locale_name/1"> <section class="detail" id="known_rbnf_locale_name/1">
@ -1052,12 +1052,12 @@ in this module or in <a href="https://hexdocs.pm/gettext/0.19.1/Gettext.html"><c
<div class="specs"> <div class="specs">
<pre translate="no"><span class="attribute">@spec</span> known_rbnf_locale_name(<a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.Locale.html#t:locale_name/0">Cldr.Locale.locale_name</a>()) :: <a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>() | false</pre> <pre translate="no"><span class="attribute">@spec</span> known_rbnf_locale_name(<a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.Locale.html#t:locale_name/0">Cldr.Locale.locale_name</a>()) :: <a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>() | false</pre>
</div> </div>
<p>Returns either the RBNF <code class="inline">locale_name</code> or <code class="inline">false</code> based upon <p>Returns either the RBNF <code class="inline">locale_name</code> or <code class="inline">false</code> based upon
whether the locale name is configured in <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.html"><code class="inline">Cldr</code></a> whether the locale name is configured in <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.html"><code class="inline">Cldr</code></a>
and has RBNF rules defined.</p><h2 id="known_rbnf_locale_name/1-arguments" class="section-heading"> and has RBNF rules defined.</p><h2 id="known_rbnf_locale_name/1-arguments" class="section-heading">
<a href="#known_rbnf_locale_name/1-arguments" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i> <a href="#known_rbnf_locale_name/1-arguments" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
<p class="sr-only">arguments</p> <p class="sr-only">arguments</p>
@ -1099,7 +1099,7 @@ and has RBNF rules defined.</p><h2 id="known_rbnf_locale_name/1-arguments" class
<div class="specs"> <div class="specs">
<pre translate="no"><span class="attribute">@spec</span> known_rbnf_locale_name?(<a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.Locale.html#t:locale_name/0">Cldr.Locale.locale_name</a>()) :: <a href="https://hexdocs.pm/elixir/typespecs.html#built-in-types">boolean</a>()</pre> <pre translate="no"><span class="attribute">@spec</span> known_rbnf_locale_name?(<a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.Locale.html#t:locale_name/0">Cldr.Locale.locale_name</a>()) :: <a href="https://hexdocs.pm/elixir/typespecs.html#built-in-types">boolean</a>()</pre>
</div> </div>
@ -1117,10 +1117,10 @@ rules based number formats (RBNF).</p><h2 id="known_rbnf_locale_name?/1-argument
</a> </a>
Examples Examples
</h2> </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="8977782926-1">(</span><span class="ss">:en</span><span class="p" data-group-id="8977782926-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="0503488066-1">(</span><span class="ss">:en</span><span class="p" data-group-id="0503488066-1">)</span><span class="w">
</span><span class="no">true</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="8977782926-2">(</span><span class="ss">:&quot;!!&quot;</span><span class="p" data-group-id="8977782926-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="0503488066-2">(</span><span class="ss">:&quot;!!&quot;</span><span class="p" data-group-id="0503488066-2">)</span><span class="w">
</span><span class="no">false</span></code></pre> </span><span class="no">false</span></code></pre>
</section> </section>
</section> </section>
@ -1145,7 +1145,7 @@ rules based number formats (RBNF).</p><h2 id="known_rbnf_locale_name?/1-argument
<div class="specs"> <div class="specs">
<pre translate="no"><span class="attribute">@spec</span> known_rbnf_locale_names() :: [<a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.Locale.html#t:locale_name/0">Cldr.Locale.locale_name</a>()]</pre> <pre translate="no"><span class="attribute">@spec</span> known_rbnf_locale_names() :: [<a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.Locale.html#t:locale_name/0">Cldr.Locale.locale_name</a>()]</pre>
</div> </div>
@ -1172,7 +1172,7 @@ formats (RBNF).</p>
<section class="docstring"> <section class="docstring">
<p>See <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.html#known_territories/0"><code class="inline">Cldr.known_territories/0</code></a>.</p> <p>See <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.html#known_territories/0"><code class="inline">Cldr.known_territories/0</code></a>.</p>
</section> </section>
</section> </section>
<section class="detail" id="normalize_lenient_parse/3"> <section class="detail" id="normalize_lenient_parse/3">
@ -1221,12 +1221,12 @@ of common symbols in numbers, currencies and dates</p>
<div class="specs"> <div class="specs">
<pre translate="no"><span class="attribute">@spec</span> put_locale(<a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.Locale.html#t:locale_reference/0">Cldr.Locale.locale_reference</a>()) :: <pre translate="no"><span class="attribute">@spec</span> put_locale(<a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.Locale.html#t:locale_reference/0">Cldr.Locale.locale_reference</a>()) ::
{:ok, <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.LanguageTag.html#t:t/0">Cldr.LanguageTag.t</a>()} | {:error, {<a href="https://hexdocs.pm/elixir/typespecs.html#built-in-types">module</a>(), <a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>()}}</pre> {:ok, <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.LanguageTag.html#t:t/0">Cldr.LanguageTag.t</a>()} | {:error, {<a href="https://hexdocs.pm/elixir/typespecs.html#built-in-types">module</a>(), <a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>()}}</pre>
</div> </div>
<p>Set the current locale to be used for <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.html"><code class="inline">Cldr</code></a> functions that <p>Set the current locale to be used for <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.html"><code class="inline">Cldr</code></a> functions that
take an optional locale parameter for which a locale is not supplied.</p><h2 id="put_locale/1-arguments" class="section-heading"> take an optional locale parameter for which a locale is not supplied.</p><h2 id="put_locale/1-arguments" class="section-heading">
<a href="#put_locale/1-arguments" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i> <a href="#put_locale/1-arguments" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
<p class="sr-only">arguments</p> <p class="sr-only">arguments</p>
@ -1241,29 +1241,29 @@ of a language tag.</p><h2 id="put_locale/1-examples" class="section-heading">
</a> </a>
Examples Examples
</h2> </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="6057154255-1">(</span><span class="s">&quot;en&quot;</span><span class="p" data-group-id="6057154255-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">put_locale</span><span class="p" data-group-id="1473274861-1">(</span><span class="s">&quot;en&quot;</span><span class="p" data-group-id="1473274861-1">)</span><span class="w">
</span><span class="p" data-group-id="6057154255-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1473274861-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="6057154255-3">%</span><span class="nc" data-group-id="6057154255-3">Cldr.LanguageTag</span><span class="p" data-group-id="6057154255-3">{</span><span class="w"> </span><span class="p" data-group-id="1473274861-3">%</span><span class="nc" data-group-id="1473274861-3">Cldr.LanguageTag</span><span class="p" data-group-id="1473274861-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">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">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">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="6057154255-4">[</span><span class="p" data-group-id="6057154255-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="1473274861-4">[</span><span class="p" data-group-id="1473274861-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="6057154255-5">%{</span><span class="p" data-group-id="6057154255-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="1473274861-5">%{</span><span class="p" data-group-id="1473274861-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">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">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="6057154255-6">%{</span><span class="p" data-group-id="6057154255-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="1473274861-6">%{</span><span class="p" data-group-id="1473274861-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="6057154255-7">[</span><span class="p" data-group-id="6057154255-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="1473274861-7">[</span><span class="p" data-group-id="1473274861-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">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">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">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">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="6057154255-8">%{</span><span class="p" data-group-id="6057154255-8">}</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="1473274861-8">%{</span><span class="p" data-group-id="1473274861-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="6057154255-9">[</span><span class="p" data-group-id="6057154255-9">]</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="1473274861-9">[</span><span class="p" data-group-id="1473274861-9">]</span><span class="w">
</span><span class="p" data-group-id="6057154255-3">}</span><span class="p" data-group-id="6057154255-2">}</span><span class="w"> </span><span class="p" data-group-id="1473274861-3">}</span><span class="p" data-group-id="1473274861-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="6057154255-10">(</span><span class="s">&quot;invalid-locale!&quot;</span><span class="p" data-group-id="6057154255-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">put_locale</span><span class="p" data-group-id="1473274861-10">(</span><span class="s">&quot;invalid-locale!&quot;</span><span class="p" data-group-id="1473274861-10">)</span><span class="w">
</span><span class="p" data-group-id="6057154255-11">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="6057154255-12">{</span><span class="nc">Cldr.LanguageTag.ParseError</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1473274861-11">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1473274861-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="6057154255-12">}</span><span class="p" data-group-id="6057154255-11">}</span></code></pre> </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="1473274861-12">}</span><span class="p" data-group-id="1473274861-11">}</span></code></pre>
</section> </section>
</section> </section>
<section class="detail" id="quote/2"> <section class="detail" id="quote/2">
@ -1305,8 +1305,8 @@ of a language tag.</p><h2 id="put_locale/1-examples" class="section-heading">
</a> </a>
Options Options
</h2> </h2>
<ul><li><code class="inline">locale</code> is any valid locale name returned by <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.html#known_locale_names/1"><code class="inline">Cldr.known_locale_names/1</code></a>. <ul><li><code class="inline">locale</code> is any valid locale name returned by <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.html#known_locale_names/1"><code class="inline">Cldr.known_locale_names/1</code></a>.
The default is <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.html#get_locale/0"><code class="inline">Cldr.get_locale/0</code></a></li></ul><h2 id="quote/2-examples" class="section-heading"> The default is <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.html#get_locale/0"><code class="inline">Cldr.get_locale/0</code></a></li></ul><h2 id="quote/2-examples" class="section-heading">
<a href="#quote/2-examples" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i> <a href="#quote/2-examples" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
<p class="sr-only">examples</p> <p class="sr-only">examples</p>
</a> </a>
@ -1340,7 +1340,7 @@ The default is <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.html#get_locale/0
<div class="specs"> <div class="specs">
<pre translate="no"><span class="attribute">@spec</span> unknown_locale_names() :: [<a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.Locale.html#t:locale_name/0">Cldr.Locale.locale_name</a>()]</pre> <pre translate="no"><span class="attribute">@spec</span> unknown_locale_names() :: [<a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.Locale.html#t:locale_name/0">Cldr.Locale.locale_name</a>()]</pre>
</div> </div>
@ -1369,7 +1369,7 @@ return an empty list.</p>
<section class="docstring"> <section class="docstring">
<p>See <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.html#validate_calendar/1"><code class="inline">Cldr.validate_calendar/1</code></a>.</p> <p>See <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.html#validate_calendar/1"><code class="inline">Cldr.validate_calendar/1</code></a>.</p>
</section> </section>
</section> </section>
<section class="detail" id="validate_currency/1"> <section class="detail" id="validate_currency/1">
@ -1391,7 +1391,7 @@ return an empty list.</p>
<section class="docstring"> <section class="docstring">
<p>See <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.html#validate_currency/1"><code class="inline">Cldr.validate_currency/1</code></a>.</p> <p>See <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.html#validate_currency/1"><code class="inline">Cldr.validate_currency/1</code></a>.</p>
</section> </section>
</section> </section>
<section class="detail" id="validate_locale/1"> <section class="detail" id="validate_locale/1">
@ -1415,8 +1415,8 @@ return an empty list.</p>
<div class="specs"> <div class="specs">
<pre translate="no"><span class="attribute">@spec</span> validate_locale(<a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.Locale.html#t:locale_name/0">Cldr.Locale.locale_name</a>() | <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.LanguageTag.html#t:t/0">Cldr.LanguageTag.t</a>() | <a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>()) :: <pre translate="no"><span class="attribute">@spec</span> validate_locale(<a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.Locale.html#t:locale_name/0">Cldr.Locale.locale_name</a>() | <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.LanguageTag.html#t:t/0">Cldr.LanguageTag.t</a>() | <a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>()) ::
{:ok, <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.LanguageTag.html#t:t/0">Cldr.LanguageTag.t</a>()} | {:error, {<a href="https://hexdocs.pm/elixir/typespecs.html#built-in-types">module</a>(), <a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>()}}</pre> {:ok, <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.LanguageTag.html#t:t/0">Cldr.LanguageTag.t</a>()} | {:error, {<a href="https://hexdocs.pm/elixir/typespecs.html#built-in-types">module</a>(), <a href="https://hexdocs.pm/elixir/String.html#t:t/0">String.t</a>()}}</pre>
</div> </div>
@ -1427,7 +1427,7 @@ return an empty list.</p>
Arguments Arguments
</h2> </h2>
<ul><li><code class="inline">locale</code> is any valid locale name returned by <a href="#known_locale_names/0"><code class="inline">Plausible.Cldr.known_locale_names/0</code></a> <ul><li><code class="inline">locale</code> is any valid locale name returned by <a href="#known_locale_names/0"><code class="inline">Plausible.Cldr.known_locale_names/0</code></a>
or a <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.LanguageTag.html"><code class="inline">Cldr.LanguageTag</code></a> struct returned by <a href="Plausible.Cldr.Locale.html#new!/1"><code class="inline">Plausible.Cldr.Locale.new!/1</code></a></li></ul><h2 id="validate_locale/1-returns" class="section-heading"> or a <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.LanguageTag.html"><code class="inline">Cldr.LanguageTag</code></a> struct returned by <a href="Plausible.Cldr.Locale.html#new!/1"><code class="inline">Plausible.Cldr.Locale.new!/1</code></a></li></ul><h2 id="validate_locale/1-returns" class="section-heading">
<a href="#validate_locale/1-returns" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i> <a href="#validate_locale/1-returns" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
<p class="sr-only">returns</p> <p class="sr-only">returns</p>
</a> </a>
@ -1446,47 +1446,47 @@ of a language tag.</p><h2 id="validate_locale/1-examples" class="section-heading
</a> </a>
Examples Examples
</h2> </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="8632856101-1">(</span><span class="ss">:en</span><span class="p" data-group-id="8632856101-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">validate_locale</span><span class="p" data-group-id="2958785294-1">(</span><span class="ss">:en</span><span class="p" data-group-id="2958785294-1">)</span><span class="w">
</span><span class="p" data-group-id="8632856101-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="2958785294-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="8632856101-3">%</span><span class="nc" data-group-id="8632856101-3">Cldr.LanguageTag</span><span class="p" data-group-id="8632856101-3">{</span><span class="w"> </span><span class="p" data-group-id="2958785294-3">%</span><span class="nc" data-group-id="2958785294-3">Cldr.LanguageTag</span><span class="p" data-group-id="2958785294-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">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">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">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="8632856101-4">%{</span><span class="p" data-group-id="8632856101-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="2958785294-4">%{</span><span class="p" data-group-id="2958785294-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">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">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="8632856101-5">%{</span><span class="p" data-group-id="8632856101-5">}</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="2958785294-5">%{</span><span class="p" data-group-id="2958785294-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="8632856101-6">[</span><span class="p" data-group-id="8632856101-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="2958785294-6">[</span><span class="p" data-group-id="2958785294-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">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">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">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">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="8632856101-7">%{</span><span class="p" data-group-id="8632856101-7">}</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="2958785294-7">%{</span><span class="p" data-group-id="2958785294-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="8632856101-8">[</span><span class="p" data-group-id="8632856101-8">]</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="2958785294-8">[</span><span class="p" data-group-id="2958785294-8">]</span><span class="w">
</span><span class="p" data-group-id="8632856101-3">}</span><span class="p" data-group-id="8632856101-2">}</span><span class="w"> </span><span class="p" data-group-id="2958785294-3">}</span><span class="p" data-group-id="2958785294-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="8632856101-9">(</span><span class="p" data-group-id="8632856101-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_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="2958785294-9">(</span><span class="p" data-group-id="2958785294-9">)</span><span class="w">
</span><span class="p" data-group-id="8632856101-10">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="2958785294-10">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="8632856101-11">%</span><span class="nc" data-group-id="8632856101-11">Cldr.LanguageTag</span><span class="p" data-group-id="8632856101-11">{</span><span class="w"> </span><span class="p" data-group-id="2958785294-11">%</span><span class="nc" data-group-id="2958785294-11">Cldr.LanguageTag</span><span class="p" data-group-id="2958785294-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">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">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">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="8632856101-12">%{</span><span class="p" data-group-id="8632856101-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="2958785294-12">%{</span><span class="p" data-group-id="2958785294-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">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">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="8632856101-13">%{</span><span class="p" data-group-id="8632856101-13">}</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="2958785294-13">%{</span><span class="p" data-group-id="2958785294-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="8632856101-14">[</span><span class="p" data-group-id="8632856101-14">]</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="2958785294-14">[</span><span class="p" data-group-id="2958785294-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">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">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">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">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="8632856101-15">%{</span><span class="p" data-group-id="8632856101-15">}</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="2958785294-15">%{</span><span class="p" data-group-id="2958785294-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="8632856101-16">[</span><span class="p" data-group-id="8632856101-16">]</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="2958785294-16">[</span><span class="p" data-group-id="2958785294-16">]</span><span class="w">
</span><span class="p" data-group-id="8632856101-11">}</span><span class="p" data-group-id="8632856101-10">}</span><span class="w"> </span><span class="p" data-group-id="2958785294-11">}</span><span class="p" data-group-id="2958785294-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="8632856101-17">(</span><span class="s">&quot;zzz&quot;</span><span class="p" data-group-id="8632856101-17">)</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="2958785294-17">(</span><span class="s">&quot;zzz&quot;</span><span class="p" data-group-id="2958785294-17">)</span><span class="w">
</span><span class="p" data-group-id="8632856101-18">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="8632856101-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="8632856101-19">}</span><span class="p" data-group-id="8632856101-18">}</span></code></pre> </span><span class="p" data-group-id="2958785294-18">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="2958785294-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="2958785294-19">}</span><span class="p" data-group-id="2958785294-18">}</span></code></pre>
</section> </section>
</section> </section>
<section class="detail" id="validate_number_system/1"> <section class="detail" id="validate_number_system/1">
@ -1508,7 +1508,7 @@ of a language tag.</p><h2 id="validate_locale/1-examples" class="section-heading
<section class="docstring"> <section class="docstring">
<p>See <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.html#validate_number_system/1"><code class="inline">Cldr.validate_number_system/1</code></a>.</p> <p>See <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.html#validate_number_system/1"><code class="inline">Cldr.validate_number_system/1</code></a>.</p>
</section> </section>
</section> </section>
<section class="detail" id="validate_number_system_type/1"> <section class="detail" id="validate_number_system_type/1">
@ -1544,7 +1544,7 @@ of a language tag.</p><h2 id="validate_locale/1-examples" class="section-heading
Arguments Arguments
</h2> </h2>
<ul><li><code class="inline">number_system_type</code> is any number system type returned by <ul><li><code class="inline">number_system_type</code> is any number system type returned by
<a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.html#known_number_system_types/1"><code class="inline">Cldr.known_number_system_types/1</code></a></li></ul><h2 id="validate_number_system_type/1-returns" class="section-heading"> <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.html#known_number_system_types/1"><code class="inline">Cldr.known_number_system_types/1</code></a></li></ul><h2 id="validate_number_system_type/1-returns" class="section-heading">
<a href="#validate_number_system_type/1-returns" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i> <a href="#validate_number_system_type/1-returns" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
<p class="sr-only">returns</p> <p class="sr-only">returns</p>
</a> </a>
@ -1557,22 +1557,22 @@ of a language tag.</p><h2 id="validate_locale/1-examples" class="section-heading
Examples Examples
</h2> </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="w"> </span><span class="ss">:default</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="w"> </span><span class="ss">:default</span><span class="w">
</span><span class="p" data-group-id="4557930608-1">{</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="4557930608-1">}</span><span class="w"> </span><span class="p" data-group-id="9421371193-1">{</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="9421371193-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">validate_number_system_type</span><span class="w"> </span><span class="ss">:traditional</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="w"> </span><span class="ss">:traditional</span><span class="w">
</span><span class="p" data-group-id="4557930608-2">{</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="4557930608-2">}</span><span class="w"> </span><span class="p" data-group-id="9421371193-2">{</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="9421371193-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="w"> </span><span class="ss">:latn</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="w"> </span><span class="ss">:latn</span><span class="w">
</span><span class="p" data-group-id="4557930608-3">{</span><span class="w"> </span><span class="p" data-group-id="9421371193-3">{</span><span class="w">
</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="ss">:error</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="4557930608-4">{</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="4557930608-4">}</span><span class="w"> </span><span class="p" data-group-id="9421371193-4">{</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="9421371193-4">}</span><span class="w">
</span><span class="p" data-group-id="4557930608-3">}</span><span class="w"> </span><span class="p" data-group-id="9421371193-3">}</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="w"> </span><span class="s">&quot;bork&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">validate_number_system_type</span><span class="w"> </span><span class="s">&quot;bork&quot;</span><span class="w">
</span><span class="p" data-group-id="4557930608-5">{</span><span class="w"> </span><span class="p" data-group-id="9421371193-5">{</span><span class="w">
</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="ss">:error</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="4557930608-6">{</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="4557930608-6">}</span><span class="w"> </span><span class="p" data-group-id="9421371193-6">{</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="9421371193-6">}</span><span class="w">
</span><span class="p" data-group-id="4557930608-5">}</span></code></pre> </span><span class="p" data-group-id="9421371193-5">}</span></code></pre>
</section> </section>
</section> </section>
<section class="detail" id="validate_territory/1"> <section class="detail" id="validate_territory/1">
@ -1594,7 +1594,7 @@ of a language tag.</p><h2 id="validate_locale/1-examples" class="section-heading
<section class="docstring"> <section class="docstring">
<p>See <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.html#validate_territory/1"><code class="inline">Cldr.validate_territory/1</code></a>.</p> <p>See <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.html#validate_territory/1"><code class="inline">Cldr.validate_territory/1</code></a>.</p>
</section> </section>
</section> </section>
<section class="detail" id="with_locale/2"> <section class="detail" id="with_locale/2">
@ -1620,9 +1620,9 @@ of a language tag.</p><h2 id="validate_locale/1-examples" class="section-heading
<div class="specs"> <div class="specs">
<pre translate="no"><span class="attribute">@spec</span> with_locale(<a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.LanguageTag.html#t:t/0">Cldr.LanguageTag.t</a>(), (... -&gt; <a href="https://hexdocs.pm/elixir/typespecs.html#basic-types">any</a>())) :: <a href="https://hexdocs.pm/elixir/typespecs.html#basic-types">any</a>()</pre> <pre translate="no"><span class="attribute">@spec</span> with_locale(<a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.LanguageTag.html#t:t/0">Cldr.LanguageTag.t</a>(), (... -&gt; <a href="https://hexdocs.pm/elixir/typespecs.html#basic-types">any</a>())) :: <a href="https://hexdocs.pm/elixir/typespecs.html#basic-types">any</a>()</pre>
<pre translate="no"><span class="attribute">@spec</span> with_locale(<a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.Locale.html#t:locale_name/0">Cldr.Locale.locale_name</a>(), (... -&gt; <a href="https://hexdocs.pm/elixir/typespecs.html#basic-types">any</a>())) :: <a href="https://hexdocs.pm/elixir/typespecs.html#basic-types">any</a>()</pre> <pre translate="no"><span class="attribute">@spec</span> with_locale(<a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.Locale.html#t:locale_name/0">Cldr.Locale.locale_name</a>(), (... -&gt; <a href="https://hexdocs.pm/elixir/typespecs.html#basic-types">any</a>())) :: <a href="https://hexdocs.pm/elixir/typespecs.html#basic-types">any</a>()</pre>
</div> </div>
@ -1633,7 +1633,7 @@ current locale is restored after the function.</p><h2 id="with_locale/2-argument
</a> </a>
Arguments Arguments
</h2> </h2>
<ul><li><p><code class="inline">locale</code> is any valid locale name returned by <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.html#known_locale_names/1"><code class="inline">Cldr.known_locale_names/1</code></a>.</p></li><li><p><code class="inline">fun</code> is any 0-arity function or function capture.</p></li></ul><h2 id="with_locale/2-returns" class="section-heading"> <ul><li><p><code class="inline">locale</code> is any valid locale name returned by <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.html#known_locale_names/1"><code class="inline">Cldr.known_locale_names/1</code></a>.</p></li><li><p><code class="inline">fun</code> is any 0-arity function or function capture.</p></li></ul><h2 id="with_locale/2-returns" class="section-heading">
<a href="#with_locale/2-returns" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i> <a href="#with_locale/2-returns" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
<p class="sr-only">returns</p> <p class="sr-only">returns</p>
</a> </a>

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>
@ -818,23 +818,23 @@ pool to disconnect within the given interval.</p><p>See <a href="https://hexdocs
<section class="docstring"> <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="6134838607-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="6134838607-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="1535738854-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="1535738854-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="6134838607-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="1535738854-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="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="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="6134838607-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="1535738854-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">: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="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="6134838607-3">end</span><span class="w"> </span><span class="k" data-group-id="1535738854-3">end</span><span class="w">
</span><span class="k" data-group-id="6134838607-2">end</span><span class="w"> </span><span class="k" data-group-id="1535738854-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="6134838607-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="6134838607-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="6134838607-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="6134838607-7">(</span><span class="n">i</span><span class="p" data-group-id="6134838607-7">)</span><span class="p" data-group-id="6134838607-6">}</span><span class="w"> </span><span class="k" data-group-id="6134838607-5">end</span><span class="p" data-group-id="6134838607-4">)</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="1535738854-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="1535738854-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="1535738854-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="1535738854-7">(</span><span class="n">i</span><span class="p" data-group-id="1535738854-7">)</span><span class="p" data-group-id="1535738854-6">}</span><span class="w"> </span><span class="k" data-group-id="1535738854-5">end</span><span class="p" data-group-id="1535738854-4">)</span><span class="w">
</span><span class="p" data-group-id="6134838607-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="6134838607-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="6134838607-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="6134838607-9">)</span><span class="w"> </span><span class="p" data-group-id="1535738854-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="1535738854-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="1535738854-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="1535738854-9">)</span><span class="w">
</span><span class="c1"># schemaless</span><span class="w"> </span><span class="c1"># schemaless</span><span class="w">
</span><span class="p" data-group-id="6134838607-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="6134838607-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="6134838607-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="6134838607-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="6134838607-13">(</span><span class="p" data-group-id="6134838607-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="6134838607-12">]</span><span class="p" data-group-id="6134838607-11">)</span></code></pre> </span><span class="p" data-group-id="1535738854-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="1535738854-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="1535738854-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="1535738854-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="1535738854-13">(</span><span class="p" data-group-id="1535738854-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="1535738854-12">]</span><span class="p" data-group-id="1535738854-11">)</span></code></pre>
</section> </section>
</section> </section>
<section class="detail" id="load/2"> <section class="detail" id="load/2">

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>
@ -1125,23 +1125,23 @@ pool to disconnect within the given interval.</p><p>See <a href="https://hexdocs
<section class="docstring"> <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="1203133283-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="1203133283-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="9807475070-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="9807475070-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="1203133283-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="9807475070-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="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="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="1203133283-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="9807475070-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">: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="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="1203133283-3">end</span><span class="w"> </span><span class="k" data-group-id="9807475070-3">end</span><span class="w">
</span><span class="k" data-group-id="1203133283-2">end</span><span class="w"> </span><span class="k" data-group-id="9807475070-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="1203133283-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="1203133283-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="1203133283-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="1203133283-7">(</span><span class="n">i</span><span class="p" data-group-id="1203133283-7">)</span><span class="p" data-group-id="1203133283-6">}</span><span class="w"> </span><span class="k" data-group-id="1203133283-5">end</span><span class="p" data-group-id="1203133283-4">)</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="9807475070-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="9807475070-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="9807475070-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="9807475070-7">(</span><span class="n">i</span><span class="p" data-group-id="9807475070-7">)</span><span class="p" data-group-id="9807475070-6">}</span><span class="w"> </span><span class="k" data-group-id="9807475070-5">end</span><span class="p" data-group-id="9807475070-4">)</span><span class="w">
</span><span class="p" data-group-id="1203133283-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="1203133283-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="1203133283-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="1203133283-9">)</span><span class="w"> </span><span class="p" data-group-id="9807475070-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="9807475070-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="9807475070-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="9807475070-9">)</span><span class="w">
</span><span class="c1"># schemaless</span><span class="w"> </span><span class="c1"># schemaless</span><span class="w">
</span><span class="p" data-group-id="1203133283-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="1203133283-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="1203133283-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="1203133283-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="1203133283-13">(</span><span class="p" data-group-id="1203133283-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="1203133283-12">]</span><span class="p" data-group-id="1203133283-11">)</span></code></pre> </span><span class="p" data-group-id="9807475070-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="9807475070-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="9807475070-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="9807475070-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="9807475070-13">(</span><span class="p" data-group-id="9807475070-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="9807475070-12">]</span><span class="p" data-group-id="9807475070-11">)</span></code></pre>
</section> </section>
</section> </section>
<section class="detail" id="load/2"> <section class="detail" id="load/2">

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>
@ -233,8 +233,8 @@ Functions
</a> </a>
Examples Examples
</h2> </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="6009703815-1">(</span><span class="p" data-group-id="6009703815-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="8333613787-1">(</span><span class="p" data-group-id="8333613787-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="5574476302-1">(</span><span class="p" data-group-id="5574476302-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="6651384523-1">(</span><span class="p" data-group-id="6651384523-1">)</span><span class="w">
</span><span class="s">&quot;GeoLite2-City&quot;</span></code></pre> </span><span class="s">&quot;GeoLite2-City&quot;</span></code></pre>
</section> </section>
</section> </section>
@ -274,8 +274,8 @@ asynchronously.</p></li></ul><h2 id="load_db/1-examples" class="section-heading"
</a> </a>
Examples Examples
</h2> </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="1134680553-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="1134680553-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="7380763076-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="7380763076-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="8334289636-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="8334289636-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="6114966146-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="6114966146-1">)</span><span class="w">
</span><span class="ss">:ok</span></code></pre> </span><span class="ss">:ok</span></code></pre>
</section> </section>
</section> </section>
@ -304,21 +304,21 @@ asynchronously.</p></li></ul><h2 id="load_db/1-examples" class="section-heading"
</a> </a>
Examples Examples
</h2> </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="0432310032-1">(</span><span class="s">&quot;8.7.6.5&quot;</span><span class="p" data-group-id="0432310032-1">)</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="5619469664-1">(</span><span class="s">&quot;8.7.6.5&quot;</span><span class="p" data-group-id="5619469664-1">)</span><span class="w">
</span><span class="p" data-group-id="0432310032-2">%{</span><span class="w"> </span><span class="p" data-group-id="5619469664-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="0432310032-3">%{</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="5619469664-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;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="0432310032-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="5619469664-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;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;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;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="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="0432310032-4">}</span><span class="w"> </span><span class="p" data-group-id="5619469664-4">}</span><span class="w">
</span><span class="p" data-group-id="0432310032-3">}</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="5619469664-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="0432310032-5">%{</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="5619469664-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;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;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="0432310032-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="5619469664-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;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;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"> </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">
@ -327,12 +327,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;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;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="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="0432310032-6">}</span><span class="w"> </span><span class="p" data-group-id="5619469664-6">}</span><span class="w">
</span><span class="p" data-group-id="0432310032-5">}</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="5619469664-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="0432310032-7">%{</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="5619469664-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;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;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="0432310032-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="5619469664-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;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;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"> </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">
@ -341,20 +341,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;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;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="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="0432310032-8">}</span><span class="w"> </span><span class="p" data-group-id="5619469664-8">}</span><span class="w">
</span><span class="p" data-group-id="0432310032-7">}</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="5619469664-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="0432310032-9">%{</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="5619469664-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;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;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;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;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="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="0432310032-9">}</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="5619469664-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="0432310032-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="0432310032-10">}</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="5619469664-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="5619469664-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="0432310032-11">%{</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="5619469664-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;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;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="0432310032-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="5619469664-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;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;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"> </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">
@ -363,13 +363,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;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;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="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="0432310032-12">}</span><span class="w"> </span><span class="p" data-group-id="5619469664-12">}</span><span class="w">
</span><span class="p" data-group-id="0432310032-11">}</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="5619469664-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="0432310032-13">[</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="5619469664-13">[</span><span class="w">
</span><span class="p" data-group-id="0432310032-14">%{</span><span class="w"> </span><span class="p" data-group-id="5619469664-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;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;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="0432310032-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="5619469664-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;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;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"> </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">
@ -378,10 +378,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;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;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="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="0432310032-15">}</span><span class="w"> </span><span class="p" data-group-id="5619469664-15">}</span><span class="w">
</span><span class="p" data-group-id="0432310032-14">}</span><span class="w"> </span><span class="p" data-group-id="5619469664-14">}</span><span class="w">
</span><span class="p" data-group-id="0432310032-13">]</span><span class="w"> </span><span class="p" data-group-id="5619469664-13">]</span><span class="w">
</span><span class="p" data-group-id="0432310032-2">}</span></code></pre> </span><span class="p" data-group-id="5619469664-2">}</span></code></pre>
</section> </section>
</section> </section>

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>
@ -1116,23 +1116,23 @@ pool to disconnect within the given interval.</p><p>See <a href="https://hexdocs
<section class="docstring"> <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="2639598688-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="2639598688-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="1756299268-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="1756299268-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="2639598688-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="1756299268-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="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="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="2639598688-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="1756299268-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">: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="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="2639598688-3">end</span><span class="w"> </span><span class="k" data-group-id="1756299268-3">end</span><span class="w">
</span><span class="k" data-group-id="2639598688-2">end</span><span class="w"> </span><span class="k" data-group-id="1756299268-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="2639598688-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="2639598688-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="2639598688-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="2639598688-7">(</span><span class="n">i</span><span class="p" data-group-id="2639598688-7">)</span><span class="p" data-group-id="2639598688-6">}</span><span class="w"> </span><span class="k" data-group-id="2639598688-5">end</span><span class="p" data-group-id="2639598688-4">)</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="1756299268-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="1756299268-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="1756299268-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="1756299268-7">(</span><span class="n">i</span><span class="p" data-group-id="1756299268-7">)</span><span class="p" data-group-id="1756299268-6">}</span><span class="w"> </span><span class="k" data-group-id="1756299268-5">end</span><span class="p" data-group-id="1756299268-4">)</span><span class="w">
</span><span class="p" data-group-id="2639598688-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="2639598688-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="2639598688-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="2639598688-9">)</span><span class="w"> </span><span class="p" data-group-id="1756299268-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="1756299268-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="1756299268-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="1756299268-9">)</span><span class="w">
</span><span class="c1"># schemaless</span><span class="w"> </span><span class="c1"># schemaless</span><span class="w">
</span><span class="p" data-group-id="2639598688-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="2639598688-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="2639598688-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="2639598688-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="2639598688-13">(</span><span class="p" data-group-id="2639598688-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="2639598688-12">]</span><span class="p" data-group-id="2639598688-11">)</span></code></pre> </span><span class="p" data-group-id="1756299268-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="1756299268-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="1756299268-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="1756299268-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="1756299268-13">(</span><span class="p" data-group-id="1756299268-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="1756299268-12">]</span><span class="p" data-group-id="1756299268-11">)</span></code></pre>
</section> </section>
</section> </section>
<section class="detail" id="load/2"> <section class="detail" id="load/2">

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>
@ -1116,23 +1116,23 @@ pool to disconnect within the given interval.</p><p>See <a href="https://hexdocs
<section class="docstring"> <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="2864114139-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="2864114139-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="6838432846-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="6838432846-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="2864114139-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="6838432846-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="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="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="2864114139-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="6838432846-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">: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="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="2864114139-3">end</span><span class="w"> </span><span class="k" data-group-id="6838432846-3">end</span><span class="w">
</span><span class="k" data-group-id="2864114139-2">end</span><span class="w"> </span><span class="k" data-group-id="6838432846-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="2864114139-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="2864114139-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="2864114139-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="2864114139-7">(</span><span class="n">i</span><span class="p" data-group-id="2864114139-7">)</span><span class="p" data-group-id="2864114139-6">}</span><span class="w"> </span><span class="k" data-group-id="2864114139-5">end</span><span class="p" data-group-id="2864114139-4">)</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="6838432846-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="6838432846-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="6838432846-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="6838432846-7">(</span><span class="n">i</span><span class="p" data-group-id="6838432846-7">)</span><span class="p" data-group-id="6838432846-6">}</span><span class="w"> </span><span class="k" data-group-id="6838432846-5">end</span><span class="p" data-group-id="6838432846-4">)</span><span class="w">
</span><span class="p" data-group-id="2864114139-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="2864114139-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="2864114139-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="2864114139-9">)</span><span class="w"> </span><span class="p" data-group-id="6838432846-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="6838432846-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="6838432846-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="6838432846-9">)</span><span class="w">
</span><span class="c1"># schemaless</span><span class="w"> </span><span class="c1"># schemaless</span><span class="w">
</span><span class="p" data-group-id="2864114139-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="2864114139-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="2864114139-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="2864114139-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="2864114139-13">(</span><span class="p" data-group-id="2864114139-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="2864114139-12">]</span><span class="p" data-group-id="2864114139-11">)</span></code></pre> </span><span class="p" data-group-id="6838432846-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="6838432846-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="6838432846-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="6838432846-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="6838432846-13">(</span><span class="p" data-group-id="6838432846-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="6838432846-12">]</span><span class="p" data-group-id="6838432846-11">)</span></code></pre>
</section> </section>
</section> </section>
<section class="detail" id="load/2"> <section class="detail" id="load/2">

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>

View File

@ -13,7 +13,7 @@
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script> <script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script> <script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-625D214B.js"></script> <script src="dist/sidebar_items-D1A5539C.js"></script>
<script src="docs_config.js"></script> <script src="docs_config.js"></script>

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