This commit is contained in:
cnkk 2023-07-12 08:40:44 +00:00
parent d56da455c7
commit 035f777586
26 changed files with 573 additions and 573 deletions

View File

@ -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="0259392415-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="0259392415-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="4053592123-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="4053592123-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="0259392415-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="4053592123-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="0259392415-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="4053592123-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="0259392415-3">end</span><span class="w"> </span><span class="k" data-group-id="4053592123-3">end</span><span class="w">
</span><span class="k" data-group-id="0259392415-2">end</span><span class="w"> </span><span class="k" data-group-id="4053592123-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="0259392415-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="0259392415-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="0259392415-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="0259392415-7">(</span><span class="n">i</span><span class="p" data-group-id="0259392415-7">)</span><span class="p" data-group-id="0259392415-6">}</span><span class="w"> </span><span class="k" data-group-id="0259392415-5">end</span><span class="p" data-group-id="0259392415-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="4053592123-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="4053592123-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="4053592123-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="4053592123-7">(</span><span class="n">i</span><span class="p" data-group-id="4053592123-7">)</span><span class="p" data-group-id="4053592123-6">}</span><span class="w"> </span><span class="k" data-group-id="4053592123-5">end</span><span class="p" data-group-id="4053592123-4">)</span><span class="w">
</span><span class="p" data-group-id="0259392415-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="0259392415-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="0259392415-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="0259392415-9">)</span><span class="w"> </span><span class="p" data-group-id="4053592123-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="4053592123-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="4053592123-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="4053592123-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="0259392415-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="0259392415-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="0259392415-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="0259392415-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="0259392415-13">(</span><span class="p" data-group-id="0259392415-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="0259392415-12">]</span><span class="p" data-group-id="0259392415-11">)</span></code></pre> </span><span class="p" data-group-id="4053592123-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="4053592123-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="4053592123-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="4053592123-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="4053592123-13">(</span><span class="p" data-group-id="4053592123-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="4053592123-12">]</span><span class="p" data-group-id="4053592123-11">)</span></code></pre>
</section> </section>
</section> </section>
<section class="detail" id="load/2"> <section class="detail" id="load/2">

View File

@ -119,7 +119,7 @@ Plausible
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.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">
</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="3047478623-1">(</span><span class="w"> </span><span class="p" data-group-id="3047478623-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="3047478623-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="3047478623-3">)</span><span class="w"> </span><span class="p" data-group-id="3047478623-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="3047478623-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="1920084328-1">(</span><span class="w"> </span><span class="p" data-group-id="1920084328-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="1920084328-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="1920084328-3">)</span><span class="w"> </span><span class="p" data-group-id="1920084328-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="1920084328-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>
@ -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="9808502340-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="9808502340-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="5473931342-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="5473931342-1">)</span><span class="w">
</span><span class="p" data-group-id="9808502340-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="5473931342-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="9808502340-3">%</span><span class="nc" data-group-id="9808502340-3">Cldr.LanguageTag</span><span class="p" data-group-id="9808502340-3">{</span><span class="w"> </span><span class="p" data-group-id="5473931342-3">%</span><span class="nc" data-group-id="5473931342-3">Cldr.LanguageTag</span><span class="p" data-group-id="5473931342-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="9808502340-4">[</span><span class="p" data-group-id="9808502340-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="5473931342-4">[</span><span class="p" data-group-id="5473931342-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="9808502340-5">%{</span><span class="p" data-group-id="9808502340-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="5473931342-5">%{</span><span class="p" data-group-id="5473931342-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="9808502340-6">%{</span><span class="p" data-group-id="9808502340-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="5473931342-6">%{</span><span class="p" data-group-id="5473931342-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="9808502340-7">[</span><span class="p" data-group-id="9808502340-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="5473931342-7">[</span><span class="p" data-group-id="5473931342-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="9808502340-8">%{</span><span class="p" data-group-id="9808502340-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="5473931342-8">%{</span><span class="p" data-group-id="5473931342-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="9808502340-9">[</span><span class="p" data-group-id="9808502340-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="5473931342-9">[</span><span class="p" data-group-id="5473931342-9">]</span><span class="w">
</span><span class="p" data-group-id="9808502340-3">}</span><span class="p" data-group-id="9808502340-2">}</span><span class="w"> </span><span class="p" data-group-id="5473931342-3">}</span><span class="p" data-group-id="5473931342-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="9808502340-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="9808502340-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="5473931342-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="5473931342-10">)</span><span class="w">
</span><span class="p" data-group-id="9808502340-11">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="5473931342-11">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="9808502340-12">%</span><span class="nc" data-group-id="9808502340-12">Cldr.LanguageTag</span><span class="p" data-group-id="9808502340-12">{</span><span class="w"> </span><span class="p" data-group-id="5473931342-12">%</span><span class="nc" data-group-id="5473931342-12">Cldr.LanguageTag</span><span class="p" data-group-id="5473931342-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="9808502340-13">[</span><span class="p" data-group-id="9808502340-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="5473931342-13">[</span><span class="p" data-group-id="5473931342-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="9808502340-14">%{</span><span class="p" data-group-id="9808502340-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="5473931342-14">%{</span><span class="p" data-group-id="5473931342-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="9808502340-15">%{</span><span class="p" data-group-id="9808502340-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="5473931342-15">%{</span><span class="p" data-group-id="5473931342-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="9808502340-16">[</span><span class="p" data-group-id="9808502340-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="5473931342-16">[</span><span class="p" data-group-id="5473931342-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="9808502340-17">%{</span><span class="p" data-group-id="9808502340-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="5473931342-17">%{</span><span class="p" data-group-id="5473931342-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="9808502340-18">[</span><span class="p" data-group-id="9808502340-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="5473931342-18">[</span><span class="p" data-group-id="5473931342-18">]</span><span class="w">
</span><span class="p" data-group-id="9808502340-12">}</span><span class="p" data-group-id="9808502340-11">}</span><span class="w"> </span><span class="p" data-group-id="5473931342-12">}</span><span class="p" data-group-id="5473931342-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="9808502340-19">(</span><span class="s">&quot;xx,yy;q=0.3&quot;</span><span class="p" data-group-id="9808502340-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="5473931342-19">(</span><span class="s">&quot;xx,yy;q=0.3&quot;</span><span class="p" data-group-id="5473931342-19">)</span><span class="w">
</span><span class="p" data-group-id="9808502340-20">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="5473931342-20">{</span><span class="ss">:error</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="9808502340-21">{</span><span class="nc">Cldr.NoMatchingLocale</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="5473931342-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="9808502340-21">}</span><span class="p" data-group-id="9808502340-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="5473931342-21">}</span><span class="p" data-group-id="5473931342-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="9808502340-22">(</span><span class="s">&quot;invalid_tag&quot;</span><span class="p" data-group-id="9808502340-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="5473931342-22">(</span><span class="s">&quot;invalid_tag&quot;</span><span class="p" data-group-id="5473931342-22">)</span><span class="w">
</span><span class="p" data-group-id="9808502340-23">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="9808502340-24">{</span><span class="nc">Cldr.LanguageTag.ParseError</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="5473931342-23">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="5473931342-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="9808502340-24">}</span><span class="p" data-group-id="9808502340-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="5473931342-24">}</span><span class="p" data-group-id="5473931342-23">}</span></code></pre>
</section> </section>
</section> </section>
<section class="detail" id="parse/1"> <section class="detail" id="parse/1">
@ -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="8163765621-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="8163765621-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="1547841183-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="1547841183-1">)</span><span class="w">
</span><span class="p" data-group-id="8163765621-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1547841183-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="8163765621-3">[</span><span class="w"> </span><span class="p" data-group-id="1547841183-3">[</span><span class="w">
</span><span class="p" data-group-id="8163765621-4">{</span><span class="mf">1.0</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1547841183-4">{</span><span class="mf">1.0</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="8163765621-5">%</span><span class="nc" data-group-id="8163765621-5">Cldr.LanguageTag</span><span class="p" data-group-id="8163765621-5">{</span><span class="w"> </span><span class="p" data-group-id="1547841183-5">%</span><span class="nc" data-group-id="1547841183-5">Cldr.LanguageTag</span><span class="p" data-group-id="1547841183-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="8163765621-6">[</span><span class="p" data-group-id="8163765621-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="1547841183-6">[</span><span class="p" data-group-id="1547841183-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="8163765621-7">%{</span><span class="p" data-group-id="8163765621-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="1547841183-7">%{</span><span class="p" data-group-id="1547841183-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="8163765621-8">%{</span><span class="p" data-group-id="8163765621-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="1547841183-8">%{</span><span class="p" data-group-id="1547841183-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="8163765621-9">[</span><span class="p" data-group-id="8163765621-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="1547841183-9">[</span><span class="p" data-group-id="1547841183-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="8163765621-10">%{</span><span class="p" data-group-id="8163765621-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="1547841183-10">%{</span><span class="p" data-group-id="1547841183-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="8163765621-11">[</span><span class="p" data-group-id="8163765621-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="1547841183-11">[</span><span class="p" data-group-id="1547841183-11">]</span><span class="w">
</span><span class="p" data-group-id="8163765621-5">}</span><span class="p" data-group-id="8163765621-4">}</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1547841183-5">}</span><span class="p" data-group-id="1547841183-4">}</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="8163765621-12">{</span><span class="mf">0.3</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1547841183-12">{</span><span class="mf">0.3</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="8163765621-13">%</span><span class="nc" data-group-id="8163765621-13">Cldr.LanguageTag</span><span class="p" data-group-id="8163765621-13">{</span><span class="w"> </span><span class="p" data-group-id="1547841183-13">%</span><span class="nc" data-group-id="1547841183-13">Cldr.LanguageTag</span><span class="p" data-group-id="1547841183-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="8163765621-14">[</span><span class="p" data-group-id="8163765621-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="1547841183-14">[</span><span class="p" data-group-id="1547841183-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="8163765621-15">%{</span><span class="p" data-group-id="8163765621-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="1547841183-15">%{</span><span class="p" data-group-id="1547841183-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="8163765621-16">%{</span><span class="p" data-group-id="8163765621-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="1547841183-16">%{</span><span class="p" data-group-id="1547841183-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="8163765621-17">[</span><span class="p" data-group-id="8163765621-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="1547841183-17">[</span><span class="p" data-group-id="1547841183-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="8163765621-18">%{</span><span class="p" data-group-id="8163765621-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="1547841183-18">%{</span><span class="p" data-group-id="1547841183-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="8163765621-19">[</span><span class="p" data-group-id="8163765621-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="1547841183-19">[</span><span class="p" data-group-id="1547841183-19">]</span><span class="w">
</span><span class="p" data-group-id="8163765621-13">}</span><span class="p" data-group-id="8163765621-12">}</span><span class="w"> </span><span class="p" data-group-id="1547841183-13">}</span><span class="p" data-group-id="1547841183-12">}</span><span class="w">
</span><span class="p" data-group-id="8163765621-3">]</span><span class="p" data-group-id="8163765621-2">}</span><span class="w"> </span><span class="p" data-group-id="1547841183-3">]</span><span class="p" data-group-id="1547841183-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="8163765621-20">(</span><span class="s">&quot;invalid_tag&quot;</span><span class="p" data-group-id="8163765621-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="1547841183-20">(</span><span class="s">&quot;invalid_tag&quot;</span><span class="p" data-group-id="1547841183-20">)</span><span class="w">
</span><span class="p" data-group-id="8163765621-21">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1547841183-21">{</span><span class="ss">:error</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="8163765621-22">{</span><span class="nc">Cldr.LanguageTag.ParseError</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1547841183-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="8163765621-22">}</span><span class="p" data-group-id="8163765621-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="1547841183-22">}</span><span class="p" data-group-id="1547841183-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="8163765621-23">(</span><span class="s">&quot;da,zh-TW;q=0.3,invalid_tag&quot;</span><span class="p" data-group-id="8163765621-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="1547841183-23">(</span><span class="s">&quot;da,zh-TW;q=0.3,invalid_tag&quot;</span><span class="p" data-group-id="1547841183-23">)</span><span class="w">
</span><span class="p" data-group-id="8163765621-24">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1547841183-24">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="8163765621-25">[</span><span class="w"> </span><span class="p" data-group-id="1547841183-25">[</span><span class="w">
</span><span class="p" data-group-id="8163765621-26">{</span><span class="mf">1.0</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1547841183-26">{</span><span class="mf">1.0</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="8163765621-27">%</span><span class="nc" data-group-id="8163765621-27">Cldr.LanguageTag</span><span class="p" data-group-id="8163765621-27">{</span><span class="w"> </span><span class="p" data-group-id="1547841183-27">%</span><span class="nc" data-group-id="1547841183-27">Cldr.LanguageTag</span><span class="p" data-group-id="1547841183-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="8163765621-28">[</span><span class="p" data-group-id="8163765621-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="1547841183-28">[</span><span class="p" data-group-id="1547841183-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="8163765621-29">%{</span><span class="p" data-group-id="8163765621-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="1547841183-29">%{</span><span class="p" data-group-id="1547841183-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="8163765621-30">%{</span><span class="p" data-group-id="8163765621-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="1547841183-30">%{</span><span class="p" data-group-id="1547841183-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="8163765621-31">[</span><span class="p" data-group-id="8163765621-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="1547841183-31">[</span><span class="p" data-group-id="1547841183-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="8163765621-32">%{</span><span class="p" data-group-id="8163765621-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="1547841183-32">%{</span><span class="p" data-group-id="1547841183-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="8163765621-33">[</span><span class="p" data-group-id="8163765621-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="1547841183-33">[</span><span class="p" data-group-id="1547841183-33">]</span><span class="w">
</span><span class="p" data-group-id="8163765621-27">}</span><span class="p" data-group-id="8163765621-26">}</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1547841183-27">}</span><span class="p" data-group-id="1547841183-26">}</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="8163765621-34">{</span><span class="mf">0.3</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1547841183-34">{</span><span class="mf">0.3</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="8163765621-35">%</span><span class="nc" data-group-id="8163765621-35">Cldr.LanguageTag</span><span class="p" data-group-id="8163765621-35">{</span><span class="w"> </span><span class="p" data-group-id="1547841183-35">%</span><span class="nc" data-group-id="1547841183-35">Cldr.LanguageTag</span><span class="p" data-group-id="1547841183-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="8163765621-36">[</span><span class="p" data-group-id="8163765621-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="1547841183-36">[</span><span class="p" data-group-id="1547841183-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="8163765621-37">%{</span><span class="p" data-group-id="8163765621-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="1547841183-37">%{</span><span class="p" data-group-id="1547841183-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="8163765621-38">%{</span><span class="p" data-group-id="8163765621-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="1547841183-38">%{</span><span class="p" data-group-id="1547841183-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="8163765621-39">[</span><span class="p" data-group-id="8163765621-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="1547841183-39">[</span><span class="p" data-group-id="1547841183-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="8163765621-40">%{</span><span class="p" data-group-id="8163765621-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="1547841183-40">%{</span><span class="p" data-group-id="1547841183-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="8163765621-41">[</span><span class="p" data-group-id="8163765621-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="1547841183-41">[</span><span class="p" data-group-id="1547841183-41">]</span><span class="w">
</span><span class="p" data-group-id="8163765621-35">}</span><span class="p" data-group-id="8163765621-34">}</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1547841183-35">}</span><span class="p" data-group-id="1547841183-34">}</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="8163765621-42">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1547841183-42">{</span><span class="ss">:error</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="8163765621-43">{</span><span class="nc">Cldr.LanguageTag.ParseError</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1547841183-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="8163765621-43">}</span><span class="p" data-group-id="8163765621-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="1547841183-43">}</span><span class="p" data-group-id="1547841183-42">}</span><span class="w">
</span><span class="p" data-group-id="8163765621-25">]</span><span class="p" data-group-id="8163765621-24">}</span></code></pre> </span><span class="p" data-group-id="1547841183-25">]</span><span class="p" data-group-id="1547841183-24">}</span></code></pre>
</section> </section>
</section> </section>
<section class="detail" id="parse!/1"> <section class="detail" id="parse!/1">
@ -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="6150329507-1">(</span><span class="s">&quot;da,zh-TW;q=0.3&quot;</span><span class="p" data-group-id="6150329507-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="6487208524-1">(</span><span class="s">&quot;da,zh-TW;q=0.3&quot;</span><span class="p" data-group-id="6487208524-1">)</span><span class="w">
</span><span class="p" data-group-id="6150329507-2">[</span><span class="w"> </span><span class="p" data-group-id="6487208524-2">[</span><span class="w">
</span><span class="p" data-group-id="6150329507-3">{</span><span class="mf">1.0</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="6487208524-3">{</span><span class="mf">1.0</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="6150329507-4">%</span><span class="nc" data-group-id="6150329507-4">Cldr.LanguageTag</span><span class="p" data-group-id="6150329507-4">{</span><span class="w"> </span><span class="p" data-group-id="6487208524-4">%</span><span class="nc" data-group-id="6487208524-4">Cldr.LanguageTag</span><span class="p" data-group-id="6487208524-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="6150329507-5">[</span><span class="p" data-group-id="6150329507-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="6487208524-5">[</span><span class="p" data-group-id="6487208524-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="6150329507-6">%{</span><span class="p" data-group-id="6150329507-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="6487208524-6">%{</span><span class="p" data-group-id="6487208524-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="6150329507-7">%{</span><span class="p" data-group-id="6150329507-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="6487208524-7">%{</span><span class="p" data-group-id="6487208524-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="6150329507-8">[</span><span class="p" data-group-id="6150329507-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="6487208524-8">[</span><span class="p" data-group-id="6487208524-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="6150329507-9">%{</span><span class="p" data-group-id="6150329507-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="6487208524-9">%{</span><span class="p" data-group-id="6487208524-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="6150329507-10">[</span><span class="p" data-group-id="6150329507-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="6487208524-10">[</span><span class="p" data-group-id="6487208524-10">]</span><span class="w">
</span><span class="p" data-group-id="6150329507-4">}</span><span class="p" data-group-id="6150329507-3">}</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="6487208524-4">}</span><span class="p" data-group-id="6487208524-3">}</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="6150329507-11">{</span><span class="mf">0.3</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="6487208524-11">{</span><span class="mf">0.3</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="6150329507-12">%</span><span class="nc" data-group-id="6150329507-12">Cldr.LanguageTag</span><span class="p" data-group-id="6150329507-12">{</span><span class="w"> </span><span class="p" data-group-id="6487208524-12">%</span><span class="nc" data-group-id="6487208524-12">Cldr.LanguageTag</span><span class="p" data-group-id="6487208524-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="6150329507-13">[</span><span class="p" data-group-id="6150329507-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="6487208524-13">[</span><span class="p" data-group-id="6487208524-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="6150329507-14">%{</span><span class="p" data-group-id="6150329507-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="6487208524-14">%{</span><span class="p" data-group-id="6487208524-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="6150329507-15">%{</span><span class="p" data-group-id="6150329507-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="6487208524-15">%{</span><span class="p" data-group-id="6487208524-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="6150329507-16">[</span><span class="p" data-group-id="6150329507-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="6487208524-16">[</span><span class="p" data-group-id="6487208524-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="6150329507-17">%{</span><span class="p" data-group-id="6150329507-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="6487208524-17">%{</span><span class="p" data-group-id="6487208524-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="6150329507-18">[</span><span class="p" data-group-id="6150329507-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="6487208524-18">[</span><span class="p" data-group-id="6487208524-18">]</span><span class="w">
</span><span class="p" data-group-id="6150329507-12">}</span><span class="p" data-group-id="6150329507-11">}</span><span class="w"> </span><span class="p" data-group-id="6487208524-12">}</span><span class="p" data-group-id="6487208524-11">}</span><span class="w">
</span><span class="p" data-group-id="6150329507-2">]</span><span class="w"> </span><span class="p" data-group-id="6487208524-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="6150329507-19">(</span><span class="s">&quot;da,zh-TW;q=0.3,invalid_tag&quot;</span><span class="p" data-group-id="6150329507-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="6487208524-19">(</span><span class="s">&quot;da,zh-TW;q=0.3,invalid_tag&quot;</span><span class="p" data-group-id="6487208524-19">)</span><span class="w">
</span><span class="p" data-group-id="6150329507-20">[</span><span class="w"> </span><span class="p" data-group-id="6487208524-20">[</span><span class="w">
</span><span class="p" data-group-id="6150329507-21">{</span><span class="mf">1.0</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="6487208524-21">{</span><span class="mf">1.0</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="6150329507-22">%</span><span class="nc" data-group-id="6150329507-22">Cldr.LanguageTag</span><span class="p" data-group-id="6150329507-22">{</span><span class="w"> </span><span class="p" data-group-id="6487208524-22">%</span><span class="nc" data-group-id="6487208524-22">Cldr.LanguageTag</span><span class="p" data-group-id="6487208524-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="6150329507-23">[</span><span class="p" data-group-id="6150329507-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="6487208524-23">[</span><span class="p" data-group-id="6487208524-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="6150329507-24">%{</span><span class="p" data-group-id="6150329507-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="6487208524-24">%{</span><span class="p" data-group-id="6487208524-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="6150329507-25">%{</span><span class="p" data-group-id="6150329507-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="6487208524-25">%{</span><span class="p" data-group-id="6487208524-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="6150329507-26">[</span><span class="p" data-group-id="6150329507-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="6487208524-26">[</span><span class="p" data-group-id="6487208524-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="6150329507-27">%{</span><span class="p" data-group-id="6150329507-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="6487208524-27">%{</span><span class="p" data-group-id="6487208524-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="6150329507-28">[</span><span class="p" data-group-id="6150329507-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="6487208524-28">[</span><span class="p" data-group-id="6487208524-28">]</span><span class="w">
</span><span class="p" data-group-id="6150329507-22">}</span><span class="p" data-group-id="6150329507-21">}</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="6487208524-22">}</span><span class="p" data-group-id="6487208524-21">}</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="6150329507-29">{</span><span class="mf">0.3</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="6487208524-29">{</span><span class="mf">0.3</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="6150329507-30">%</span><span class="nc" data-group-id="6150329507-30">Cldr.LanguageTag</span><span class="p" data-group-id="6150329507-30">{</span><span class="w"> </span><span class="p" data-group-id="6487208524-30">%</span><span class="nc" data-group-id="6487208524-30">Cldr.LanguageTag</span><span class="p" data-group-id="6487208524-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="6150329507-31">[</span><span class="p" data-group-id="6150329507-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="6487208524-31">[</span><span class="p" data-group-id="6487208524-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="6150329507-32">%{</span><span class="p" data-group-id="6150329507-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="6487208524-32">%{</span><span class="p" data-group-id="6487208524-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="6150329507-33">%{</span><span class="p" data-group-id="6150329507-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="6487208524-33">%{</span><span class="p" data-group-id="6487208524-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="6150329507-34">[</span><span class="p" data-group-id="6150329507-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="6487208524-34">[</span><span class="p" data-group-id="6487208524-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="6150329507-35">%{</span><span class="p" data-group-id="6150329507-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="6487208524-35">%{</span><span class="p" data-group-id="6487208524-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="6150329507-36">[</span><span class="p" data-group-id="6150329507-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="6487208524-36">[</span><span class="p" data-group-id="6487208524-36">]</span><span class="w">
</span><span class="p" data-group-id="6150329507-30">}</span><span class="p" data-group-id="6150329507-29">}</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="6487208524-30">}</span><span class="p" data-group-id="6487208524-29">}</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="6150329507-37">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="6487208524-37">{</span><span class="ss">:error</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="6150329507-38">{</span><span class="nc">Cldr.LanguageTag.ParseError</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="6487208524-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="6150329507-38">}</span><span class="p" data-group-id="6150329507-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="6487208524-38">}</span><span class="p" data-group-id="6487208524-37">}</span><span class="w">
</span><span class="p" data-group-id="6150329507-20">]</span></code></pre> </span><span class="p" data-group-id="6487208524-20">]</span></code></pre>
</section> </section>
</section> </section>

View File

@ -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="0614393340-1">%</span><span class="nc" data-group-id="0614393340-1">Cldr.Currency</span><span class="p" data-group-id="0614393340-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="1057905170-1">%</span><span class="nc" data-group-id="1057905170-1">Cldr.Currency</span><span class="p" data-group-id="1057905170-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="0614393340-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="0614393340-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="1057905170-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="1057905170-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="0614393340-1">}</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1057905170-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="0614393340-3">%</span><span class="nc" data-group-id="0614393340-3">Cldr.Currency</span><span class="p" data-group-id="0614393340-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="1057905170-3">%</span><span class="nc" data-group-id="1057905170-3">Cldr.Currency</span><span class="p" data-group-id="1057905170-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="0614393340-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="0614393340-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="1057905170-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="1057905170-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="0614393340-3">}</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1057905170-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>
@ -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="5406609983-1">%</span><span class="nc" data-group-id="5406609983-1">Cldr.Currency</span><span class="p" data-group-id="5406609983-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="8987448394-1">%</span><span class="nc" data-group-id="8987448394-1">Cldr.Currency</span><span class="p" data-group-id="8987448394-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="5406609983-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="5406609983-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="8987448394-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="8987448394-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="5406609983-1">}</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="8987448394-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="5406609983-3">%</span><span class="nc" data-group-id="5406609983-3">Cldr.Currency</span><span class="p" data-group-id="5406609983-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="8987448394-3">%</span><span class="nc" data-group-id="8987448394-3">Cldr.Currency</span><span class="p" data-group-id="8987448394-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="5406609983-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="5406609983-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="8987448394-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="8987448394-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="5406609983-3">}</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="8987448394-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>
@ -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="8818985754-1">(</span><span class="s">&quot;AUD&quot;</span><span class="p" data-group-id="8818985754-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="1377924107-1">(</span><span class="s">&quot;AUD&quot;</span><span class="p" data-group-id="1377924107-1">)</span><span class="w">
</span><span class="p" data-group-id="8818985754-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1377924107-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="8818985754-3">%</span><span class="nc" data-group-id="8818985754-3">Cldr.Currency</span><span class="p" data-group-id="8818985754-3">{</span><span class="w"> </span><span class="p" data-group-id="1377924107-3">%</span><span class="nc" data-group-id="1377924107-3">Cldr.Currency</span><span class="p" data-group-id="1377924107-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="8818985754-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="8818985754-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="1377924107-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="1377924107-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="8818985754-3">}</span><span class="p" data-group-id="8818985754-2">}</span><span class="w"> </span><span class="p" data-group-id="1377924107-3">}</span><span class="p" data-group-id="1377924107-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="8818985754-5">(</span><span class="s">&quot;THB&quot;</span><span class="p" data-group-id="8818985754-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="1377924107-5">(</span><span class="s">&quot;THB&quot;</span><span class="p" data-group-id="1377924107-5">)</span><span class="w">
</span><span class="p" data-group-id="8818985754-6">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1377924107-6">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="8818985754-7">%</span><span class="nc" data-group-id="8818985754-7">Cldr.Currency</span><span class="p" data-group-id="8818985754-7">{</span><span class="w"> </span><span class="p" data-group-id="1377924107-7">%</span><span class="nc" data-group-id="1377924107-7">Cldr.Currency</span><span class="p" data-group-id="1377924107-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="8818985754-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="8818985754-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="1377924107-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="1377924107-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="8818985754-7">}</span><span class="p" data-group-id="8818985754-6">}</span></code></pre> </span><span class="p" data-group-id="1377924107-7">}</span><span class="p" data-group-id="1377924107-6">}</span></code></pre>
</section> </section>
</section> </section>
<section class="detail" id="currency_for_code!/2"> <section class="detail" id="currency_for_code!/2">
@ -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="3017980542-1">(</span><span class="s">&quot;AUD&quot;</span><span class="p" data-group-id="3017980542-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="9863731774-1">(</span><span class="s">&quot;AUD&quot;</span><span class="p" data-group-id="9863731774-1">)</span><span class="w">
</span><span class="p" data-group-id="3017980542-2">%</span><span class="nc" data-group-id="3017980542-2">Cldr.Currency</span><span class="p" data-group-id="3017980542-2">{</span><span class="w"> </span><span class="p" data-group-id="9863731774-2">%</span><span class="nc" data-group-id="9863731774-2">Cldr.Currency</span><span class="p" data-group-id="9863731774-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="3017980542-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="3017980542-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="9863731774-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="9863731774-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="3017980542-2">}</span><span class="w"> </span><span class="p" data-group-id="9863731774-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="3017980542-4">(</span><span class="s">&quot;THB&quot;</span><span class="p" data-group-id="3017980542-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="9863731774-4">(</span><span class="s">&quot;THB&quot;</span><span class="p" data-group-id="9863731774-4">)</span><span class="w">
</span><span class="p" data-group-id="3017980542-5">%</span><span class="nc" data-group-id="3017980542-5">Cldr.Currency</span><span class="p" data-group-id="3017980542-5">{</span><span class="w"> </span><span class="p" data-group-id="9863731774-5">%</span><span class="nc" data-group-id="9863731774-5">Cldr.Currency</span><span class="p" data-group-id="9863731774-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="3017980542-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="3017980542-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="9863731774-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="9863731774-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="3017980542-5">}</span></code></pre> </span><span class="p" data-group-id="9863731774-5">}</span></code></pre>
</section> </section>
</section> </section>
<section class="detail" id="currency_from_locale/1"> <section class="detail" id="currency_from_locale/1">
@ -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="6462733326-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="6462733326-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="9300235241-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="9300235241-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="6462733326-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="6462733326-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="9300235241-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="9300235241-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">
@ -770,13 +770,13 @@ 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">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="5456955570-1">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="0632325025-1">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="5456955570-2">%{</span><span class="w"> </span><span class="p" data-group-id="0632325025-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="5456955570-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="5456955570-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="0632325025-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="0632325025-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="5456955570-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="5456955570-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="0632325025-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="0632325025-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="5456955570-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="5456955570-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="0632325025-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="0632325025-5">}</span><span class="w">
</span><span class="p" data-group-id="5456955570-2">}</span><span class="w"> </span><span class="p" data-group-id="0632325025-2">}</span><span class="w">
</span><span class="p" data-group-id="5456955570-1">}</span></code></pre> </span><span class="p" data-group-id="0632325025-1">}</span></code></pre>
</section> </section>
</section> </section>
<section class="detail" id="currency_strings/3"> <section class="detail" id="currency_strings/3">
@ -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="3992862562-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="6447739878-1">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="3992862562-2">%{</span><span class="w"> </span><span class="p" data-group-id="6447739878-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="3992862562-2">}</span><span class="p" data-group-id="3992862562-1">}</span></code></pre> </span><span class="p" data-group-id="6447739878-2">}</span><span class="p" data-group-id="6447739878-1">}</span></code></pre>
</section> </section>
</section> </section>
<section class="detail" id="currency_strings!/3"> <section class="detail" id="currency_strings!/3">
@ -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="0045494764-1">%{</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="p" data-group-id="7313247183-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="0045494764-1">}</span></code></pre> </span><span class="p" data-group-id="7313247183-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">
@ -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="3609201203-1">(</span><span class="p" data-group-id="3609201203-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="1416028959-1">(</span><span class="p" data-group-id="1416028959-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="9017787257-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="9017787257-1">}</span><span class="w"> </span><span class="p" data-group-id="1896655764-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="1896655764-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="9017787257-2">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="9017787257-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="9017787257-3">}</span><span class="p" data-group-id="9017787257-2">}</span></code></pre> </span><span class="p" data-group-id="1896655764-2">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1896655764-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="1896655764-3">}</span><span class="p" data-group-id="1896655764-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="7354179683-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="7354179683-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="7091199155-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="7091199155-1">)</span><span class="w">
</span><span class="p" data-group-id="7354179683-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="7091199155-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="7354179683-3">%</span><span class="nc" data-group-id="7354179683-3">Cldr.Currency</span><span class="p" data-group-id="7354179683-3">{</span><span class="w"> </span><span class="p" data-group-id="7091199155-3">%</span><span class="nc" data-group-id="7091199155-3">Cldr.Currency</span><span class="p" data-group-id="7091199155-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="7354179683-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="7354179683-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="7091199155-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="7091199155-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="7354179683-3">}</span><span class="p" data-group-id="7354179683-2">}</span><span class="w"> </span><span class="p" data-group-id="7091199155-3">}</span><span class="p" data-group-id="7091199155-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="7354179683-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="7354179683-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="7091199155-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="7091199155-5">)</span><span class="w">
</span><span class="p" data-group-id="7354179683-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="7354179683-6">}</span><span class="w"> </span><span class="p" data-group-id="7091199155-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="7091199155-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="7354179683-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="7354179683-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="7091199155-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="7091199155-7">)</span><span class="w">
</span><span class="p" data-group-id="7354179683-8">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="7354179683-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="7354179683-9">}</span><span class="p" data-group-id="7354179683-8">}</span></code></pre> </span><span class="p" data-group-id="7091199155-8">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="7091199155-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="7091199155-9">}</span><span class="p" data-group-id="7091199155-8">}</span></code></pre>
</section> </section>
</section> </section>
<section class="detail" id="pluralize/3"> <section class="detail" id="pluralize/3">
@ -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="0472201337-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="0472201337-1">}</span><span class="w"> </span><span class="p" data-group-id="7921285809-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="7921285809-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="0472201337-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="0472201337-2">}</span><span class="w"> </span><span class="p" data-group-id="7921285809-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="7921285809-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="0472201337-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="0472201337-3">}</span><span class="w"> </span><span class="p" data-group-id="7921285809-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="7921285809-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="0472201337-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="0472201337-4">}</span><span class="w"> </span><span class="p" data-group-id="7921285809-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="7921285809-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="0472201337-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="0472201337-5">}</span></code></pre> </span><span class="p" data-group-id="7921285809-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="7921285809-5">}</span></code></pre>
</section> </section>
</section> </section>
<section class="detail" id="strings_for_currency/2"> <section class="detail" id="strings_for_currency/2">
@ -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="2993210244-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="2993210244-1">]</span></code></pre> </span><span class="p" data-group-id="6848688909-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="6848688909-1">]</span></code></pre>
</section> </section>
</section> </section>

View File

@ -291,16 +291,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="8075321955-1">(</span><span class="ss">:&quot;fr-CA&quot;</span><span class="p" data-group-id="8075321955-1">)</span><span class="w"> <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="7722264330-1">(</span><span class="ss">:&quot;fr-CA&quot;</span><span class="p" data-group-id="7722264330-1">)</span><span class="w">
</span><span class="p" data-group-id="8075321955-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="8075321955-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="8075321955-3">]</span><span class="p" data-group-id="8075321955-2">}</span><span class="w"> </span><span class="p" data-group-id="7722264330-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="7722264330-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="7722264330-3">]</span><span class="p" data-group-id="7722264330-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="8075321955-4">(</span><span class="ss">:nb</span><span class="p" data-group-id="8075321955-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="7722264330-4">(</span><span class="ss">:nb</span><span class="p" data-group-id="7722264330-4">)</span><span class="w">
</span><span class="p" data-group-id="8075321955-5">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="8075321955-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="8075321955-6">]</span><span class="p" data-group-id="8075321955-5">}</span></code></pre> </span><span class="p" data-group-id="7722264330-5">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="7722264330-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="7722264330-6">]</span><span class="p" data-group-id="7722264330-5">}</span></code></pre>
</section> </section>
</section> </section>
<section class="detail" id="fallback_locales/1"> <section class="detail" id="fallback_locales/1">
@ -356,20 +356,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="9822738808-1">(</span><span class="ss">:&quot;fr-CA&quot;</span><span class="p" data-group-id="9822738808-1">)</span><span class="w"> <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="9921604621-1">(</span><span class="ss">:&quot;fr-CA&quot;</span><span class="p" data-group-id="9921604621-1">)</span><span class="w">
</span><span class="p">=&gt;</span><span class="w"> </span><span class="p" data-group-id="9822738808-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="9921604621-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="9822738808-3">[</span><span class="p" data-group-id="9822738808-4">#</span><span class="nc" data-group-id="9822738808-4">Cldr.LanguageTag</span><span class="p" data-group-id="9822738808-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="9822738808-5">[</span><span class="n">validated</span><span class="p" data-group-id="9822738808-5">]</span><span class="p" data-group-id="9822738808-4">&gt;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="9822738808-6">#</span><span class="nc" data-group-id="9822738808-6">Cldr.LanguageTag</span><span class="p" data-group-id="9822738808-6">&lt;</span><span class="n">fr</span><span class="w"> </span><span class="p" data-group-id="9822738808-7">[</span><span class="n">validated</span><span class="p" data-group-id="9822738808-7">]</span><span class="p" data-group-id="9822738808-6">&gt;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="9921604621-3">[</span><span class="p" data-group-id="9921604621-4">#</span><span class="nc" data-group-id="9921604621-4">Cldr.LanguageTag</span><span class="p" data-group-id="9921604621-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="9921604621-5">[</span><span class="n">validated</span><span class="p" data-group-id="9921604621-5">]</span><span class="p" data-group-id="9921604621-4">&gt;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="9921604621-6">#</span><span class="nc" data-group-id="9921604621-6">Cldr.LanguageTag</span><span class="p" data-group-id="9921604621-6">&lt;</span><span class="n">fr</span><span class="w"> </span><span class="p" data-group-id="9921604621-7">[</span><span class="n">validated</span><span class="p" data-group-id="9921604621-7">]</span><span class="p" data-group-id="9921604621-6">&gt;</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="9822738808-8">#</span><span class="nc" data-group-id="9822738808-8">Cldr.LanguageTag</span><span class="p" data-group-id="9822738808-8">&lt;</span><span class="n">en</span><span class="w"> </span><span class="p" data-group-id="9822738808-9">[</span><span class="n">validated</span><span class="p" data-group-id="9822738808-9">]</span><span class="p" data-group-id="9822738808-8">&gt;</span><span class="p" data-group-id="9822738808-3">]</span><span class="p" data-group-id="9822738808-2">}</span><span class="w"> </span><span class="p" data-group-id="9921604621-8">#</span><span class="nc" data-group-id="9921604621-8">Cldr.LanguageTag</span><span class="p" data-group-id="9921604621-8">&lt;</span><span class="n">en</span><span class="w"> </span><span class="p" data-group-id="9921604621-9">[</span><span class="n">validated</span><span class="p" data-group-id="9921604621-9">]</span><span class="p" data-group-id="9921604621-8">&gt;</span><span class="p" data-group-id="9921604621-3">]</span><span class="p" data-group-id="9921604621-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="9822738808-10">(</span><span class="ss">:nb</span><span class="p" data-group-id="9822738808-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="9921604621-10">(</span><span class="ss">:nb</span><span class="p" data-group-id="9921604621-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="9822738808-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="9921604621-11">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="9822738808-12">[</span><span class="p" data-group-id="9822738808-13">#</span><span class="nc" data-group-id="9822738808-13">Cldr.LanguageTag</span><span class="p" data-group-id="9822738808-13">&lt;</span><span class="n">nb</span><span class="w"> </span><span class="p" data-group-id="9822738808-14">[</span><span class="n">validated</span><span class="p" data-group-id="9822738808-14">]</span><span class="p" data-group-id="9822738808-13">&gt;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="9822738808-15">#</span><span class="nc" data-group-id="9822738808-15">Cldr.LanguageTag</span><span class="p" data-group-id="9822738808-15">&lt;</span><span class="n">no</span><span class="w"> </span><span class="p" data-group-id="9822738808-16">[</span><span class="n">validated</span><span class="p" data-group-id="9822738808-16">]</span><span class="p" data-group-id="9822738808-15">&gt;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="9921604621-12">[</span><span class="p" data-group-id="9921604621-13">#</span><span class="nc" data-group-id="9921604621-13">Cldr.LanguageTag</span><span class="p" data-group-id="9921604621-13">&lt;</span><span class="n">nb</span><span class="w"> </span><span class="p" data-group-id="9921604621-14">[</span><span class="n">validated</span><span class="p" data-group-id="9921604621-14">]</span><span class="p" data-group-id="9921604621-13">&gt;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="9921604621-15">#</span><span class="nc" data-group-id="9921604621-15">Cldr.LanguageTag</span><span class="p" data-group-id="9921604621-15">&lt;</span><span class="n">no</span><span class="w"> </span><span class="p" data-group-id="9921604621-16">[</span><span class="n">validated</span><span class="p" data-group-id="9921604621-16">]</span><span class="p" data-group-id="9921604621-15">&gt;</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="9822738808-17">#</span><span class="nc" data-group-id="9822738808-17">Cldr.LanguageTag</span><span class="p" data-group-id="9822738808-17">&lt;</span><span class="n">en</span><span class="w"> </span><span class="p" data-group-id="9822738808-18">[</span><span class="n">validated</span><span class="p" data-group-id="9822738808-18">]</span><span class="p" data-group-id="9822738808-17">&gt;</span><span class="p" data-group-id="9822738808-12">]</span><span class="p" data-group-id="9822738808-11">}</span></code></pre> </span><span class="p" data-group-id="9921604621-17">#</span><span class="nc" data-group-id="9921604621-17">Cldr.LanguageTag</span><span class="p" data-group-id="9921604621-17">&lt;</span><span class="n">en</span><span class="w"> </span><span class="p" data-group-id="9921604621-18">[</span><span class="n">validated</span><span class="p" data-group-id="9921604621-18">]</span><span class="p" data-group-id="9921604621-17">&gt;</span><span class="p" data-group-id="9921604621-12">]</span><span class="p" data-group-id="9921604621-11">}</span></code></pre>
</section> </section>
</section> </section>
<section class="detail" id="locale_for_territory/1"> <section class="detail" id="locale_for_territory/1">
@ -500,15 +500,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="6688923799-1">(</span><span class="ss">:&quot;en-AU&quot;</span><span class="p" data-group-id="6688923799-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="5607978277-1">(</span><span class="ss">:&quot;en-AU&quot;</span><span class="p" data-group-id="5607978277-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="6688923799-2">(</span><span class="s">&quot;a.b.com.tv&quot;</span><span class="p" data-group-id="6688923799-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="5607978277-2">(</span><span class="s">&quot;a.b.com.tv&quot;</span><span class="p" data-group-id="5607978277-2">)</span><span class="w">
</span><span class="p" data-group-id="6688923799-3">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="5607978277-3">{</span><span class="ss">:error</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="6688923799-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="6688923799-4">}</span><span class="p" data-group-id="6688923799-3">}</span><span class="w"> </span><span class="p" data-group-id="5607978277-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="5607978277-4">}</span><span class="p" data-group-id="5607978277-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="6688923799-5">(</span><span class="s">&quot;a.b.com&quot;</span><span class="p" data-group-id="6688923799-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="5607978277-5">(</span><span class="s">&quot;a.b.com&quot;</span><span class="p" data-group-id="5607978277-5">)</span><span class="w">
</span><span class="p" data-group-id="6688923799-6">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="5607978277-6">{</span><span class="ss">:error</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="6688923799-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="6688923799-7">}</span><span class="p" data-group-id="6688923799-6">}</span></code></pre> </span><span class="p" data-group-id="5607978277-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="5607978277-7">}</span><span class="p" data-group-id="5607978277-6">}</span></code></pre>
</section> </section>
</section> </section>
<section class="detail" id="new/1"> <section class="detail" id="new/1">
@ -602,12 +602,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="1002262160-1">(</span><span class="s">&quot;a.b.com.au&quot;</span><span class="p" data-group-id="1002262160-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="6530940595-1">(</span><span class="s">&quot;a.b.com.au&quot;</span><span class="p" data-group-id="6530940595-1">)</span><span class="w">
</span><span class="p" data-group-id="1002262160-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="1002262160-2">}</span><span class="w"> </span><span class="p" data-group-id="6530940595-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="6530940595-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="1002262160-3">(</span><span class="s">&quot;a.b.com&quot;</span><span class="p" data-group-id="1002262160-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="6530940595-3">(</span><span class="s">&quot;a.b.com&quot;</span><span class="p" data-group-id="6530940595-3">)</span><span class="w">
</span><span class="p" data-group-id="1002262160-4">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="6530940595-4">{</span><span class="ss">:error</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="1002262160-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="1002262160-5">}</span><span class="p" data-group-id="1002262160-4">}</span></code></pre> </span><span class="p" data-group-id="6530940595-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="6530940595-5">}</span><span class="p" data-group-id="6530940595-4">}</span></code></pre>
</section> </section>
</section> </section>
<section class="detail" id="territory_from_locale/1"> <section class="detail" id="territory_from_locale/1">

View File

@ -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="8654858101-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="8654858101-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="6725509128-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="6725509128-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="8654858101-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="8654858101-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="6725509128-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="6725509128-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="8654858101-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="8654858101-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="6725509128-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="6725509128-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="8654858101-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="8654858101-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="6725509128-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="6725509128-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="8654858101-5">(</span><span class="mi">1</span><span class="p" data-group-id="8654858101-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="8654858101-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="8654858101-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="6725509128-5">(</span><span class="mi">1</span><span class="p" data-group-id="6725509128-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="6725509128-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="6725509128-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="8654858101-7">(</span><span class="mi">2</span><span class="p" data-group-id="8654858101-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="8654858101-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="8654858101-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="6725509128-7">(</span><span class="mi">2</span><span class="p" data-group-id="6725509128-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="6725509128-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="6725509128-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="8654858101-9">(</span><span class="mi">2</span><span class="p" data-group-id="8654858101-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="8654858101-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="8654858101-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="6725509128-9">(</span><span class="mi">2</span><span class="p" data-group-id="6725509128-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="6725509128-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="6725509128-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="8654858101-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="8654858101-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="6725509128-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="6725509128-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="8654858101-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="8654858101-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="6725509128-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="6725509128-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

@ -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="7191527262-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="0224220981-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="7191527262-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="0224220981-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">
@ -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="8631473078-1">(</span><span class="ss">:en</span><span class="p" data-group-id="8631473078-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="6742508645-1">(</span><span class="ss">:en</span><span class="p" data-group-id="6742508645-1">)</span><span class="w">
</span><span class="p" data-group-id="8631473078-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="8631473078-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="6742508645-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="6742508645-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="8631473078-3">]</span><span class="p" data-group-id="8631473078-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="6742508645-3">]</span><span class="p" data-group-id="6742508645-2">}</span></code></pre>
</section> </section>
</section> </section>
<section class="detail" id="default_grouping_for/1"> <section class="detail" id="default_grouping_for/1">
@ -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="1466207481-1">(</span><span class="ss">:en</span><span class="p" data-group-id="1466207481-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="9226799297-1">(</span><span class="ss">:en</span><span class="p" data-group-id="9226799297-1">)</span><span class="w">
</span><span class="p" data-group-id="1466207481-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1466207481-3">%{</span><span class="ss">fraction</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="1466207481-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="1466207481-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="1466207481-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="1466207481-5">}</span><span class="p" data-group-id="1466207481-3">}</span><span class="p" data-group-id="1466207481-2">}</span></code></pre> </span><span class="p" data-group-id="9226799297-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="9226799297-3">%{</span><span class="ss">fraction</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="9226799297-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="9226799297-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="9226799297-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="9226799297-5">}</span><span class="p" data-group-id="9226799297-3">}</span><span class="p" data-group-id="9226799297-2">}</span></code></pre>
</section> </section>
</section> </section>
<section class="detail" id="default_grouping_for!/1"> <section class="detail" id="default_grouping_for!/1">
@ -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="7670173529-1">(</span><span class="ss">:en</span><span class="p" data-group-id="7670173529-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="6897066128-1">(</span><span class="ss">:en</span><span class="p" data-group-id="6897066128-1">)</span><span class="w">
</span><span class="p" data-group-id="7670173529-2">%{</span><span class="ss">fraction</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="7670173529-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="7670173529-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="7670173529-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="7670173529-4">}</span><span class="p" data-group-id="7670173529-2">}</span></code></pre> </span><span class="p" data-group-id="6897066128-2">%{</span><span class="ss">fraction</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="6897066128-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="6897066128-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="6897066128-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="6897066128-4">}</span><span class="p" data-group-id="6897066128-2">}</span></code></pre>
</section> </section>
</section> </section>
<section class="detail" id="formats_for/2"> <section class="detail" id="formats_for/2">
@ -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="2952786956-1">[</span><span class="p" data-group-id="2952786956-2">{</span><span class="s">&quot;1000&quot;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="2952786956-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="2952786956-3">]</span><span class="p" data-group-id="2952786956-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="1744306169-1">[</span><span class="p" data-group-id="1744306169-2">{</span><span class="s">&quot;1000&quot;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1744306169-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="1744306169-3">]</span><span class="p" data-group-id="1744306169-2">}</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="2952786956-4">{</span><span class="s">&quot;10000&quot;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="2952786956-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="2952786956-5">]</span><span class="p" data-group-id="2952786956-4">}</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1744306169-4">{</span><span class="s">&quot;10000&quot;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1744306169-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="1744306169-5">]</span><span class="p" data-group-id="1744306169-4">}</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="2952786956-6">{</span><span class="s">&quot;100000&quot;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="2952786956-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="2952786956-7">]</span><span class="p" data-group-id="2952786956-6">}</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1744306169-6">{</span><span class="s">&quot;100000&quot;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1744306169-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="1744306169-7">]</span><span class="p" data-group-id="1744306169-6">}</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="2952786956-8">{</span><span class="s">&quot;1000000&quot;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="2952786956-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="2952786956-9">]</span><span class="p" data-group-id="2952786956-8">}</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1744306169-8">{</span><span class="s">&quot;1000000&quot;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1744306169-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="1744306169-9">]</span><span class="p" data-group-id="1744306169-8">}</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="2952786956-10">{</span><span class="s">&quot;10000000&quot;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="2952786956-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="2952786956-11">]</span><span class="p" data-group-id="2952786956-10">}</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1744306169-10">{</span><span class="s">&quot;10000000&quot;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1744306169-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="1744306169-11">]</span><span class="p" data-group-id="1744306169-10">}</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="2952786956-12">{</span><span class="s">&quot;100000000&quot;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="2952786956-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="2952786956-13">]</span><span class="p" data-group-id="2952786956-12">}</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1744306169-12">{</span><span class="s">&quot;100000000&quot;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1744306169-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="1744306169-13">]</span><span class="p" data-group-id="1744306169-12">}</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="2952786956-14">{</span><span class="s">&quot;1000000000&quot;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="2952786956-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="2952786956-15">]</span><span class="p" data-group-id="2952786956-14">}</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1744306169-14">{</span><span class="s">&quot;1000000000&quot;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1744306169-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="1744306169-15">]</span><span class="p" data-group-id="1744306169-14">}</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="2952786956-16">{</span><span class="s">&quot;10000000000&quot;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="2952786956-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="2952786956-17">]</span><span class="p" data-group-id="2952786956-16">}</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1744306169-16">{</span><span class="s">&quot;10000000000&quot;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1744306169-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="1744306169-17">]</span><span class="p" data-group-id="1744306169-16">}</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="2952786956-18">{</span><span class="s">&quot;100000000000&quot;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="2952786956-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="2952786956-19">]</span><span class="p" data-group-id="2952786956-18">}</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1744306169-18">{</span><span class="s">&quot;100000000000&quot;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1744306169-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="1744306169-19">]</span><span class="p" data-group-id="1744306169-18">}</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="2952786956-20">{</span><span class="s">&quot;1000000000000&quot;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="2952786956-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="2952786956-21">]</span><span class="p" data-group-id="2952786956-20">}</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1744306169-20">{</span><span class="s">&quot;1000000000000&quot;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1744306169-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="1744306169-21">]</span><span class="p" data-group-id="1744306169-20">}</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="2952786956-22">{</span><span class="s">&quot;10000000000000&quot;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="2952786956-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="2952786956-23">]</span><span class="p" data-group-id="2952786956-22">}</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1744306169-22">{</span><span class="s">&quot;10000000000000&quot;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1744306169-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="1744306169-23">]</span><span class="p" data-group-id="1744306169-22">}</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="2952786956-24">{</span><span class="s">&quot;100000000000000&quot;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="2952786956-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="2952786956-25">]</span><span class="p" data-group-id="2952786956-24">}</span><span class="p" data-group-id="2952786956-1">]</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1744306169-24">{</span><span class="s">&quot;100000000000000&quot;</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1744306169-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="1744306169-25">]</span><span class="p" data-group-id="1744306169-24">}</span><span class="p" data-group-id="1744306169-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>
@ -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="5605650117-1">(</span><span class="s">&quot;en&quot;</span><span class="p" data-group-id="5605650117-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="3061454577-1">(</span><span class="s">&quot;en&quot;</span><span class="p" data-group-id="3061454577-1">)</span><span class="w">
</span><span class="p" data-group-id="5605650117-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="5605650117-2">}</span></code></pre> </span><span class="p" data-group-id="3061454577-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="3061454577-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">
@ -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="4783582037-1">(</span><span class="s">&quot;en&quot;</span><span class="p" data-group-id="4783582037-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="7008987439-1">(</span><span class="s">&quot;en&quot;</span><span class="p" data-group-id="7008987439-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

@ -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="3624525366-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="3624525366-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="4177136385-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="4177136385-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="3624525366-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="3624525366-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="4177136385-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="4177136385-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="3624525366-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="3624525366-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="4177136385-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="4177136385-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="3624525366-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="3624525366-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="4177136385-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="4177136385-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="3624525366-5">(</span><span class="mi">1</span><span class="p" data-group-id="3624525366-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="3624525366-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="3624525366-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="4177136385-5">(</span><span class="mi">1</span><span class="p" data-group-id="4177136385-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="4177136385-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="4177136385-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="3624525366-7">(</span><span class="mi">2</span><span class="p" data-group-id="3624525366-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="3624525366-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="3624525366-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="4177136385-7">(</span><span class="mi">2</span><span class="p" data-group-id="4177136385-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="4177136385-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="4177136385-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="3624525366-9">(</span><span class="mi">2</span><span class="p" data-group-id="3624525366-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="3624525366-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="3624525366-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="4177136385-9">(</span><span class="mi">2</span><span class="p" data-group-id="4177136385-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="4177136385-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="4177136385-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="3624525366-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="3624525366-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="4177136385-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="4177136385-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="3624525366-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="3624525366-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="4177136385-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="4177136385-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

@ -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="6098094292-1">(</span><span class="ss">:th</span><span class="p" data-group-id="6098094292-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="9114288670-1">(</span><span class="ss">:th</span><span class="p" data-group-id="9114288670-1">)</span><span class="w">
</span><span class="p" data-group-id="6098094292-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="6098094292-3">%{</span><span class="w"> </span><span class="p" data-group-id="9114288670-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="9114288670-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="6098094292-4">%</span><span class="nc" data-group-id="6098094292-4">Cldr.Number.Symbol</span><span class="p" data-group-id="6098094292-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="9114288670-4">%</span><span class="nc" data-group-id="9114288670-4">Cldr.Number.Symbol</span><span class="p" data-group-id="9114288670-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="6098094292-4">}</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="9114288670-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="6098094292-5">%</span><span class="nc" data-group-id="6098094292-5">Cldr.Number.Symbol</span><span class="p" data-group-id="6098094292-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="9114288670-5">%</span><span class="nc" data-group-id="9114288670-5">Cldr.Number.Symbol</span><span class="p" data-group-id="9114288670-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="6098094292-5">}</span><span class="w"> </span><span class="p" data-group-id="9114288670-5">}</span><span class="w">
</span><span class="p" data-group-id="6098094292-3">}</span><span class="p" data-group-id="6098094292-2">}</span></code></pre> </span><span class="p" data-group-id="9114288670-3">}</span><span class="p" data-group-id="9114288670-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

@ -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="8309564722-1">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="8309564722-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="8309564722-2">}</span><span class="p" data-group-id="8309564722-1">}</span><span class="w"> </span><span class="p" data-group-id="8472671185-1">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="8472671185-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="8472671185-2">}</span><span class="p" data-group-id="8472671185-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="8309564722-3">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="8309564722-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="8309564722-4">}</span><span class="p" data-group-id="8309564722-3">}</span><span class="w"> </span><span class="p" data-group-id="8472671185-3">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="8472671185-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="8472671185-4">}</span><span class="p" data-group-id="8472671185-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="8309564722-5">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="8309564722-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="8309564722-6">}</span><span class="p" data-group-id="8309564722-5">}</span><span class="w"> </span><span class="p" data-group-id="8472671185-5">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="8472671185-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="8472671185-6">}</span><span class="p" data-group-id="8472671185-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="8309564722-7">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="8309564722-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="8309564722-8">}</span><span class="p" data-group-id="8309564722-7">}</span><span class="w"> </span><span class="p" data-group-id="8472671185-7">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="8472671185-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="8472671185-8">}</span><span class="p" data-group-id="8472671185-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="8309564722-9">{</span><span class="w"> </span><span class="p" data-group-id="8472671185-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="8309564722-10">{</span><span class="nc">Cldr.UnknownNumberSystemError</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="8472671185-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="8309564722-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="8472671185-10">}</span><span class="w">
</span><span class="p" data-group-id="8309564722-9">}</span></code></pre> </span><span class="p" data-group-id="8472671185-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">
@ -397,10 +397,10 @@ or a <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.LanguageTag.html"><code cla
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="6996424563-1">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="6996424563-2">[</span><span class="ss">:latn</span><span class="p" data-group-id="6996424563-2">]</span><span class="p" data-group-id="6996424563-1">}</span><span class="w"> </span><span class="p" data-group-id="1738497248-1">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1738497248-2">[</span><span class="ss">:latn</span><span class="p" data-group-id="1738497248-2">]</span><span class="p" data-group-id="1738497248-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="6996424563-3">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="6996424563-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="6996424563-4">}</span><span class="p" data-group-id="6996424563-3">}</span></code></pre> </span><span class="p" data-group-id="1738497248-3">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1738497248-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="1738497248-4">}</span><span class="p" data-group-id="1738497248-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">
@ -482,13 +482,13 @@ or a <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.LanguageTag.html"><code cla
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="0089553831-1">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="0089553831-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="0089553831-2">}</span><span class="p" data-group-id="0089553831-1">}</span><span class="w"> </span><span class="p" data-group-id="1003928716-1">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1003928716-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="1003928716-2">}</span><span class="p" data-group-id="1003928716-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="0089553831-3">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="0089553831-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="0089553831-4">}</span><span class="p" data-group-id="0089553831-3">}</span><span class="w"> </span><span class="p" data-group-id="1003928716-3">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1003928716-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="1003928716-4">}</span><span class="p" data-group-id="1003928716-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="0089553831-5">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="0089553831-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="0089553831-6">}</span><span class="p" data-group-id="0089553831-5">}</span></code></pre> </span><span class="p" data-group-id="1003928716-5">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1003928716-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="1003928716-6">}</span><span class="p" data-group-id="1003928716-5">}</span></code></pre>
</section> </section>
</section> </section>
<section class="detail" id="number_systems_for!/1"> <section class="detail" id="number_systems_for!/1">
@ -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="2681636064-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="2681636064-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="1821423305-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="1821423305-1">)</span><span class="w">
</span><span class="p" data-group-id="2681636064-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="2681636064-2">}</span><span class="w"> </span><span class="p" data-group-id="1821423305-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="1821423305-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="2681636064-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="2681636064-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="1821423305-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="1821423305-3">)</span><span class="w">
</span><span class="p" data-group-id="2681636064-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="2681636064-4">}</span><span class="w"> </span><span class="p" data-group-id="1821423305-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="1821423305-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="2681636064-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="2681636064-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="1821423305-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="1821423305-5">)</span><span class="w">
</span><span class="p" data-group-id="2681636064-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="2681636064-6">}</span><span class="w"> </span><span class="p" data-group-id="1821423305-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="1821423305-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="2681636064-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="2681636064-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="1821423305-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="1821423305-7">)</span><span class="w">
</span><span class="p" data-group-id="2681636064-8">{</span><span class="w"> </span><span class="p" data-group-id="1821423305-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="2681636064-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="2681636064-9">}</span><span class="w"> </span><span class="p" data-group-id="1821423305-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="1821423305-9">}</span><span class="w">
</span><span class="p" data-group-id="2681636064-8">}</span></code></pre><p>Note that return value is not guaranteed to be a valid </span><span class="p" data-group-id="1821423305-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>
@ -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="4877774096-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="4877774096-1">}</span><span class="w"> </span><span class="p" data-group-id="5295227456-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="5295227456-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="4877774096-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="4877774096-2">}</span><span class="w"> </span><span class="p" data-group-id="5295227456-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="5295227456-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="4877774096-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="4877774096-3">}</span><span class="w"> </span><span class="p" data-group-id="5295227456-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="5295227456-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="4877774096-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="4877774096-4">}</span></code></pre> </span><span class="p" data-group-id="5295227456-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="5295227456-4">}</span></code></pre>
</section> </section>
</section> </section>
<section class="detail" id="to_system!/2"> <section class="detail" id="to_system!/2">

View File

@ -133,12 +133,12 @@ digits between number systems. For example from :arabic to :latn. Since genera
transliteration map is slow, pairs of transliterations can be configured so that the transliteration map is 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="6556505585-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="2552659009-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="6556505585-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="6556505585-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="2552659009-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="2552659009-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="6556505585-3">[</span><span class="p" data-group-id="6556505585-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="6556505585-4">}</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="6556505585-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="6556505585-5">}</span><span class="p" data-group-id="6556505585-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="2552659009-3">[</span><span class="p" data-group-id="2552659009-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="2552659009-4">}</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="2552659009-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="2552659009-5">}</span><span class="p" data-group-id="2552659009-3">]</span><span class="w">
</span><span class="k" data-group-id="6556505585-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="2552659009-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.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
precompilation, a warning is logged.</p> precompilation, a warning is logged.</p>
</section> </section>
@ -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="9063850648-1">(</span><span class="s">&quot;123556&quot;</span><span class="p" data-group-id="9063850648-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="1210294230-1">(</span><span class="s">&quot;123556&quot;</span><span class="p" data-group-id="1210294230-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="9063850648-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="9063850648-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="1210294230-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="1210294230-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="9063850648-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="9063850648-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="1210294230-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="1210294230-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="9063850648-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="9063850648-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="1210294230-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="1210294230-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="9063850648-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="9063850648-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="1210294230-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="1210294230-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="9063850648-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="9063850648-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="1210294230-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="1210294230-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>

View File

@ -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="1734008544-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="1734008544-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="9752759572-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="9752759572-1">)</span><span class="w">
</span><span class="p" data-group-id="1734008544-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="1734008544-2">}</span><span class="w"> </span><span class="p" data-group-id="9752759572-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="9752759572-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="1734008544-3">(</span><span class="s">&quot;-1_000_000.34&quot;</span><span class="p" data-group-id="1734008544-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="9752759572-3">(</span><span class="s">&quot;-1_000_000.34&quot;</span><span class="p" data-group-id="9752759572-3">)</span><span class="w">
</span><span class="p" data-group-id="1734008544-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="1734008544-4">}</span><span class="w"> </span><span class="p" data-group-id="9752759572-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="9752759572-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="1734008544-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="1734008544-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="9752759572-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="9752759572-5">)</span><span class="w">
</span><span class="p" data-group-id="1734008544-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="1734008544-6">}</span><span class="w"> </span><span class="p" data-group-id="9752759572-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="9752759572-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="1734008544-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="1734008544-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="9752759572-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="9752759572-7">)</span><span class="w">
</span><span class="p" data-group-id="1734008544-8">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="9752759572-8">{</span><span class="ss">:error</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="1734008544-9">{</span><span class="nc">Cldr.Number.ParseError</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="9752759572-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="1734008544-9">}</span><span class="p" data-group-id="1734008544-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="9752759572-9">}</span><span class="p" data-group-id="9752759572-8">}</span></code></pre>
</section> </section>
</section> </section>
<section class="detail" id="resolve_currencies/2"> <section class="detail" id="resolve_currencies/2">
@ -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="8277106450-1">(</span><span class="s">&quot;100 US dollars&quot;</span><span class="p" data-group-id="8277106450-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="1824914833-1">(</span><span class="s">&quot;100 US dollars&quot;</span><span class="p" data-group-id="1824914833-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="8277106450-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="8277106450-2">]</span><span class="w"> </span><span class="p" data-group-id="1824914833-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="1824914833-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="8277106450-3">(</span><span class="s">&quot;100 eurosports&quot;</span><span class="p" data-group-id="8277106450-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="1824914833-3">(</span><span class="s">&quot;100 eurosports&quot;</span><span class="p" data-group-id="1824914833-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="8277106450-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="8277106450-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="1824914833-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="1824914833-4">)</span><span class="w">
</span><span class="p" data-group-id="8277106450-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="8277106450-5">]</span><span class="w"> </span><span class="p" data-group-id="1824914833-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="1824914833-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="8277106450-6">(</span><span class="s">&quot;100 dollars des États-Unis&quot;</span><span class="p" data-group-id="8277106450-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="1824914833-6">(</span><span class="s">&quot;100 dollars des États-Unis&quot;</span><span class="p" data-group-id="1824914833-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="8277106450-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="8277106450-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="1824914833-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="1824914833-7">)</span><span class="w">
</span><span class="p" data-group-id="8277106450-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="8277106450-8">]</span></code></pre> </span><span class="p" data-group-id="1824914833-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="1824914833-8">]</span></code></pre>
</section> </section>
</section> </section>
<section class="detail" id="resolve_currency/2"> <section class="detail" id="resolve_currency/2">
@ -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="6908011607-1">(</span><span class="s">&quot;US dollars&quot;</span><span class="p" data-group-id="6908011607-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="9575805685-1">(</span><span class="s">&quot;US dollars&quot;</span><span class="p" data-group-id="9575805685-1">)</span><span class="w">
</span><span class="p" data-group-id="6908011607-2">[</span><span class="ss">:USD</span><span class="p" data-group-id="6908011607-2">]</span><span class="w"> </span><span class="p" data-group-id="9575805685-2">[</span><span class="ss">:USD</span><span class="p" data-group-id="9575805685-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="6908011607-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="6908011607-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="9575805685-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="9575805685-3">)</span><span class="w">
</span><span class="p" data-group-id="6908011607-4">[</span><span class="ss">:EUR</span><span class="p" data-group-id="6908011607-4">]</span><span class="w"> </span><span class="p" data-group-id="9575805685-4">[</span><span class="ss">:EUR</span><span class="p" data-group-id="9575805685-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="6908011607-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="6908011607-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="9575805685-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="9575805685-5">)</span><span class="w">
</span><span class="p" data-group-id="6908011607-6">[</span><span class="ss">:USD</span><span class="p" data-group-id="6908011607-6">]</span><span class="w"> </span><span class="p" data-group-id="9575805685-6">[</span><span class="ss">:USD</span><span class="p" data-group-id="9575805685-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="6908011607-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="6908011607-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="9575805685-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="9575805685-7">)</span><span class="w">
</span><span class="p" data-group-id="6908011607-8">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="9575805685-8">{</span><span class="ss">:error</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="6908011607-9">{</span><span class="nc">Cldr.UnknownCurrencyError</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="9575805685-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="6908011607-9">}</span><span class="p" data-group-id="6908011607-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="9575805685-9">}</span><span class="p" data-group-id="9575805685-8">}</span></code></pre>
</section> </section>
</section> </section>
<section class="detail" id="resolve_per/2"> <section class="detail" id="resolve_per/2">
@ -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="7360264429-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="7360264429-1">]</span><span class="w"> </span><span class="p" data-group-id="9213056300-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="9213056300-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="7360264429-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="7360264429-2">]</span><span class="w"> </span><span class="p" data-group-id="9213056300-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="9213056300-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="7360264429-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="7360264429-3">]</span></code></pre> </span><span class="p" data-group-id="9213056300-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="9213056300-3">]</span></code></pre>
</section> </section>
</section> </section>
<section class="detail" id="resolve_pers/2"> <section class="detail" id="resolve_pers/2">
@ -724,9 +724,9 @@ The default is <code class="inline">options[:backend].get_locale()</code></li></
</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="8866464934-1">(</span><span class="s">&quot;100%&quot;</span><span class="p" data-group-id="8866464934-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="3058333674-1">(</span><span class="s">&quot;100%&quot;</span><span class="p" data-group-id="3058333674-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="8866464934-2">(</span><span class="p" data-group-id="8866464934-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="3058333674-2">(</span><span class="p" data-group-id="3058333674-2">)</span><span class="w">
</span><span class="p" data-group-id="8866464934-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="8866464934-3">]</span></code></pre> </span><span class="p" data-group-id="3058333674-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="3058333674-3">]</span></code></pre>
</section> </section>
</section> </section>
<section class="detail" id="scan/2"> <section class="detail" id="scan/2">
@ -786,20 +786,20 @@ and any options provided are passed to that function.</p><h2 id="scan/2-examples
</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="6325249177-1">(</span><span class="s">&quot;£1_000_000.34&quot;</span><span class="p" data-group-id="6325249177-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="9678593253-1">(</span><span class="s">&quot;£1_000_000.34&quot;</span><span class="p" data-group-id="9678593253-1">)</span><span class="w">
</span><span class="p" data-group-id="6325249177-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="6325249177-2">]</span><span class="w"> </span><span class="p" data-group-id="9678593253-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="9678593253-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="6325249177-3">(</span><span class="s">&quot;I want £1_000_000 dollars&quot;</span><span class="p" data-group-id="6325249177-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="9678593253-3">(</span><span class="s">&quot;I want £1_000_000 dollars&quot;</span><span class="p" data-group-id="9678593253-3">)</span><span class="w">
</span><span class="p" data-group-id="6325249177-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="6325249177-4">]</span><span class="w"> </span><span class="p" data-group-id="9678593253-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="9678593253-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="6325249177-5">(</span><span class="s">&quot;The prize is 23&quot;</span><span class="p" data-group-id="6325249177-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="9678593253-5">(</span><span class="s">&quot;The prize is 23&quot;</span><span class="p" data-group-id="9678593253-5">)</span><span class="w">
</span><span class="p" data-group-id="6325249177-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="6325249177-6">]</span><span class="w"> </span><span class="p" data-group-id="9678593253-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="9678593253-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="6325249177-7">(</span><span class="s">&quot;The lottery number is 23 for the next draw&quot;</span><span class="p" data-group-id="6325249177-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="9678593253-7">(</span><span class="s">&quot;The lottery number is 23 for the next draw&quot;</span><span class="p" data-group-id="9678593253-7">)</span><span class="w">
</span><span class="p" data-group-id="6325249177-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="6325249177-8">]</span><span class="w"> </span><span class="p" data-group-id="9678593253-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="9678593253-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="6325249177-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="6325249177-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="9678593253-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="9678593253-9">)</span><span class="w">
</span><span class="p" data-group-id="6325249177-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="6325249177-10">]</span></code></pre> </span><span class="p" data-group-id="9678593253-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="9678593253-10">]</span></code></pre>
</section> </section>
</section> </section>
<section class="detail" id="to_approx_string/2"> <section class="detail" id="to_approx_string/2">
@ -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="9851688106-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="9851688106-1">}</span></code></pre> </span><span class="p" data-group-id="4170424419-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="4170424419-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="8563148981-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="8563148981-1">}</span></code></pre> </span><span class="p" data-group-id="0259168363-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="0259168363-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">
@ -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="2236110740-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="2236110740-1">}</span></code></pre> </span><span class="p" data-group-id="7327437732-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="7327437732-1">}</span></code></pre>
</section> </section>
</section> </section>
<section class="detail" id="to_range_string/2"> <section class="detail" id="to_range_string/2">
@ -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="0178793946-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="0178793946-1">}</span></code></pre> </span><span class="p" data-group-id="8253366809-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="8253366809-1">}</span></code></pre>
</section> </section>
</section> </section>
<section class="detail" id="to_string/2"> <section class="detail" id="to_string/2">
@ -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="3348401021-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="3348401021-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="8011618404-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="8011618404-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="3348401021-2">end</span><span class="p" data-group-id="3348401021-1">)</span><span class="w"> </span><span class="gp unselectable">...&gt; </span><span class="k" data-group-id="8011618404-2">end</span><span class="p" data-group-id="8011618404-1">)</span><span class="w">
</span><span class="p" data-group-id="3348401021-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="3348401021-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="8011618404-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="8011618404-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="8181415794-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="8181415794-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="6470748564-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="6470748564-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="8181415794-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="8181415794-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="6470748564-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="6470748564-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="8181415794-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="8181415794-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="6470748564-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="6470748564-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="8181415794-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="8181415794-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="6470748564-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="6470748564-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="8181415794-2">end</span><span class="p" data-group-id="8181415794-1">)</span><span class="w"> </span><span class="gp unselectable">...&gt; </span><span class="k" data-group-id="6470748564-2">end</span><span class="p" data-group-id="6470748564-1">)</span><span class="w">
</span><span class="p" data-group-id="8181415794-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="8181415794-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="6470748564-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="6470748564-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="2664401280-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="2664401280-1">}</span><span class="w"> </span><span class="p" data-group-id="0731137455-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="0731137455-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="2664401280-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="2664401280-2">}</span><span class="w"> </span><span class="p" data-group-id="0731137455-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="0731137455-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="2664401280-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="2664401280-3">}</span><span class="w"> </span><span class="p" data-group-id="0731137455-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="0731137455-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="2664401280-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="2664401280-4">}</span><span class="w"> </span><span class="p" data-group-id="0731137455-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="0731137455-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="2664401280-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="2664401280-5">}</span><span class="w"> </span><span class="p" data-group-id="0731137455-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="0731137455-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="2664401280-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="2664401280-6">}</span><span class="w"> </span><span class="p" data-group-id="0731137455-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="0731137455-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="2664401280-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="2664401280-7">}</span><span class="w"> </span><span class="p" data-group-id="0731137455-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="0731137455-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="2664401280-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="2664401280-8">}</span><span class="w"> </span><span class="p" data-group-id="0731137455-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="0731137455-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="2664401280-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="2664401280-9">}</span><span class="w"> </span><span class="p" data-group-id="0731137455-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="0731137455-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="2664401280-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="2664401280-10">}</span><span class="w"> </span><span class="p" data-group-id="0731137455-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="0731137455-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="2664401280-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="2664401280-11">}</span><span class="w"> </span><span class="p" data-group-id="0731137455-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="0731137455-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="2664401280-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="2664401280-12">}</span><span class="w"> </span><span class="p" data-group-id="0731137455-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="0731137455-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="2664401280-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="2664401280-13">}</span><span class="w"> </span><span class="p" data-group-id="0731137455-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="0731137455-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="2664401280-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="2664401280-14">}</span><span class="w"> </span><span class="p" data-group-id="0731137455-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="0731137455-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="2664401280-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="2664401280-15">}</span><span class="w"> </span><span class="p" data-group-id="0731137455-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="0731137455-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="2664401280-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="2664401280-16">}</span><span class="w"> </span><span class="p" data-group-id="0731137455-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="0731137455-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="2664401280-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="2664401280-17">}</span><span class="w"> </span><span class="p" data-group-id="0731137455-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="0731137455-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="2664401280-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="2664401280-18">}</span><span class="w"> </span><span class="p" data-group-id="0731137455-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="0731137455-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="2664401280-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="2664401280-19">}</span><span class="w"> </span><span class="p" data-group-id="0731137455-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="0731137455-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="2664401280-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="2664401280-20">}</span></code></pre><h2 id="to_string/2-errors" class="section-heading"> </span><span class="p" data-group-id="0731137455-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="0731137455-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="4768601073-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="4768601073-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="5180593991-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="5180593991-1">)</span><span class="w">
</span><span class="p" data-group-id="4768601073-2">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="4768601073-3">{</span><span class="nc">Cldr.FormatCompileError</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="5180593991-2">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="5180593991-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="4768601073-3">}</span><span class="p" data-group-id="4768601073-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="5180593991-3">}</span><span class="p" data-group-id="5180593991-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="7962399825-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="7962399825-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="8028374293-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="8028374293-1">)</span><span class="w">
</span><span class="p" data-group-id="7962399825-2">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="7962399825-3">{</span><span class="nc">Cldr.UnknownFormatError</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="8028374293-2">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="8028374293-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="7962399825-3">}</span><span class="p" data-group-id="7962399825-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="8028374293-3">}</span><span class="p" data-group-id="8028374293-2">}</span></code></pre>
</section> </section>
</section> </section>
<section class="detail" id="to_string!/2"> <section class="detail" id="to_string!/2">
@ -1318,17 +1318,17 @@ returned by <a href="https://hexdocs.pm/ex_cldr/2.36.0/Cldr.html#known_number_sy
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="5977966146-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="5977966146-1">}</span><span class="w"> </span><span class="p" data-group-id="3989175309-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="3989175309-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="5977966146-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="5977966146-2">}</span><span class="w"> </span><span class="p" data-group-id="3989175309-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="3989175309-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="5977966146-3">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="3989175309-3">{</span><span class="ss">:error</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="5977966146-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="5977966146-4">}</span><span class="p" data-group-id="5977966146-3">}</span><span class="w"> </span><span class="p" data-group-id="3989175309-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="3989175309-4">}</span><span class="p" data-group-id="3989175309-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="5977966146-5">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="5977966146-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="5977966146-6">}</span><span class="p" data-group-id="5977966146-5">}</span></code></pre> </span><span class="p" data-group-id="3989175309-5">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="3989175309-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="3989175309-6">}</span><span class="p" data-group-id="3989175309-5">}</span></code></pre>
</section> </section>
</section> </section>

View File

@ -116,12 +116,12 @@ 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.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
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="1690941717-1">(</span><span class="ss">:und</span><span class="p" data-group-id="1690941717-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="3200866015-1">(</span><span class="ss">:und</span><span class="p" data-group-id="3200866015-1">)</span><span class="w">
</span><span class="p" data-group-id="1690941717-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="p" data-group-id="3200866015-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="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="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="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="1690941717-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="0099447088-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="0099447088-1">)</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="3200866015-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="9849855073-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="9849855073-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="8470050020-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="8470050020-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="5693647018-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="5693647018-1">)</span><span class="w">
</span><span class="p" data-group-id="8470050020-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="8470050020-2">}</span></code></pre> </span><span class="p" data-group-id="5693647018-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="5693647018-2">}</span></code></pre>
</section> </section>

View File

@ -116,19 +116,19 @@ 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.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
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="5914664122-1">(</span><span class="ss">:en</span><span class="p" data-group-id="5914664122-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="3689426028-1">(</span><span class="ss">:en</span><span class="p" data-group-id="3689426028-1">)</span><span class="w">
</span><span class="p" data-group-id="5914664122-2">[</span><span class="ss">:digits_ordinal</span><span class="p" data-group-id="5914664122-2">]</span><span class="w"> </span><span class="p" data-group-id="3689426028-2">[</span><span class="ss">:digits_ordinal</span><span class="p" data-group-id="3689426028-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="5914664122-3">(</span><span class="s">&quot;fr&quot;</span><span class="p" data-group-id="5914664122-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="3689426028-3">(</span><span class="s">&quot;fr&quot;</span><span class="p" data-group-id="3689426028-3">)</span><span class="w">
</span><span class="p" data-group-id="5914664122-4">[</span><span class="w"> </span><span class="p" data-group-id="3689426028-4">[</span><span class="w">
</span><span class="ss">:digits_ordinal_masculine_plural</span><span class="p">,</span><span class="w"> </span><span class="ss">:digits_ordinal_masculine_plural</span><span class="p">,</span><span class="w">
</span><span class="ss">:digits_ordinal_masculine</span><span class="p">,</span><span class="w"> </span><span class="ss">:digits_ordinal_masculine</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_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</span><span class="w">
</span><span class="p" data-group-id="5914664122-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="6241378206-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="6241378206-1">)</span><span class="w"> </span><span class="p" data-group-id="3689426028-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="9240842466-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="9240842466-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="5302920237-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="5302920237-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="5622906757-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="5622906757-1">)</span><span class="w">
</span><span class="p" data-group-id="5302920237-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="5302920237-2">}</span></code></pre> </span><span class="p" data-group-id="5622906757-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="5622906757-2">}</span></code></pre>
</section> </section>

View File

@ -116,12 +116,12 @@ 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.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
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="4583984636-1">(</span><span class="s">&quot;en&quot;</span><span class="p" data-group-id="4583984636-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="2505356225-1">(</span><span class="s">&quot;en&quot;</span><span class="p" data-group-id="2505356225-1">)</span><span class="w">
</span><span class="p" data-group-id="4583984636-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="p" data-group-id="2505356225-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="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="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="ss">:spellout_cardinal</span><span class="p" data-group-id="4583984636-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="2568285054-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="2568285054-1">)</span><span class="w"> </span><span class="ss">:spellout_cardinal</span><span class="p" data-group-id="2505356225-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="1016086961-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="1016086961-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="1918771311-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="1918771311-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="9666231182-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="9666231182-1">)</span><span class="w">
</span><span class="p" data-group-id="1918771311-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="1918771311-2">}</span></code></pre> </span><span class="p" data-group-id="9666231182-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="9666231182-2">}</span></code></pre>
</section> </section>

View File

@ -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="0548402962-1">(</span><span class="p" data-group-id="0548402962-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="5427501901-1">(</span><span class="p" data-group-id="5427501901-1">)</span><span class="w">
</span><span class="p" data-group-id="0548402962-2">%</span><span class="nc" data-group-id="0548402962-2">Cldr.LanguageTag</span><span class="p" data-group-id="0548402962-2">{</span><span class="w"> </span><span class="p" data-group-id="5427501901-2">%</span><span class="nc" data-group-id="5427501901-2">Cldr.LanguageTag</span><span class="p" data-group-id="5427501901-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="0548402962-3">[</span><span class="p" data-group-id="0548402962-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="5427501901-3">[</span><span class="p" data-group-id="5427501901-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="0548402962-4">%{</span><span class="p" data-group-id="0548402962-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="5427501901-4">%{</span><span class="p" data-group-id="5427501901-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="0548402962-5">%{</span><span class="p" data-group-id="0548402962-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="5427501901-5">%{</span><span class="p" data-group-id="5427501901-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="0548402962-6">[</span><span class="p" data-group-id="0548402962-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="5427501901-6">[</span><span class="p" data-group-id="5427501901-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="0548402962-7">%{</span><span class="p" data-group-id="0548402962-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="5427501901-7">%{</span><span class="p" data-group-id="5427501901-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="0548402962-8">[</span><span class="p" data-group-id="0548402962-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="5427501901-8">[</span><span class="p" data-group-id="5427501901-8">]</span><span class="w">
</span><span class="p" data-group-id="0548402962-2">}</span></code></pre> </span><span class="p" data-group-id="5427501901-2">}</span></code></pre>
</section> </section>
</section> </section>
<section class="detail" id="default_territory/0"> <section class="detail" id="default_territory/0">
@ -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="0603372244-1">(</span><span class="p" data-group-id="0603372244-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="7508920391-1">(</span><span class="p" data-group-id="7508920391-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>
@ -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="4045716573-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="4045716573-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="0199263543-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="0199263543-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="4045716573-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="4045716573-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="0199263543-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="0199263543-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>
@ -677,23 +677,23 @@ take an optional locale parameter for which a locale is not supplied.</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</span><span class="o">.</span><span class="n">put_locale</span><span class="p" data-group-id="0323349215-1">(</span><span class="s">&quot;pl&quot;</span><span class="p" data-group-id="0323349215-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="7048277010-1">(</span><span class="s">&quot;pl&quot;</span><span class="p" data-group-id="7048277010-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="0323349215-2">%</span><span class="nc" data-group-id="0323349215-2">Cldr.LanguageTag</span><span class="p" data-group-id="0323349215-2">{</span><span class="w"> </span><span class="p" data-group-id="7048277010-2">%</span><span class="nc" data-group-id="7048277010-2">Cldr.LanguageTag</span><span class="p" data-group-id="7048277010-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="0323349215-3">%{</span><span class="p" data-group-id="0323349215-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="7048277010-3">%{</span><span class="p" data-group-id="7048277010-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="0323349215-4">%{</span><span class="p" data-group-id="0323349215-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="7048277010-4">%{</span><span class="p" data-group-id="7048277010-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="0323349215-5">[</span><span class="p" data-group-id="0323349215-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="7048277010-5">[</span><span class="p" data-group-id="7048277010-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="0323349215-6">%{</span><span class="p" data-group-id="0323349215-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="7048277010-6">%{</span><span class="p" data-group-id="7048277010-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="0323349215-7">[</span><span class="p" data-group-id="0323349215-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="7048277010-7">[</span><span class="p" data-group-id="7048277010-7">]</span><span class="w">
</span><span class="p" data-group-id="0323349215-2">}</span></code></pre> </span><span class="p" data-group-id="7048277010-2">}</span></code></pre>
</section> </section>
</section> </section>
<section class="detail" id="known_calendars/0"> <section class="detail" id="known_calendars/0">
@ -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="4077442806-1">(</span><span class="s">&quot;en&quot;</span><span class="p" data-group-id="4077442806-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="7776582036-1">(</span><span class="s">&quot;en&quot;</span><span class="p" data-group-id="7776582036-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="4077442806-2">(</span><span class="s">&quot;!!&quot;</span><span class="p" data-group-id="4077442806-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="7776582036-2">(</span><span class="s">&quot;!!&quot;</span><span class="p" data-group-id="7776582036-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>
@ -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="4713832625-1">(</span><span class="ss">:en</span><span class="p" data-group-id="4713832625-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="3502379290-1">(</span><span class="ss">:en</span><span class="p" data-group-id="3502379290-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="4713832625-2">(</span><span class="ss">:&quot;!!&quot;</span><span class="p" data-group-id="4713832625-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="3502379290-2">(</span><span class="ss">:&quot;!!&quot;</span><span class="p" data-group-id="3502379290-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>
@ -1006,7 +1006,7 @@ in this module or in <a href="https://hexdocs.pm/gettext/0.19.1/Gettext.html"><c
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="1340695406-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="1340695406-1">]</span></code></pre> </span><span class="p" data-group-id="6168706308-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="6168706308-1">]</span></code></pre>
</section> </section>
</section> </section>
<section class="detail" id="known_number_systems/0"> <section class="detail" id="known_number_systems/0">
@ -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="9180209198-1">(</span><span class="ss">:en</span><span class="p" data-group-id="9180209198-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="6282145895-1">(</span><span class="ss">:en</span><span class="p" data-group-id="6282145895-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="9180209198-2">(</span><span class="ss">:&quot;!!&quot;</span><span class="p" data-group-id="9180209198-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="6282145895-2">(</span><span class="ss">:&quot;!!&quot;</span><span class="p" data-group-id="6282145895-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>
@ -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="6304659301-1">(</span><span class="s">&quot;en&quot;</span><span class="p" data-group-id="6304659301-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="8959012265-1">(</span><span class="s">&quot;en&quot;</span><span class="p" data-group-id="8959012265-1">)</span><span class="w">
</span><span class="p" data-group-id="6304659301-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="8959012265-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="6304659301-3">%</span><span class="nc" data-group-id="6304659301-3">Cldr.LanguageTag</span><span class="p" data-group-id="6304659301-3">{</span><span class="w"> </span><span class="p" data-group-id="8959012265-3">%</span><span class="nc" data-group-id="8959012265-3">Cldr.LanguageTag</span><span class="p" data-group-id="8959012265-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="6304659301-4">[</span><span class="p" data-group-id="6304659301-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="8959012265-4">[</span><span class="p" data-group-id="8959012265-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="6304659301-5">%{</span><span class="p" data-group-id="6304659301-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="8959012265-5">%{</span><span class="p" data-group-id="8959012265-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="6304659301-6">%{</span><span class="p" data-group-id="6304659301-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="8959012265-6">%{</span><span class="p" data-group-id="8959012265-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="6304659301-7">[</span><span class="p" data-group-id="6304659301-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="8959012265-7">[</span><span class="p" data-group-id="8959012265-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="6304659301-8">%{</span><span class="p" data-group-id="6304659301-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="8959012265-8">%{</span><span class="p" data-group-id="8959012265-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="6304659301-9">[</span><span class="p" data-group-id="6304659301-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="8959012265-9">[</span><span class="p" data-group-id="8959012265-9">]</span><span class="w">
</span><span class="p" data-group-id="6304659301-3">}</span><span class="p" data-group-id="6304659301-2">}</span><span class="w"> </span><span class="p" data-group-id="8959012265-3">}</span><span class="p" data-group-id="8959012265-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="6304659301-10">(</span><span class="s">&quot;invalid-locale!&quot;</span><span class="p" data-group-id="6304659301-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="8959012265-10">(</span><span class="s">&quot;invalid-locale!&quot;</span><span class="p" data-group-id="8959012265-10">)</span><span class="w">
</span><span class="p" data-group-id="6304659301-11">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="6304659301-12">{</span><span class="nc">Cldr.LanguageTag.ParseError</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="8959012265-11">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="8959012265-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="6304659301-12">}</span><span class="p" data-group-id="6304659301-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="8959012265-12">}</span><span class="p" data-group-id="8959012265-11">}</span></code></pre>
</section> </section>
</section> </section>
<section class="detail" id="quote/2"> <section class="detail" id="quote/2">
@ -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="2343092589-1">(</span><span class="ss">:en</span><span class="p" data-group-id="2343092589-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="0785408403-1">(</span><span class="ss">:en</span><span class="p" data-group-id="0785408403-1">)</span><span class="w">
</span><span class="p" data-group-id="2343092589-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="0785408403-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="2343092589-3">%</span><span class="nc" data-group-id="2343092589-3">Cldr.LanguageTag</span><span class="p" data-group-id="2343092589-3">{</span><span class="w"> </span><span class="p" data-group-id="0785408403-3">%</span><span class="nc" data-group-id="0785408403-3">Cldr.LanguageTag</span><span class="p" data-group-id="0785408403-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="2343092589-4">%{</span><span class="p" data-group-id="2343092589-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="0785408403-4">%{</span><span class="p" data-group-id="0785408403-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="2343092589-5">%{</span><span class="p" data-group-id="2343092589-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="0785408403-5">%{</span><span class="p" data-group-id="0785408403-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="2343092589-6">[</span><span class="p" data-group-id="2343092589-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="0785408403-6">[</span><span class="p" data-group-id="0785408403-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="2343092589-7">%{</span><span class="p" data-group-id="2343092589-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="0785408403-7">%{</span><span class="p" data-group-id="0785408403-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="2343092589-8">[</span><span class="p" data-group-id="2343092589-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="0785408403-8">[</span><span class="p" data-group-id="0785408403-8">]</span><span class="w">
</span><span class="p" data-group-id="2343092589-3">}</span><span class="p" data-group-id="2343092589-2">}</span><span class="w"> </span><span class="p" data-group-id="0785408403-3">}</span><span class="p" data-group-id="0785408403-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="2343092589-9">(</span><span class="p" data-group-id="2343092589-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="0785408403-9">(</span><span class="p" data-group-id="0785408403-9">)</span><span class="w">
</span><span class="p" data-group-id="2343092589-10">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="0785408403-10">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="2343092589-11">%</span><span class="nc" data-group-id="2343092589-11">Cldr.LanguageTag</span><span class="p" data-group-id="2343092589-11">{</span><span class="w"> </span><span class="p" data-group-id="0785408403-11">%</span><span class="nc" data-group-id="0785408403-11">Cldr.LanguageTag</span><span class="p" data-group-id="0785408403-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="2343092589-12">%{</span><span class="p" data-group-id="2343092589-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="0785408403-12">%{</span><span class="p" data-group-id="0785408403-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="2343092589-13">%{</span><span class="p" data-group-id="2343092589-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="0785408403-13">%{</span><span class="p" data-group-id="0785408403-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="2343092589-14">[</span><span class="p" data-group-id="2343092589-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="0785408403-14">[</span><span class="p" data-group-id="0785408403-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="2343092589-15">%{</span><span class="p" data-group-id="2343092589-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="0785408403-15">%{</span><span class="p" data-group-id="0785408403-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="2343092589-16">[</span><span class="p" data-group-id="2343092589-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="0785408403-16">[</span><span class="p" data-group-id="0785408403-16">]</span><span class="w">
</span><span class="p" data-group-id="2343092589-11">}</span><span class="p" data-group-id="2343092589-10">}</span><span class="w"> </span><span class="p" data-group-id="0785408403-11">}</span><span class="p" data-group-id="0785408403-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="2343092589-17">(</span><span class="s">&quot;zzz&quot;</span><span class="p" data-group-id="2343092589-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="0785408403-17">(</span><span class="s">&quot;zzz&quot;</span><span class="p" data-group-id="0785408403-17">)</span><span class="w">
</span><span class="p" data-group-id="2343092589-18">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="2343092589-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="2343092589-19">}</span><span class="p" data-group-id="2343092589-18">}</span></code></pre> </span><span class="p" data-group-id="0785408403-18">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="0785408403-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="0785408403-19">}</span><span class="p" data-group-id="0785408403-18">}</span></code></pre>
</section> </section>
</section> </section>
<section class="detail" id="validate_number_system/1"> <section class="detail" id="validate_number_system/1">
@ -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="6572334406-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="6572334406-1">}</span><span class="w"> </span><span class="p" data-group-id="7513995661-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="7513995661-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="6572334406-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="6572334406-2">}</span><span class="w"> </span><span class="p" data-group-id="7513995661-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="7513995661-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="6572334406-3">{</span><span class="w"> </span><span class="p" data-group-id="7513995661-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="6572334406-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="6572334406-4">}</span><span class="w"> </span><span class="p" data-group-id="7513995661-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="7513995661-4">}</span><span class="w">
</span><span class="p" data-group-id="6572334406-3">}</span><span class="w"> </span><span class="p" data-group-id="7513995661-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="6572334406-5">{</span><span class="w"> </span><span class="p" data-group-id="7513995661-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="6572334406-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="6572334406-6">}</span><span class="w"> </span><span class="p" data-group-id="7513995661-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="7513995661-6">}</span><span class="w">
</span><span class="p" data-group-id="6572334406-5">}</span></code></pre> </span><span class="p" data-group-id="7513995661-5">}</span></code></pre>
</section> </section>
</section> </section>
<section class="detail" id="validate_territory/1"> <section class="detail" id="validate_territory/1">

View File

@ -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="1205131659-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="1205131659-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="7272474562-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="7272474562-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="1205131659-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="7272474562-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="1205131659-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="7272474562-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="1205131659-3">end</span><span class="w"> </span><span class="k" data-group-id="7272474562-3">end</span><span class="w">
</span><span class="k" data-group-id="1205131659-2">end</span><span class="w"> </span><span class="k" data-group-id="7272474562-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="1205131659-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="1205131659-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="1205131659-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="1205131659-7">(</span><span class="n">i</span><span class="p" data-group-id="1205131659-7">)</span><span class="p" data-group-id="1205131659-6">}</span><span class="w"> </span><span class="k" data-group-id="1205131659-5">end</span><span class="p" data-group-id="1205131659-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="7272474562-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="7272474562-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="7272474562-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="7272474562-7">(</span><span class="n">i</span><span class="p" data-group-id="7272474562-7">)</span><span class="p" data-group-id="7272474562-6">}</span><span class="w"> </span><span class="k" data-group-id="7272474562-5">end</span><span class="p" data-group-id="7272474562-4">)</span><span class="w">
</span><span class="p" data-group-id="1205131659-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="1205131659-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="1205131659-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="1205131659-9">)</span><span class="w"> </span><span class="p" data-group-id="7272474562-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="7272474562-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="7272474562-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="7272474562-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="1205131659-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="1205131659-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="1205131659-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="1205131659-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="1205131659-13">(</span><span class="p" data-group-id="1205131659-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="1205131659-12">]</span><span class="p" data-group-id="1205131659-11">)</span></code></pre> </span><span class="p" data-group-id="7272474562-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="7272474562-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="7272474562-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="7272474562-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="7272474562-13">(</span><span class="p" data-group-id="7272474562-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="7272474562-12">]</span><span class="p" data-group-id="7272474562-11">)</span></code></pre>
</section> </section>
</section> </section>
<section class="detail" id="load/2"> <section class="detail" id="load/2">

View File

@ -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="8645168065-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="8645168065-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="5153936810-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="5153936810-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="8645168065-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="5153936810-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="8645168065-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="5153936810-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="8645168065-3">end</span><span class="w"> </span><span class="k" data-group-id="5153936810-3">end</span><span class="w">
</span><span class="k" data-group-id="8645168065-2">end</span><span class="w"> </span><span class="k" data-group-id="5153936810-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="8645168065-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="8645168065-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="8645168065-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="8645168065-7">(</span><span class="n">i</span><span class="p" data-group-id="8645168065-7">)</span><span class="p" data-group-id="8645168065-6">}</span><span class="w"> </span><span class="k" data-group-id="8645168065-5">end</span><span class="p" data-group-id="8645168065-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="5153936810-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="5153936810-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="5153936810-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="5153936810-7">(</span><span class="n">i</span><span class="p" data-group-id="5153936810-7">)</span><span class="p" data-group-id="5153936810-6">}</span><span class="w"> </span><span class="k" data-group-id="5153936810-5">end</span><span class="p" data-group-id="5153936810-4">)</span><span class="w">
</span><span class="p" data-group-id="8645168065-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="8645168065-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="8645168065-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="8645168065-9">)</span><span class="w"> </span><span class="p" data-group-id="5153936810-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="5153936810-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="5153936810-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="5153936810-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="8645168065-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="8645168065-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="8645168065-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="8645168065-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="8645168065-13">(</span><span class="p" data-group-id="8645168065-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="8645168065-12">]</span><span class="p" data-group-id="8645168065-11">)</span></code></pre> </span><span class="p" data-group-id="5153936810-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="5153936810-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="5153936810-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="5153936810-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="5153936810-13">(</span><span class="p" data-group-id="5153936810-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="5153936810-12">]</span><span class="p" data-group-id="5153936810-11">)</span></code></pre>
</section> </section>
</section> </section>
<section class="detail" id="load/2"> <section class="detail" id="load/2">

View File

@ -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="3654815482-1">(</span><span class="p" data-group-id="3654815482-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="0559574818-1">(</span><span class="p" data-group-id="0559574818-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="1644496101-1">(</span><span class="p" data-group-id="1644496101-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="0079732689-1">(</span><span class="p" data-group-id="0079732689-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="2724045171-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="2724045171-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="3375905488-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="3375905488-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="9123281255-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="9123281255-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="9028695979-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="9028695979-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="6996883292-1">(</span><span class="s">&quot;8.7.6.5&quot;</span><span class="p" data-group-id="6996883292-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="1508127534-1">(</span><span class="s">&quot;8.7.6.5&quot;</span><span class="p" data-group-id="1508127534-1">)</span><span class="w">
</span><span class="p" data-group-id="6996883292-2">%{</span><span class="w"> </span><span class="p" data-group-id="1508127534-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="6996883292-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="1508127534-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="6996883292-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="1508127534-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="6996883292-4">}</span><span class="w"> </span><span class="p" data-group-id="1508127534-4">}</span><span class="w">
</span><span class="p" data-group-id="6996883292-3">}</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1508127534-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="6996883292-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="1508127534-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="6996883292-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="1508127534-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="6996883292-6">}</span><span class="w"> </span><span class="p" data-group-id="1508127534-6">}</span><span class="w">
</span><span class="p" data-group-id="6996883292-5">}</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1508127534-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="6996883292-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="1508127534-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="6996883292-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="1508127534-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="6996883292-8">}</span><span class="w"> </span><span class="p" data-group-id="1508127534-8">}</span><span class="w">
</span><span class="p" data-group-id="6996883292-7">}</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1508127534-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="6996883292-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="1508127534-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="6996883292-9">}</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1508127534-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="6996883292-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="6996883292-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="1508127534-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="1508127534-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="6996883292-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="1508127534-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="6996883292-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="1508127534-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="6996883292-12">}</span><span class="w"> </span><span class="p" data-group-id="1508127534-12">}</span><span class="w">
</span><span class="p" data-group-id="6996883292-11">}</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1508127534-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="6996883292-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="1508127534-13">[</span><span class="w">
</span><span class="p" data-group-id="6996883292-14">%{</span><span class="w"> </span><span class="p" data-group-id="1508127534-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="6996883292-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="1508127534-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="6996883292-15">}</span><span class="w"> </span><span class="p" data-group-id="1508127534-15">}</span><span class="w">
</span><span class="p" data-group-id="6996883292-14">}</span><span class="w"> </span><span class="p" data-group-id="1508127534-14">}</span><span class="w">
</span><span class="p" data-group-id="6996883292-13">]</span><span class="w"> </span><span class="p" data-group-id="1508127534-13">]</span><span class="w">
</span><span class="p" data-group-id="6996883292-2">}</span></code></pre> </span><span class="p" data-group-id="1508127534-2">}</span></code></pre>
</section> </section>
</section> </section>

View File

@ -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="1980877110-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="1980877110-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="1579737713-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="1579737713-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="1980877110-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="1579737713-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="1980877110-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="1579737713-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="1980877110-3">end</span><span class="w"> </span><span class="k" data-group-id="1579737713-3">end</span><span class="w">
</span><span class="k" data-group-id="1980877110-2">end</span><span class="w"> </span><span class="k" data-group-id="1579737713-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="1980877110-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="1980877110-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="1980877110-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="1980877110-7">(</span><span class="n">i</span><span class="p" data-group-id="1980877110-7">)</span><span class="p" data-group-id="1980877110-6">}</span><span class="w"> </span><span class="k" data-group-id="1980877110-5">end</span><span class="p" data-group-id="1980877110-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="1579737713-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="1579737713-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="1579737713-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="1579737713-7">(</span><span class="n">i</span><span class="p" data-group-id="1579737713-7">)</span><span class="p" data-group-id="1579737713-6">}</span><span class="w"> </span><span class="k" data-group-id="1579737713-5">end</span><span class="p" data-group-id="1579737713-4">)</span><span class="w">
</span><span class="p" data-group-id="1980877110-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="1980877110-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="1980877110-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="1980877110-9">)</span><span class="w"> </span><span class="p" data-group-id="1579737713-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="1579737713-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="1579737713-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="1579737713-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="1980877110-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="1980877110-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="1980877110-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="1980877110-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="1980877110-13">(</span><span class="p" data-group-id="1980877110-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="1980877110-12">]</span><span class="p" data-group-id="1980877110-11">)</span></code></pre> </span><span class="p" data-group-id="1579737713-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="1579737713-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="1579737713-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="1579737713-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="1579737713-13">(</span><span class="p" data-group-id="1579737713-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="1579737713-12">]</span><span class="p" data-group-id="1579737713-11">)</span></code></pre>
</section> </section>
</section> </section>
<section class="detail" id="load/2"> <section class="detail" id="load/2">

View File

@ -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="7397409360-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="7397409360-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="0396597536-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="0396597536-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="7397409360-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="0396597536-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="7397409360-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="0396597536-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="7397409360-3">end</span><span class="w"> </span><span class="k" data-group-id="0396597536-3">end</span><span class="w">
</span><span class="k" data-group-id="7397409360-2">end</span><span class="w"> </span><span class="k" data-group-id="0396597536-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="7397409360-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="7397409360-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="7397409360-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="7397409360-7">(</span><span class="n">i</span><span class="p" data-group-id="7397409360-7">)</span><span class="p" data-group-id="7397409360-6">}</span><span class="w"> </span><span class="k" data-group-id="7397409360-5">end</span><span class="p" data-group-id="7397409360-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="0396597536-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="0396597536-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="0396597536-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="0396597536-7">(</span><span class="n">i</span><span class="p" data-group-id="0396597536-7">)</span><span class="p" data-group-id="0396597536-6">}</span><span class="w"> </span><span class="k" data-group-id="0396597536-5">end</span><span class="p" data-group-id="0396597536-4">)</span><span class="w">
</span><span class="p" data-group-id="7397409360-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="7397409360-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="7397409360-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="7397409360-9">)</span><span class="w"> </span><span class="p" data-group-id="0396597536-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="0396597536-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="0396597536-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="0396597536-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="7397409360-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="7397409360-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="7397409360-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="7397409360-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="7397409360-13">(</span><span class="p" data-group-id="7397409360-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="7397409360-12">]</span><span class="p" data-group-id="7397409360-11">)</span></code></pre> </span><span class="p" data-group-id="0396597536-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="0396597536-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="0396597536-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="0396597536-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="0396597536-13">(</span><span class="p" data-group-id="0396597536-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="0396597536-12">]</span><span class="p" data-group-id="0396597536-11">)</span></code></pre>
</section> </section>
</section> </section>
<section class="detail" id="load/2"> <section class="detail" id="load/2">

View File

@ -180,14 +180,14 @@ Functions
</a> </a>
Examples: Examples:
</h3> </h3>
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">FilterParser</span><span class="o">.</span><span class="n">parse_filters</span><span class="p" data-group-id="3495534644-1">(</span><span class="s">&quot;{</span><span class="se">\&quot;</span><span class="s">page</span><span class="se">\&quot;</span><span class="s">:</span><span class="se">\&quot;</span><span class="s">/blog/**</span><span class="se">\&quot;</span><span class="s">}&quot;</span><span class="p" data-group-id="3495534644-1">)</span><span class="w"> <pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex&gt; </span><span class="nc">FilterParser</span><span class="o">.</span><span class="n">parse_filters</span><span class="p" data-group-id="4563784004-1">(</span><span class="s">&quot;{</span><span class="se">\&quot;</span><span class="s">page</span><span class="se">\&quot;</span><span class="s">:</span><span class="se">\&quot;</span><span class="s">/blog/**</span><span class="se">\&quot;</span><span class="s">}&quot;</span><span class="p" data-group-id="4563784004-1">)</span><span class="w">
</span><span class="p" data-group-id="3495534644-2">%{</span><span class="s">&quot;page&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="s">&quot;/blog/**&quot;</span><span class="p" data-group-id="3495534644-2">}</span><span class="w"> </span><span class="p" data-group-id="4563784004-2">%{</span><span class="s">&quot;page&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="s">&quot;/blog/**&quot;</span><span class="p" data-group-id="4563784004-2">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">FilterParser</span><span class="o">.</span><span class="n">parse_filters</span><span class="p" data-group-id="3495534644-3">(</span><span class="s">&quot;visit:browser!=Chrome&quot;</span><span class="p" data-group-id="3495534644-3">)</span><span class="w"> </span><span class="gp unselectable">iex&gt; </span><span class="nc">FilterParser</span><span class="o">.</span><span class="n">parse_filters</span><span class="p" data-group-id="4563784004-3">(</span><span class="s">&quot;visit:browser!=Chrome&quot;</span><span class="p" data-group-id="4563784004-3">)</span><span class="w">
</span><span class="p" data-group-id="3495534644-4">%{</span><span class="s">&quot;visit:browser&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="p" data-group-id="3495534644-5">{</span><span class="ss">:is_not</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Chrome&quot;</span><span class="p" data-group-id="3495534644-5">}</span><span class="p" data-group-id="3495534644-4">}</span><span class="w"> </span><span class="p" data-group-id="4563784004-4">%{</span><span class="s">&quot;visit:browser&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="p" data-group-id="4563784004-5">{</span><span class="ss">:is_not</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Chrome&quot;</span><span class="p" data-group-id="4563784004-5">}</span><span class="p" data-group-id="4563784004-4">}</span><span class="w">
</span><span class="gp unselectable">iex&gt; </span><span class="nc">FilterParser</span><span class="o">.</span><span class="n">parse_filters</span><span class="p" data-group-id="3495534644-6">(</span><span class="no">nil</span><span class="p" data-group-id="3495534644-6">)</span><span class="w"> </span><span class="gp unselectable">iex&gt; </span><span class="nc">FilterParser</span><span class="o">.</span><span class="n">parse_filters</span><span class="p" data-group-id="4563784004-6">(</span><span class="no">nil</span><span class="p" data-group-id="4563784004-6">)</span><span class="w">
</span><span class="p" data-group-id="3495534644-7">%{</span><span class="p" data-group-id="3495534644-7">}</span></code></pre> </span><span class="p" data-group-id="4563784004-7">%{</span><span class="p" data-group-id="4563784004-7">}</span></code></pre>
</section> </section>
</section> </section>

Binary file not shown.

View File

@ -626,13 +626,13 @@ and <code class="inline">month</code>. The default depends on the <code class="i
<code class="inline">Plausible.Query.from/2</code> for each default.</p></li><li><p><code class="inline">filters</code> - optional filters to drill down data. See the Stats API <code class="inline">Plausible.Query.from/2</code> for each default.</p></li><li><p><code class="inline">filters</code> - optional filters to drill down data. See the Stats API
<a href="https://plausible.io/docs/stats-api#filtering">&quot;Filtering&quot;</a> section for <a href="https://plausible.io/docs/stats-api#filtering">&quot;Filtering&quot;</a> section for
more details.</p></li><li><p><code class="inline">with_imported</code> - boolean indicating whether to include Google Analytics more details.</p></li><li><p><code class="inline">with_imported</code> - boolean indicating whether to include Google Analytics
imported data or not. Defaults to <code class="inline">false</code>.</p></li></ul><p>Full example:</p><pre><code class="makeup elixir" translate="no"><span class="p" data-group-id="1634184886-1">%{</span><span class="w"> imported data or not. Defaults to <code class="inline">false</code>.</p></li></ul><p>Full example:</p><pre><code class="makeup elixir" translate="no"><span class="p" data-group-id="2862562168-1">%{</span><span class="w">
</span><span class="s">&quot;from&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="s">&quot;2021-09-06&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;from&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="s">&quot;2021-09-06&quot;</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;interval&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="s">&quot;month&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;interval&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="s">&quot;month&quot;</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;metric&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="s">&quot;visitors&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;metric&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="s">&quot;visitors&quot;</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;period&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="s">&quot;custom&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;period&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="s">&quot;custom&quot;</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;to&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="s">&quot;2021-12-13&quot;</span><span class="w"> </span><span class="s">&quot;to&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="s">&quot;2021-12-13&quot;</span><span class="w">
</span><span class="p" data-group-id="1634184886-1">}</span></code></pre><h2 id="main_graph/2-response" class="section-heading"> </span><span class="p" data-group-id="2862562168-1">}</span></code></pre><h2 id="main_graph/2-response" class="section-heading">
<a href="#main_graph/2-response" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i> <a href="#main_graph/2-response" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
<p class="sr-only">response</p> <p class="sr-only">response</p>
</a> </a>
@ -647,20 +647,20 @@ cut off by the requested date range or not. For example, if looking at a
month week-by-week, some weeks may be cut off by the month boundaries. month week-by-week, some weeks may be cut off by the month boundaries.
It's useful to adjust the graph display slightly in case the interval is It's useful to adjust the graph display slightly in case the interval is
not 'full' so that the user understands why the numbers might be lower for not 'full' so that the user understands why the numbers might be lower for
those partial periods.</p></li></ul><p>Full example:</p><pre><code class="makeup elixir" translate="no"><span class="p" data-group-id="0271890054-1">%{</span><span class="w"> those partial periods.</p></li></ul><p>Full example:</p><pre><code class="makeup elixir" translate="no"><span class="p" data-group-id="6554224673-1">%{</span><span class="w">
</span><span class="s">&quot;full_intervals&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="p" data-group-id="0271890054-2">%{</span><span class="w"> </span><span class="s">&quot;full_intervals&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="p" data-group-id="6554224673-2">%{</span><span class="w">
</span><span class="s">&quot;2021-09-01&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="no">false</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;2021-09-01&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="no">false</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;2021-10-01&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="no">true</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;2021-10-01&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="no">true</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;2021-11-01&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="no">true</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;2021-11-01&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="no">true</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;2021-12-01&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="no">false</span><span class="w"> </span><span class="s">&quot;2021-12-01&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="no">false</span><span class="w">
</span><span class="p" data-group-id="0271890054-2">}</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="6554224673-2">}</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;imported_source&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="no">nil</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;imported_source&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="no">nil</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;interval&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="s">&quot;month&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;interval&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="s">&quot;month&quot;</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;labels&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="p" data-group-id="0271890054-3">[</span><span class="s">&quot;2021-09-01&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;2021-10-01&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;2021-11-01&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;2021-12-01&quot;</span><span class="p" data-group-id="0271890054-3">]</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;labels&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="p" data-group-id="6554224673-3">[</span><span class="s">&quot;2021-09-01&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;2021-10-01&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;2021-11-01&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;2021-12-01&quot;</span><span class="p" data-group-id="6554224673-3">]</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;plot&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="p" data-group-id="0271890054-4">[</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p" data-group-id="0271890054-4">]</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;plot&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="p" data-group-id="6554224673-4">[</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p" data-group-id="6554224673-4">]</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;present_index&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="no">nil</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;present_index&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="no">nil</span><span class="p">,</span><span class="w">
</span><span class="s">&quot;with_imported&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="no">false</span><span class="w"> </span><span class="s">&quot;with_imported&quot;</span><span class="w"> </span><span class="p">=&gt;</span><span class="w"> </span><span class="no">false</span><span class="w">
</span><span class="p" data-group-id="0271890054-1">}</span></code></pre> </span><span class="p" data-group-id="6554224673-1">}</span></code></pre>
</section> </section>
</section> </section>
<section class="detail" id="operating_system_versions/2"> <section class="detail" id="operating_system_versions/2">

View File

@ -115,7 +115,7 @@ Plausible
<section id="moduledoc"> <section id="moduledoc">
<p>This module defines the test case to be used by <p>This module defines the test case to be used by
tests that require setting up a connection.</p><p>Such tests rely on <a href="https://hexdocs.pm/phoenix/1.7.6/Phoenix.ConnTest.html"><code class="inline">Phoenix.ConnTest</code></a> and also tests that require setting up a connection.</p><p>Such tests rely on <a href="https://hexdocs.pm/phoenix/1.7.7/Phoenix.ConnTest.html"><code class="inline">Phoenix.ConnTest</code></a> and also
import other functionality to make it easier import other functionality to make it easier
to build common data structures and query the data layer.</p><p>Finally, if the test case interacts with the database, to build common data structures and query the data layer.</p><p>Finally, if the test case interacts with the database,
it cannot be async. For this reason, every test runs it cannot be async. For this reason, every test runs

View File

@ -133,7 +133,7 @@ Plausible
</div> </div>
<div class="summary-synopsis"><p>Callback implementation for <a href="https://hexdocs.pm/phoenix/1.7.6/Phoenix.Endpoint.html#c:broadcast/3"><code class="inline">Phoenix.Endpoint.broadcast/3</code></a>.</p></div> <div class="summary-synopsis"><p>Callback implementation for <a href="https://hexdocs.pm/phoenix/1.7.7/Phoenix.Endpoint.html#c:broadcast/3"><code class="inline">Phoenix.Endpoint.broadcast/3</code></a>.</p></div>
</div> </div>
@ -143,7 +143,7 @@ Plausible
</div> </div>
<div class="summary-synopsis"><p>Callback implementation for <a href="https://hexdocs.pm/phoenix/1.7.6/Phoenix.Endpoint.html#c:broadcast!/3"><code class="inline">Phoenix.Endpoint.broadcast!/3</code></a>.</p></div> <div class="summary-synopsis"><p>Callback implementation for <a href="https://hexdocs.pm/phoenix/1.7.7/Phoenix.Endpoint.html#c:broadcast!/3"><code class="inline">Phoenix.Endpoint.broadcast!/3</code></a>.</p></div>
</div> </div>
@ -153,7 +153,7 @@ Plausible
</div> </div>
<div class="summary-synopsis"><p>Callback implementation for <a href="https://hexdocs.pm/phoenix/1.7.6/Phoenix.Endpoint.html#c:broadcast_from/4"><code class="inline">Phoenix.Endpoint.broadcast_from/4</code></a>.</p></div> <div class="summary-synopsis"><p>Callback implementation for <a href="https://hexdocs.pm/phoenix/1.7.7/Phoenix.Endpoint.html#c:broadcast_from/4"><code class="inline">Phoenix.Endpoint.broadcast_from/4</code></a>.</p></div>
</div> </div>
@ -163,7 +163,7 @@ Plausible
</div> </div>
<div class="summary-synopsis"><p>Callback implementation for <a href="https://hexdocs.pm/phoenix/1.7.6/Phoenix.Endpoint.html#c:broadcast_from!/4"><code class="inline">Phoenix.Endpoint.broadcast_from!/4</code></a>.</p></div> <div class="summary-synopsis"><p>Callback implementation for <a href="https://hexdocs.pm/phoenix/1.7.7/Phoenix.Endpoint.html#c:broadcast_from!/4"><code class="inline">Phoenix.Endpoint.broadcast_from!/4</code></a>.</p></div>
</div> </div>
@ -234,7 +234,7 @@ under a supervision tree.</p></div>
</div> </div>
<div class="summary-synopsis"><p>Callback implementation for <a href="https://hexdocs.pm/phoenix/1.7.6/Phoenix.Endpoint.html#c:local_broadcast/3"><code class="inline">Phoenix.Endpoint.local_broadcast/3</code></a>.</p></div> <div class="summary-synopsis"><p>Callback implementation for <a href="https://hexdocs.pm/phoenix/1.7.7/Phoenix.Endpoint.html#c:local_broadcast/3"><code class="inline">Phoenix.Endpoint.local_broadcast/3</code></a>.</p></div>
</div> </div>
@ -244,7 +244,7 @@ under a supervision tree.</p></div>
</div> </div>
<div class="summary-synopsis"><p>Callback implementation for <a href="https://hexdocs.pm/phoenix/1.7.6/Phoenix.Endpoint.html#c:local_broadcast_from/4"><code class="inline">Phoenix.Endpoint.local_broadcast_from/4</code></a>.</p></div> <div class="summary-synopsis"><p>Callback implementation for <a href="https://hexdocs.pm/phoenix/1.7.7/Phoenix.Endpoint.html#c:local_broadcast_from/4"><code class="inline">Phoenix.Endpoint.local_broadcast_from/4</code></a>.</p></div>
</div> </div>
@ -344,7 +344,7 @@ and the second item being the <code class="inline">static_integrity</code>.</p><
</div> </div>
<div class="summary-synopsis"><p>Callback implementation for <a href="https://hexdocs.pm/phoenix/1.7.6/Phoenix.Endpoint.html#c:subscribe/2"><code class="inline">Phoenix.Endpoint.subscribe/2</code></a>.</p></div> <div class="summary-synopsis"><p>Callback implementation for <a href="https://hexdocs.pm/phoenix/1.7.7/Phoenix.Endpoint.html#c:subscribe/2"><code class="inline">Phoenix.Endpoint.subscribe/2</code></a>.</p></div>
</div> </div>
@ -354,7 +354,7 @@ and the second item being the <code class="inline">static_integrity</code>.</p><
</div> </div>
<div class="summary-synopsis"><p>Callback implementation for <a href="https://hexdocs.pm/phoenix/1.7.6/Phoenix.Endpoint.html#c:unsubscribe/1"><code class="inline">Phoenix.Endpoint.unsubscribe/1</code></a>.</p></div> <div class="summary-synopsis"><p>Callback implementation for <a href="https://hexdocs.pm/phoenix/1.7.7/Phoenix.Endpoint.html#c:unsubscribe/1"><code class="inline">Phoenix.Endpoint.unsubscribe/1</code></a>.</p></div>
</div> </div>
@ -409,7 +409,7 @@ Functions
<section class="docstring"> <section class="docstring">
<p>Callback implementation for <a href="https://hexdocs.pm/phoenix/1.7.6/Phoenix.Endpoint.html#c:broadcast/3"><code class="inline">Phoenix.Endpoint.broadcast/3</code></a>.</p> <p>Callback implementation for <a href="https://hexdocs.pm/phoenix/1.7.7/Phoenix.Endpoint.html#c:broadcast/3"><code class="inline">Phoenix.Endpoint.broadcast/3</code></a>.</p>
</section> </section>
</section> </section>
<section class="detail" id="broadcast!/3"> <section class="detail" id="broadcast!/3">
@ -431,7 +431,7 @@ Functions
<section class="docstring"> <section class="docstring">
<p>Callback implementation for <a href="https://hexdocs.pm/phoenix/1.7.6/Phoenix.Endpoint.html#c:broadcast!/3"><code class="inline">Phoenix.Endpoint.broadcast!/3</code></a>.</p> <p>Callback implementation for <a href="https://hexdocs.pm/phoenix/1.7.7/Phoenix.Endpoint.html#c:broadcast!/3"><code class="inline">Phoenix.Endpoint.broadcast!/3</code></a>.</p>
</section> </section>
</section> </section>
<section class="detail" id="broadcast_from/4"> <section class="detail" id="broadcast_from/4">
@ -453,7 +453,7 @@ Functions
<section class="docstring"> <section class="docstring">
<p>Callback implementation for <a href="https://hexdocs.pm/phoenix/1.7.6/Phoenix.Endpoint.html#c:broadcast_from/4"><code class="inline">Phoenix.Endpoint.broadcast_from/4</code></a>.</p> <p>Callback implementation for <a href="https://hexdocs.pm/phoenix/1.7.7/Phoenix.Endpoint.html#c:broadcast_from/4"><code class="inline">Phoenix.Endpoint.broadcast_from/4</code></a>.</p>
</section> </section>
</section> </section>
<section class="detail" id="broadcast_from!/4"> <section class="detail" id="broadcast_from!/4">
@ -475,7 +475,7 @@ Functions
<section class="docstring"> <section class="docstring">
<p>Callback implementation for <a href="https://hexdocs.pm/phoenix/1.7.6/Phoenix.Endpoint.html#c:broadcast_from!/4"><code class="inline">Phoenix.Endpoint.broadcast_from!/4</code></a>.</p> <p>Callback implementation for <a href="https://hexdocs.pm/phoenix/1.7.7/Phoenix.Endpoint.html#c:broadcast_from!/4"><code class="inline">Phoenix.Endpoint.broadcast_from!/4</code></a>.</p>
</section> </section>
</section> </section>
<section class="detail" id="call/2"> <section class="detail" id="call/2">
@ -632,7 +632,7 @@ under a supervision tree.</p>
<section class="docstring"> <section class="docstring">
<p>Callback implementation for <a href="https://hexdocs.pm/phoenix/1.7.6/Phoenix.Endpoint.html#c:local_broadcast/3"><code class="inline">Phoenix.Endpoint.local_broadcast/3</code></a>.</p> <p>Callback implementation for <a href="https://hexdocs.pm/phoenix/1.7.7/Phoenix.Endpoint.html#c:local_broadcast/3"><code class="inline">Phoenix.Endpoint.local_broadcast/3</code></a>.</p>
</section> </section>
</section> </section>
<section class="detail" id="local_broadcast_from/4"> <section class="detail" id="local_broadcast_from/4">
@ -654,7 +654,7 @@ under a supervision tree.</p>
<section class="docstring"> <section class="docstring">
<p>Callback implementation for <a href="https://hexdocs.pm/phoenix/1.7.6/Phoenix.Endpoint.html#c:local_broadcast_from/4"><code class="inline">Phoenix.Endpoint.local_broadcast_from/4</code></a>.</p> <p>Callback implementation for <a href="https://hexdocs.pm/phoenix/1.7.7/Phoenix.Endpoint.html#c:local_broadcast_from/4"><code class="inline">Phoenix.Endpoint.local_broadcast_from/4</code></a>.</p>
</section> </section>
</section> </section>
<section class="detail" id="patch_session_opts/0"> <section class="detail" id="patch_session_opts/0">
@ -883,7 +883,7 @@ URL helpers.</p>
<section class="docstring"> <section class="docstring">
<p>Callback implementation for <a href="https://hexdocs.pm/phoenix/1.7.6/Phoenix.Endpoint.html#c:subscribe/2"><code class="inline">Phoenix.Endpoint.subscribe/2</code></a>.</p> <p>Callback implementation for <a href="https://hexdocs.pm/phoenix/1.7.7/Phoenix.Endpoint.html#c:subscribe/2"><code class="inline">Phoenix.Endpoint.subscribe/2</code></a>.</p>
</section> </section>
</section> </section>
<section class="detail" id="unsubscribe/1"> <section class="detail" id="unsubscribe/1">
@ -905,7 +905,7 @@ URL helpers.</p>
<section class="docstring"> <section class="docstring">
<p>Callback implementation for <a href="https://hexdocs.pm/phoenix/1.7.6/Phoenix.Endpoint.html#c:unsubscribe/1"><code class="inline">Phoenix.Endpoint.unsubscribe/1</code></a>.</p> <p>Callback implementation for <a href="https://hexdocs.pm/phoenix/1.7.7/Phoenix.Endpoint.html#c:unsubscribe/1"><code class="inline">Phoenix.Endpoint.unsubscribe/1</code></a>.</p>
</section> </section>
</section> </section>
<section class="detail" id="url/0"> <section class="detail" id="url/0">

View File

@ -123,7 +123,7 @@ Plausible
</a> </a>
Start the environment Start the environment
</h3> </h3>
<ol><li>Run both <code class="inline">make postgres</code> and <code class="inline">make clickhouse</code>.</li><li>You can set up everything with <code class="inline">make install</code>, alternatively run each command separately:<ol><li>Run <a href="https://hexdocs.pm/mix/Mix.Tasks.Deps.Get.html"><code class="inline">mix deps.get</code></a>. This will download the required Elixir dependencies.</li><li>Run <a href="https://hexdocs.pm/ecto/3.10.2/Mix.Tasks.Ecto.Create.html"><code class="inline">mix ecto.create</code></a>. This will create the required databases in both Postgres and Clickhouse.</li><li>Run <a href="https://hexdocs.pm/ecto_sql/3.10.1/Mix.Tasks.Ecto.Migrate.html"><code class="inline">mix ecto.migrate</code></a> to build the database schema.</li><li>Run <code class="inline">mix run priv/repo/seeds.exs</code> to seed the database. Check the <a href="#Seeds">Seeds</a> section for more.</li><li>Run <code class="inline">npm ci --prefix assets</code> to install the required client-side dependencies.</li><li>Run <code class="inline">npm ci --prefix tracker</code> to install the required tracker dependencies.</li><li>Run <code class="inline">npm run deploy --prefix tracker</code> to generate tracker files in <code class="inline">priv/tracker/js</code></li><li>Run <code class="inline">mix download_country_database</code> to fetch geolocation database</li></ol></li><li>Run <code class="inline">make server</code> or <a href="https://hexdocs.pm/phoenix/1.7.6/Mix.Tasks.Phx.Server.html"><code class="inline">mix phx.server</code></a> to start the Phoenix server.</li><li>The system is now available on <code class="inline">localhost:8000</code>.</li></ol><h3 id="seeds" class="section-heading"> <ol><li>Run both <code class="inline">make postgres</code> and <code class="inline">make clickhouse</code>.</li><li>You can set up everything with <code class="inline">make install</code>, alternatively run each command separately:<ol><li>Run <a href="https://hexdocs.pm/mix/Mix.Tasks.Deps.Get.html"><code class="inline">mix deps.get</code></a>. This will download the required Elixir dependencies.</li><li>Run <a href="https://hexdocs.pm/ecto/3.10.2/Mix.Tasks.Ecto.Create.html"><code class="inline">mix ecto.create</code></a>. This will create the required databases in both Postgres and Clickhouse.</li><li>Run <a href="https://hexdocs.pm/ecto_sql/3.10.1/Mix.Tasks.Ecto.Migrate.html"><code class="inline">mix ecto.migrate</code></a> to build the database schema.</li><li>Run <code class="inline">mix run priv/repo/seeds.exs</code> to seed the database. Check the <a href="#Seeds">Seeds</a> section for more.</li><li>Run <code class="inline">npm ci --prefix assets</code> to install the required client-side dependencies.</li><li>Run <code class="inline">npm ci --prefix tracker</code> to install the required tracker dependencies.</li><li>Run <code class="inline">npm run deploy --prefix tracker</code> to generate tracker files in <code class="inline">priv/tracker/js</code></li><li>Run <code class="inline">mix download_country_database</code> to fetch geolocation database</li></ol></li><li>Run <code class="inline">make server</code> or <a href="https://hexdocs.pm/phoenix/1.7.7/Mix.Tasks.Phx.Server.html"><code class="inline">mix phx.server</code></a> to start the Phoenix server.</li><li>The system is now available on <code class="inline">localhost:8000</code>.</li></ol><h3 id="seeds" class="section-heading">
<a href="#seeds" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i> <a href="#seeds" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
<p class="sr-only">seeds</p> <p class="sr-only">seeds</p>
</a> </a>