mirror of
https://github.com/plausible/analytics.git
synced 2024-12-25 18:48:06 +03:00
deploy: 21bbd3835a
This commit is contained in:
parent
2ba7cc6061
commit
3c7bb4fb42
@ -1114,23 +1114,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="9211910373-1">(</span><span class="s">"create table ecto_ch_demo(a UInt64, b String) engine Null"</span><span class="p" data-group-id="9211910373-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="6370377689-1">(</span><span class="s">"create table ecto_ch_demo(a UInt64, b String) engine Null"</span><span class="p" data-group-id="6370377689-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="9211910373-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="6370377689-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">"ecto_ch_demo"</span><span class="w"> </span><span class="k" data-group-id="9211910373-3">do</span><span class="w">
|
</span><span class="n">schema</span><span class="w"> </span><span class="s">"ecto_ch_demo"</span><span class="w"> </span><span class="k" data-group-id="6370377689-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">"UInt64"</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">"UInt64"</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="9211910373-3">end</span><span class="w">
|
</span><span class="k" data-group-id="6370377689-3">end</span><span class="w">
|
||||||
</span><span class="k" data-group-id="9211910373-2">end</span><span class="w">
|
</span><span class="k" data-group-id="6370377689-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="9211910373-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="9211910373-5">fn</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="p" data-group-id="9211910373-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="9211910373-7">(</span><span class="n">i</span><span class="p" data-group-id="9211910373-7">)</span><span class="p" data-group-id="9211910373-6">}</span><span class="w"> </span><span class="k" data-group-id="9211910373-5">end</span><span class="p" data-group-id="9211910373-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="6370377689-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="6370377689-5">fn</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="p" data-group-id="6370377689-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="6370377689-7">(</span><span class="n">i</span><span class="p" data-group-id="6370377689-7">)</span><span class="p" data-group-id="6370377689-6">}</span><span class="w"> </span><span class="k" data-group-id="6370377689-5">end</span><span class="p" data-group-id="6370377689-4">)</span><span class="w">
|
||||||
</span><span class="p" data-group-id="9211910373-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="9211910373-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="9211910373-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="9211910373-9">)</span><span class="w">
|
</span><span class="p" data-group-id="6370377689-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="6370377689-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="6370377689-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="6370377689-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="9211910373-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="9211910373-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="9211910373-11">(</span><span class="s">"ecto_ch_demo"</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="9211910373-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="9211910373-13">(</span><span class="p" data-group-id="9211910373-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="9211910373-12">]</span><span class="p" data-group-id="9211910373-11">)</span></code></pre>
|
</span><span class="p" data-group-id="6370377689-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="6370377689-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="6370377689-11">(</span><span class="s">"ecto_ch_demo"</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="6370377689-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="6370377689-13">(</span><span class="p" data-group-id="6370377689-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="6370377689-12">]</span><span class="p" data-group-id="6370377689-11">)</span></code></pre>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
<section class="detail" id="load/2">
|
<section class="detail" id="load/2">
|
||||||
|
@ -690,12 +690,12 @@ this user owns + StatsAPI if the user has a configured Stats API key.</p><p>Give
|
|||||||
|
|
||||||
<p>Queries the ClickHouse database for the monthly pageview usage. If the given user's
|
<p>Queries the ClickHouse database for the monthly pageview usage. If the given user's
|
||||||
subscription is <code class="inline">active</code>, <code class="inline">past_due</code>, or a <code class="inline">deleted</code> (but not yet expired), a map
|
subscription is <code class="inline">active</code>, <code class="inline">past_due</code>, or a <code class="inline">deleted</code> (but not yet expired), a map
|
||||||
with the following structure is returned:</p><pre><code class="makeup elixir" translate="no"><span class="p" data-group-id="4558214907-1">%{</span><span class="w">
|
with the following structure is returned:</p><pre><code class="makeup elixir" translate="no"><span class="p" data-group-id="5697372969-1">%{</span><span class="w">
|
||||||
</span><span class="ss">current_cycle</span><span class="p">:</span><span class="w"> </span><span class="n">usage_cycle</span><span class="p" data-group-id="4558214907-2">(</span><span class="p" data-group-id="4558214907-2">)</span><span class="p">,</span><span class="w">
|
</span><span class="ss">current_cycle</span><span class="p">:</span><span class="w"> </span><span class="n">usage_cycle</span><span class="p" data-group-id="5697372969-2">(</span><span class="p" data-group-id="5697372969-2">)</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="ss">last_cycle</span><span class="p">:</span><span class="w"> </span><span class="n">usage_cycle</span><span class="p" data-group-id="4558214907-3">(</span><span class="p" data-group-id="4558214907-3">)</span><span class="p">,</span><span class="w">
|
</span><span class="ss">last_cycle</span><span class="p">:</span><span class="w"> </span><span class="n">usage_cycle</span><span class="p" data-group-id="5697372969-3">(</span><span class="p" data-group-id="5697372969-3">)</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="ss">penultimate_cycle</span><span class="p">:</span><span class="w"> </span><span class="n">usage_cycle</span><span class="p" data-group-id="4558214907-4">(</span><span class="p" data-group-id="4558214907-4">)</span><span class="w">
|
</span><span class="ss">penultimate_cycle</span><span class="p">:</span><span class="w"> </span><span class="n">usage_cycle</span><span class="p" data-group-id="5697372969-4">(</span><span class="p" data-group-id="5697372969-4">)</span><span class="w">
|
||||||
</span><span class="p" data-group-id="4558214907-1">}</span></code></pre><p>In all other cases of the subscription status (or a <code class="inline">free_10k</code> subscription which
|
</span><span class="p" data-group-id="5697372969-1">}</span></code></pre><p>In all other cases of the subscription status (or a <code class="inline">free_10k</code> subscription which
|
||||||
does not have a <code class="inline">last_bill_date</code> defined) - the following structure is returned:</p><pre><code class="makeup elixir" translate="no"><span class="p" data-group-id="2811631647-1">%{</span><span class="ss">last_30_days</span><span class="p">:</span><span class="w"> </span><span class="n">usage_cycle</span><span class="p" data-group-id="2811631647-2">(</span><span class="p" data-group-id="2811631647-2">)</span><span class="p" data-group-id="2811631647-1">}</span></code></pre><p>Given only a user as input, the usage is queried from across all the sites that the
|
does not have a <code class="inline">last_bill_date</code> defined) - the following structure is returned:</p><pre><code class="makeup elixir" translate="no"><span class="p" data-group-id="0954035262-1">%{</span><span class="ss">last_30_days</span><span class="p">:</span><span class="w"> </span><span class="n">usage_cycle</span><span class="p" data-group-id="0954035262-2">(</span><span class="p" data-group-id="0954035262-2">)</span><span class="p" data-group-id="0954035262-1">}</span></code></pre><p>Given only a user as input, the usage is queried from across all the sites that the
|
||||||
user owns. Alternatively, given an optional argument of <code class="inline">site_ids</code>, the usage from
|
user owns. Alternatively, given an optional argument of <code class="inline">site_ids</code>, the usage from
|
||||||
across all those sites is queried instead.</p>
|
across all those sites is queried instead.</p>
|
||||||
</section>
|
</section>
|
||||||
|
@ -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.37.2/Cldr.LanguageTag.html"><code class="inline">Cldr.LanguageTag</code></a>.</p><p>The format of an <code class="inline">Accept-Language</code> header is as follows in <code class="inline">ABNF</code> format:</p><pre><code class="makeup elixir" translate="no"><span class="w"> </span><span class="nc">Accept</span><span class="o">-</span><span class="nc">Language</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"Accept-Language"</span><span class="w"> </span><span class="s">":"</span><span class="w">
|
Language tags function are provided in <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.LanguageTag.html"><code class="inline">Cldr.LanguageTag</code></a>.</p><p>The format of an <code class="inline">Accept-Language</code> header is as follows in <code class="inline">ABNF</code> format:</p><pre><code class="makeup elixir" translate="no"><span class="w"> </span><span class="nc">Accept</span><span class="o">-</span><span class="nc">Language</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"Accept-Language"</span><span class="w"> </span><span class="s">":"</span><span class="w">
|
||||||
</span><span class="mi">1</span><span class="c1">#( language-range [ ";" "q" "=" qvalue ] )</span><span class="w">
|
</span><span class="mi">1</span><span class="c1">#( language-range [ ";" "q" "=" 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="4743136156-1">(</span><span class="w"> </span><span class="p" data-group-id="4743136156-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="4743136156-3">(</span><span class="w"> </span><span class="s">"-"</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="4743136156-3">)</span><span class="w"> </span><span class="p" data-group-id="4743136156-2">)</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="s">"*"</span><span class="w"> </span><span class="p" data-group-id="4743136156-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="1962508128-1">(</span><span class="w"> </span><span class="p" data-group-id="1962508128-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="1962508128-3">(</span><span class="w"> </span><span class="s">"-"</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="1962508128-3">)</span><span class="w"> </span><span class="p" data-group-id="1962508128-2">)</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="s">"*"</span><span class="w"> </span><span class="p" data-group-id="1962508128-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 "q=1". 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: "I prefer Danish, but will accept British English and other types of English."</p>
|
quality value defaults to "q=1". 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: "I prefer Danish, but will accept British English and other types of English."</p>
|
||||||
</section>
|
</section>
|
||||||
@ -232,54 +232,54 @@ a configured <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.html"><code class="
|
|||||||
Examples
|
Examples
|
||||||
</a>
|
</a>
|
||||||
</h2>
|
</h2>
|
||||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr.AcceptLanguage</span><span class="o">.</span><span class="n">best_match</span><span class="p" data-group-id="1161877883-1">(</span><span class="s">"da;q=0.1,zh-TW;q=0.3"</span><span class="p">,</span><span class="w"> </span><span class="nc">TestBackend.Cldr</span><span class="p" data-group-id="1161877883-1">)</span><span class="w">
|
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr.AcceptLanguage</span><span class="o">.</span><span class="n">best_match</span><span class="p" data-group-id="9157906098-1">(</span><span class="s">"da;q=0.1,zh-TW;q=0.3"</span><span class="p">,</span><span class="w"> </span><span class="nc">TestBackend.Cldr</span><span class="p" data-group-id="9157906098-1">)</span><span class="w">
|
||||||
</span><span class="p" data-group-id="1161877883-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
|
</span><span class="p" data-group-id="9157906098-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="p" data-group-id="1161877883-3">%</span><span class="nc" data-group-id="1161877883-3">Cldr.LanguageTag</span><span class="p" data-group-id="1161877883-3">{</span><span class="w">
|
</span><span class="p" data-group-id="9157906098-3">%</span><span class="nc" data-group-id="9157906098-3">Cldr.LanguageTag</span><span class="p" data-group-id="9157906098-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">"zh-TW"</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">"zh-TW"</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">:"zh-Hant"</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">:"zh-Hant"</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="1161877883-4">[</span><span class="p" data-group-id="1161877883-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="9157906098-4">[</span><span class="p" data-group-id="9157906098-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="1161877883-5">%{</span><span class="p" data-group-id="1161877883-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="9157906098-5">%{</span><span class="p" data-group-id="9157906098-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">"zh"</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">"zh"</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="1161877883-6">%{</span><span class="p" data-group-id="1161877883-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="9157906098-6">%{</span><span class="p" data-group-id="9157906098-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="1161877883-7">[</span><span class="p" data-group-id="1161877883-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="9157906098-7">[</span><span class="p" data-group-id="9157906098-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">:"zh-Hant"</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">:"zh-Hant"</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">"zh-TW"</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">"zh-TW"</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="1161877883-8">%{</span><span class="p" data-group-id="1161877883-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="9157906098-8">%{</span><span class="p" data-group-id="9157906098-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="1161877883-9">[</span><span class="p" data-group-id="1161877883-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="9157906098-9">[</span><span class="p" data-group-id="9157906098-9">]</span><span class="w">
|
||||||
</span><span class="p" data-group-id="1161877883-3">}</span><span class="p" data-group-id="1161877883-2">}</span><span class="w">
|
</span><span class="p" data-group-id="9157906098-3">}</span><span class="p" data-group-id="9157906098-2">}</span><span class="w">
|
||||||
|
|
||||||
</span><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr.AcceptLanguage</span><span class="o">.</span><span class="n">best_match</span><span class="p" data-group-id="1161877883-10">(</span><span class="s">"da;q=0.1,zh-TW;q=0.3"</span><span class="p">,</span><span class="w"> </span><span class="nc">TestBackend.Cldr</span><span class="p" data-group-id="1161877883-10">)</span><span class="w">
|
</span><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr.AcceptLanguage</span><span class="o">.</span><span class="n">best_match</span><span class="p" data-group-id="9157906098-10">(</span><span class="s">"da;q=0.1,zh-TW;q=0.3"</span><span class="p">,</span><span class="w"> </span><span class="nc">TestBackend.Cldr</span><span class="p" data-group-id="9157906098-10">)</span><span class="w">
|
||||||
</span><span class="p" data-group-id="1161877883-11">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
|
</span><span class="p" data-group-id="9157906098-11">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="p" data-group-id="1161877883-12">%</span><span class="nc" data-group-id="1161877883-12">Cldr.LanguageTag</span><span class="p" data-group-id="1161877883-12">{</span><span class="w">
|
</span><span class="p" data-group-id="9157906098-12">%</span><span class="nc" data-group-id="9157906098-12">Cldr.LanguageTag</span><span class="p" data-group-id="9157906098-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">"zh-TW"</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">"zh-TW"</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">:"zh-Hant"</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">:"zh-Hant"</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="1161877883-13">[</span><span class="p" data-group-id="1161877883-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="9157906098-13">[</span><span class="p" data-group-id="9157906098-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="1161877883-14">%{</span><span class="p" data-group-id="1161877883-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="9157906098-14">%{</span><span class="p" data-group-id="9157906098-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">"zh"</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">"zh"</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="1161877883-15">%{</span><span class="p" data-group-id="1161877883-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="9157906098-15">%{</span><span class="p" data-group-id="9157906098-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="1161877883-16">[</span><span class="p" data-group-id="1161877883-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="9157906098-16">[</span><span class="p" data-group-id="9157906098-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">:"zh-Hant"</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">:"zh-Hant"</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">"zh-TW"</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">"zh-TW"</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="1161877883-17">%{</span><span class="p" data-group-id="1161877883-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="9157906098-17">%{</span><span class="p" data-group-id="9157906098-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="1161877883-18">[</span><span class="p" data-group-id="1161877883-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="9157906098-18">[</span><span class="p" data-group-id="9157906098-18">]</span><span class="w">
|
||||||
</span><span class="p" data-group-id="1161877883-12">}</span><span class="p" data-group-id="1161877883-11">}</span><span class="w">
|
</span><span class="p" data-group-id="9157906098-12">}</span><span class="p" data-group-id="9157906098-11">}</span><span class="w">
|
||||||
|
|
||||||
</span><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr.AcceptLanguage</span><span class="o">.</span><span class="n">best_match</span><span class="p" data-group-id="1161877883-19">(</span><span class="s">"xx,yy;q=0.3"</span><span class="p" data-group-id="1161877883-19">)</span><span class="w">
|
</span><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr.AcceptLanguage</span><span class="o">.</span><span class="n">best_match</span><span class="p" data-group-id="9157906098-19">(</span><span class="s">"xx,yy;q=0.3"</span><span class="p" data-group-id="9157906098-19">)</span><span class="w">
|
||||||
</span><span class="p" data-group-id="1161877883-20">{</span><span class="ss">:error</span><span class="p">,</span><span class="w">
|
</span><span class="p" data-group-id="9157906098-20">{</span><span class="ss">:error</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="p" data-group-id="1161877883-21">{</span><span class="nc">Cldr.NoMatchingLocale</span><span class="p">,</span><span class="w">
|
</span><span class="p" data-group-id="9157906098-21">{</span><span class="nc">Cldr.NoMatchingLocale</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="s">"No configured locale could be matched to </span><span class="se">\"</span><span class="s">xx,yy;q=0.3</span><span class="se">\"</span><span class="s">"</span><span class="p" data-group-id="1161877883-21">}</span><span class="p" data-group-id="1161877883-20">}</span><span class="w">
|
</span><span class="s">"No configured locale could be matched to </span><span class="se">\"</span><span class="s">xx,yy;q=0.3</span><span class="se">\"</span><span class="s">"</span><span class="p" data-group-id="9157906098-21">}</span><span class="p" data-group-id="9157906098-20">}</span><span class="w">
|
||||||
|
|
||||||
</span><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr.AcceptLanguage</span><span class="o">.</span><span class="n">best_match</span><span class="p" data-group-id="1161877883-22">(</span><span class="s">"invalid_tag"</span><span class="p" data-group-id="1161877883-22">)</span><span class="w">
|
</span><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr.AcceptLanguage</span><span class="o">.</span><span class="n">best_match</span><span class="p" data-group-id="9157906098-22">(</span><span class="s">"invalid_tag"</span><span class="p" data-group-id="9157906098-22">)</span><span class="w">
|
||||||
</span><span class="p" data-group-id="1161877883-23">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1161877883-24">{</span><span class="nc">Cldr.LanguageTag.ParseError</span><span class="p">,</span><span class="w">
|
</span><span class="p" data-group-id="9157906098-23">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="9157906098-24">{</span><span class="nc">Cldr.LanguageTag.ParseError</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="s">"Expected a BCP47 language tag. Could not parse the remaining </span><span class="se">\"</span><span class="s">g</span><span class="se">\"</span><span class="s"> starting at position 11"</span><span class="p" data-group-id="1161877883-24">}</span><span class="p" data-group-id="1161877883-23">}</span></code></pre>
|
</span><span class="s">"Expected a BCP47 language tag. Could not parse the remaining </span><span class="se">\"</span><span class="s">g</span><span class="se">\"</span><span class="s"> starting at position 11"</span><span class="p" data-group-id="9157906098-24">}</span><span class="p" data-group-id="9157906098-23">}</span></code></pre>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
<section class="detail" id="parse/1">
|
<section class="detail" id="parse/1">
|
||||||
@ -340,95 +340,95 @@ wuth an error tuple for each invalid tag added at the end of the list.</p><h2 id
|
|||||||
Example
|
Example
|
||||||
</a>
|
</a>
|
||||||
</h2>
|
</h2>
|
||||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </span><span class="nc">Cldr.AcceptLanguage</span><span class="o">.</span><span class="n">parse</span><span class="p" data-group-id="9192432991-1">(</span><span class="s">"da,zh-TW;q=0.3"</span><span class="p">,</span><span class="w"> </span><span class="nc">TestBackend.Cldr</span><span class="p" data-group-id="9192432991-1">)</span><span class="w">
|
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </span><span class="nc">Cldr.AcceptLanguage</span><span class="o">.</span><span class="n">parse</span><span class="p" data-group-id="7971113980-1">(</span><span class="s">"da,zh-TW;q=0.3"</span><span class="p">,</span><span class="w"> </span><span class="nc">TestBackend.Cldr</span><span class="p" data-group-id="7971113980-1">)</span><span class="w">
|
||||||
</span><span class="p" data-group-id="9192432991-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
|
</span><span class="p" data-group-id="7971113980-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="p" data-group-id="9192432991-3">[</span><span class="w">
|
</span><span class="p" data-group-id="7971113980-3">[</span><span class="w">
|
||||||
</span><span class="p" data-group-id="9192432991-4">{</span><span class="mf">1.0</span><span class="p">,</span><span class="w">
|
</span><span class="p" data-group-id="7971113980-4">{</span><span class="mf">1.0</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="p" data-group-id="9192432991-5">%</span><span class="nc" data-group-id="9192432991-5">Cldr.LanguageTag</span><span class="p" data-group-id="9192432991-5">{</span><span class="w">
|
</span><span class="p" data-group-id="7971113980-5">%</span><span class="nc" data-group-id="7971113980-5">Cldr.LanguageTag</span><span class="p" data-group-id="7971113980-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">"da"</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">"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">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="9192432991-6">[</span><span class="p" data-group-id="9192432991-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="7971113980-6">[</span><span class="p" data-group-id="7971113980-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="9192432991-7">%{</span><span class="p" data-group-id="9192432991-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="7971113980-7">%{</span><span class="p" data-group-id="7971113980-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">"da"</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">"da"</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="9192432991-8">%{</span><span class="p" data-group-id="9192432991-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="7971113980-8">%{</span><span class="p" data-group-id="7971113980-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="9192432991-9">[</span><span class="p" data-group-id="9192432991-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="7971113980-9">[</span><span class="p" data-group-id="7971113980-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">"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">"da"</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="9192432991-10">%{</span><span class="p" data-group-id="9192432991-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="7971113980-10">%{</span><span class="p" data-group-id="7971113980-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="9192432991-11">[</span><span class="p" data-group-id="9192432991-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="7971113980-11">[</span><span class="p" data-group-id="7971113980-11">]</span><span class="w">
|
||||||
</span><span class="p" data-group-id="9192432991-5">}</span><span class="p" data-group-id="9192432991-4">}</span><span class="p">,</span><span class="w">
|
</span><span class="p" data-group-id="7971113980-5">}</span><span class="p" data-group-id="7971113980-4">}</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="p" data-group-id="9192432991-12">{</span><span class="mf">0.3</span><span class="p">,</span><span class="w">
|
</span><span class="p" data-group-id="7971113980-12">{</span><span class="mf">0.3</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="p" data-group-id="9192432991-13">%</span><span class="nc" data-group-id="9192432991-13">Cldr.LanguageTag</span><span class="p" data-group-id="9192432991-13">{</span><span class="w">
|
</span><span class="p" data-group-id="7971113980-13">%</span><span class="nc" data-group-id="7971113980-13">Cldr.LanguageTag</span><span class="p" data-group-id="7971113980-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">"zh-TW"</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">"zh-TW"</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">:"zh-Hant"</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">:"zh-Hant"</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="9192432991-14">[</span><span class="p" data-group-id="9192432991-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="7971113980-14">[</span><span class="p" data-group-id="7971113980-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="9192432991-15">%{</span><span class="p" data-group-id="9192432991-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="7971113980-15">%{</span><span class="p" data-group-id="7971113980-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">"zh"</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">"zh"</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="9192432991-16">%{</span><span class="p" data-group-id="9192432991-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="7971113980-16">%{</span><span class="p" data-group-id="7971113980-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="9192432991-17">[</span><span class="p" data-group-id="9192432991-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="7971113980-17">[</span><span class="p" data-group-id="7971113980-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">:"zh-Hant"</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">:"zh-Hant"</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">"zh-TW"</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">"zh-TW"</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="9192432991-18">%{</span><span class="p" data-group-id="9192432991-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="7971113980-18">%{</span><span class="p" data-group-id="7971113980-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="9192432991-19">[</span><span class="p" data-group-id="9192432991-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="7971113980-19">[</span><span class="p" data-group-id="7971113980-19">]</span><span class="w">
|
||||||
</span><span class="p" data-group-id="9192432991-13">}</span><span class="p" data-group-id="9192432991-12">}</span><span class="w">
|
</span><span class="p" data-group-id="7971113980-13">}</span><span class="p" data-group-id="7971113980-12">}</span><span class="w">
|
||||||
</span><span class="p" data-group-id="9192432991-3">]</span><span class="p" data-group-id="9192432991-2">}</span><span class="w">
|
</span><span class="p" data-group-id="7971113980-3">]</span><span class="p" data-group-id="7971113980-2">}</span><span class="w">
|
||||||
|
|
||||||
</span><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr.AcceptLanguage</span><span class="o">.</span><span class="n">parse</span><span class="p" data-group-id="9192432991-20">(</span><span class="s">"invalid_tag"</span><span class="p" data-group-id="9192432991-20">)</span><span class="w">
|
</span><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr.AcceptLanguage</span><span class="o">.</span><span class="n">parse</span><span class="p" data-group-id="7971113980-20">(</span><span class="s">"invalid_tag"</span><span class="p" data-group-id="7971113980-20">)</span><span class="w">
|
||||||
</span><span class="p" data-group-id="9192432991-21">{</span><span class="ss">:error</span><span class="p">,</span><span class="w">
|
</span><span class="p" data-group-id="7971113980-21">{</span><span class="ss">:error</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="p" data-group-id="9192432991-22">{</span><span class="nc">Cldr.LanguageTag.ParseError</span><span class="p">,</span><span class="w">
|
</span><span class="p" data-group-id="7971113980-22">{</span><span class="nc">Cldr.LanguageTag.ParseError</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="s">"Expected a BCP47 language tag. Could not parse the remaining </span><span class="se">\"</span><span class="s">g</span><span class="se">\"</span><span class="s"> starting at position 11"</span><span class="p" data-group-id="9192432991-22">}</span><span class="p" data-group-id="9192432991-21">}</span><span class="w">
|
</span><span class="s">"Expected a BCP47 language tag. Could not parse the remaining </span><span class="se">\"</span><span class="s">g</span><span class="se">\"</span><span class="s"> starting at position 11"</span><span class="p" data-group-id="7971113980-22">}</span><span class="p" data-group-id="7971113980-21">}</span><span class="w">
|
||||||
|
|
||||||
</span><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr.AcceptLanguage</span><span class="o">.</span><span class="n">parse</span><span class="p" data-group-id="9192432991-23">(</span><span class="s">"da,zh-TW;q=0.3,invalid_tag"</span><span class="p" data-group-id="9192432991-23">)</span><span class="w">
|
</span><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr.AcceptLanguage</span><span class="o">.</span><span class="n">parse</span><span class="p" data-group-id="7971113980-23">(</span><span class="s">"da,zh-TW;q=0.3,invalid_tag"</span><span class="p" data-group-id="7971113980-23">)</span><span class="w">
|
||||||
</span><span class="p" data-group-id="9192432991-24">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
|
</span><span class="p" data-group-id="7971113980-24">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="p" data-group-id="9192432991-25">[</span><span class="w">
|
</span><span class="p" data-group-id="7971113980-25">[</span><span class="w">
|
||||||
</span><span class="p" data-group-id="9192432991-26">{</span><span class="mf">1.0</span><span class="p">,</span><span class="w">
|
</span><span class="p" data-group-id="7971113980-26">{</span><span class="mf">1.0</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="p" data-group-id="9192432991-27">%</span><span class="nc" data-group-id="9192432991-27">Cldr.LanguageTag</span><span class="p" data-group-id="9192432991-27">{</span><span class="w">
|
</span><span class="p" data-group-id="7971113980-27">%</span><span class="nc" data-group-id="7971113980-27">Cldr.LanguageTag</span><span class="p" data-group-id="7971113980-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">"da"</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">"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">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="9192432991-28">[</span><span class="p" data-group-id="9192432991-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="7971113980-28">[</span><span class="p" data-group-id="7971113980-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="9192432991-29">%{</span><span class="p" data-group-id="9192432991-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="7971113980-29">%{</span><span class="p" data-group-id="7971113980-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">"da"</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">"da"</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="9192432991-30">%{</span><span class="p" data-group-id="9192432991-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="7971113980-30">%{</span><span class="p" data-group-id="7971113980-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="9192432991-31">[</span><span class="p" data-group-id="9192432991-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="7971113980-31">[</span><span class="p" data-group-id="7971113980-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">"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">"da"</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="9192432991-32">%{</span><span class="p" data-group-id="9192432991-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="7971113980-32">%{</span><span class="p" data-group-id="7971113980-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="9192432991-33">[</span><span class="p" data-group-id="9192432991-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="7971113980-33">[</span><span class="p" data-group-id="7971113980-33">]</span><span class="w">
|
||||||
</span><span class="p" data-group-id="9192432991-27">}</span><span class="p" data-group-id="9192432991-26">}</span><span class="p">,</span><span class="w">
|
</span><span class="p" data-group-id="7971113980-27">}</span><span class="p" data-group-id="7971113980-26">}</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="p" data-group-id="9192432991-34">{</span><span class="mf">0.3</span><span class="p">,</span><span class="w">
|
</span><span class="p" data-group-id="7971113980-34">{</span><span class="mf">0.3</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="p" data-group-id="9192432991-35">%</span><span class="nc" data-group-id="9192432991-35">Cldr.LanguageTag</span><span class="p" data-group-id="9192432991-35">{</span><span class="w">
|
</span><span class="p" data-group-id="7971113980-35">%</span><span class="nc" data-group-id="7971113980-35">Cldr.LanguageTag</span><span class="p" data-group-id="7971113980-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">"zh-TW"</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">"zh-TW"</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">:"zh-Hant"</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">:"zh-Hant"</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="9192432991-36">[</span><span class="p" data-group-id="9192432991-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="7971113980-36">[</span><span class="p" data-group-id="7971113980-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="9192432991-37">%{</span><span class="p" data-group-id="9192432991-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="7971113980-37">%{</span><span class="p" data-group-id="7971113980-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">"zh"</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">"zh"</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="9192432991-38">%{</span><span class="p" data-group-id="9192432991-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="7971113980-38">%{</span><span class="p" data-group-id="7971113980-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="9192432991-39">[</span><span class="p" data-group-id="9192432991-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="7971113980-39">[</span><span class="p" data-group-id="7971113980-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">:"zh-Hant"</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">:"zh-Hant"</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">"zh-TW"</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">"zh-TW"</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="9192432991-40">%{</span><span class="p" data-group-id="9192432991-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="7971113980-40">%{</span><span class="p" data-group-id="7971113980-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="9192432991-41">[</span><span class="p" data-group-id="9192432991-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="7971113980-41">[</span><span class="p" data-group-id="7971113980-41">]</span><span class="w">
|
||||||
</span><span class="p" data-group-id="9192432991-35">}</span><span class="p" data-group-id="9192432991-34">}</span><span class="p">,</span><span class="w">
|
</span><span class="p" data-group-id="7971113980-35">}</span><span class="p" data-group-id="7971113980-34">}</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="p" data-group-id="9192432991-42">{</span><span class="ss">:error</span><span class="p">,</span><span class="w">
|
</span><span class="p" data-group-id="7971113980-42">{</span><span class="ss">:error</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="p" data-group-id="9192432991-43">{</span><span class="nc">Cldr.LanguageTag.ParseError</span><span class="p">,</span><span class="w">
|
</span><span class="p" data-group-id="7971113980-43">{</span><span class="nc">Cldr.LanguageTag.ParseError</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="s">"Expected a BCP47 language tag. Could not parse the remaining </span><span class="se">\"</span><span class="s">g</span><span class="se">\"</span><span class="s"> starting at position 11"</span><span class="p" data-group-id="9192432991-43">}</span><span class="p" data-group-id="9192432991-42">}</span><span class="w">
|
</span><span class="s">"Expected a BCP47 language tag. Could not parse the remaining </span><span class="se">\"</span><span class="s">g</span><span class="se">\"</span><span class="s"> starting at position 11"</span><span class="p" data-group-id="7971113980-43">}</span><span class="p" data-group-id="7971113980-42">}</span><span class="w">
|
||||||
</span><span class="p" data-group-id="9192432991-25">]</span><span class="p" data-group-id="9192432991-24">}</span></code></pre>
|
</span><span class="p" data-group-id="7971113980-25">]</span><span class="p" data-group-id="7971113980-24">}</span></code></pre>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
<section class="detail" id="parse!/1">
|
<section class="detail" id="parse!/1">
|
||||||
@ -473,92 +473,92 @@ wuth an error tuple for each invalid tag added at the end of the list.</p><h2 id
|
|||||||
Example
|
Example
|
||||||
</a>
|
</a>
|
||||||
</h2>
|
</h2>
|
||||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr.AcceptLanguage</span><span class="o">.</span><span class="n">parse!</span><span class="p" data-group-id="0668310071-1">(</span><span class="s">"da,zh-TW;q=0.3"</span><span class="p" data-group-id="0668310071-1">)</span><span class="w">
|
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr.AcceptLanguage</span><span class="o">.</span><span class="n">parse!</span><span class="p" data-group-id="3029588875-1">(</span><span class="s">"da,zh-TW;q=0.3"</span><span class="p" data-group-id="3029588875-1">)</span><span class="w">
|
||||||
</span><span class="p" data-group-id="0668310071-2">[</span><span class="w">
|
</span><span class="p" data-group-id="3029588875-2">[</span><span class="w">
|
||||||
</span><span class="p" data-group-id="0668310071-3">{</span><span class="mf">1.0</span><span class="p">,</span><span class="w">
|
</span><span class="p" data-group-id="3029588875-3">{</span><span class="mf">1.0</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="p" data-group-id="0668310071-4">%</span><span class="nc" data-group-id="0668310071-4">Cldr.LanguageTag</span><span class="p" data-group-id="0668310071-4">{</span><span class="w">
|
</span><span class="p" data-group-id="3029588875-4">%</span><span class="nc" data-group-id="3029588875-4">Cldr.LanguageTag</span><span class="p" data-group-id="3029588875-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">"da"</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">"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">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="0668310071-5">[</span><span class="p" data-group-id="0668310071-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="3029588875-5">[</span><span class="p" data-group-id="3029588875-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="0668310071-6">%{</span><span class="p" data-group-id="0668310071-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="3029588875-6">%{</span><span class="p" data-group-id="3029588875-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">"da"</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">"da"</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="0668310071-7">%{</span><span class="p" data-group-id="0668310071-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="3029588875-7">%{</span><span class="p" data-group-id="3029588875-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="0668310071-8">[</span><span class="p" data-group-id="0668310071-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="3029588875-8">[</span><span class="p" data-group-id="3029588875-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">"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">"da"</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="0668310071-9">%{</span><span class="p" data-group-id="0668310071-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="3029588875-9">%{</span><span class="p" data-group-id="3029588875-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="0668310071-10">[</span><span class="p" data-group-id="0668310071-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="3029588875-10">[</span><span class="p" data-group-id="3029588875-10">]</span><span class="w">
|
||||||
</span><span class="p" data-group-id="0668310071-4">}</span><span class="p" data-group-id="0668310071-3">}</span><span class="p">,</span><span class="w">
|
</span><span class="p" data-group-id="3029588875-4">}</span><span class="p" data-group-id="3029588875-3">}</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="p" data-group-id="0668310071-11">{</span><span class="mf">0.3</span><span class="p">,</span><span class="w">
|
</span><span class="p" data-group-id="3029588875-11">{</span><span class="mf">0.3</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="p" data-group-id="0668310071-12">%</span><span class="nc" data-group-id="0668310071-12">Cldr.LanguageTag</span><span class="p" data-group-id="0668310071-12">{</span><span class="w">
|
</span><span class="p" data-group-id="3029588875-12">%</span><span class="nc" data-group-id="3029588875-12">Cldr.LanguageTag</span><span class="p" data-group-id="3029588875-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">"zh-TW"</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">"zh-TW"</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">:"zh-Hant"</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">:"zh-Hant"</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="0668310071-13">[</span><span class="p" data-group-id="0668310071-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="3029588875-13">[</span><span class="p" data-group-id="3029588875-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="0668310071-14">%{</span><span class="p" data-group-id="0668310071-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="3029588875-14">%{</span><span class="p" data-group-id="3029588875-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">"zh"</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">"zh"</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="0668310071-15">%{</span><span class="p" data-group-id="0668310071-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="3029588875-15">%{</span><span class="p" data-group-id="3029588875-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="0668310071-16">[</span><span class="p" data-group-id="0668310071-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="3029588875-16">[</span><span class="p" data-group-id="3029588875-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">:"zh-Hant"</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">:"zh-Hant"</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">"zh-TW"</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">"zh-TW"</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="0668310071-17">%{</span><span class="p" data-group-id="0668310071-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="3029588875-17">%{</span><span class="p" data-group-id="3029588875-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="0668310071-18">[</span><span class="p" data-group-id="0668310071-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="3029588875-18">[</span><span class="p" data-group-id="3029588875-18">]</span><span class="w">
|
||||||
</span><span class="p" data-group-id="0668310071-12">}</span><span class="p" data-group-id="0668310071-11">}</span><span class="w">
|
</span><span class="p" data-group-id="3029588875-12">}</span><span class="p" data-group-id="3029588875-11">}</span><span class="w">
|
||||||
</span><span class="p" data-group-id="0668310071-2">]</span><span class="w">
|
</span><span class="p" data-group-id="3029588875-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">"invalid_tag"</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">"invalid_tag"</span><span class="w">
|
||||||
</span><span class="gt">** (Cldr.AcceptLanguageError) "Expected a BCP47 language tag. Could not parse the remaining "g" starting at position 11
|
</span><span class="gt">** (Cldr.AcceptLanguageError) "Expected a BCP47 language tag. Could not parse the remaining "g" 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> </span><span class="nc">Plausible.Cldr.AcceptLanguage</span><span class="o">.</span><span class="n">parse!</span><span class="p" data-group-id="0668310071-19">(</span><span class="s">"da,zh-TW;q=0.3,invalid_tag"</span><span class="p" data-group-id="0668310071-19">)</span><span class="w">
|
</span><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr.AcceptLanguage</span><span class="o">.</span><span class="n">parse!</span><span class="p" data-group-id="3029588875-19">(</span><span class="s">"da,zh-TW;q=0.3,invalid_tag"</span><span class="p" data-group-id="3029588875-19">)</span><span class="w">
|
||||||
</span><span class="p" data-group-id="0668310071-20">[</span><span class="w">
|
</span><span class="p" data-group-id="3029588875-20">[</span><span class="w">
|
||||||
</span><span class="p" data-group-id="0668310071-21">{</span><span class="mf">1.0</span><span class="p">,</span><span class="w">
|
</span><span class="p" data-group-id="3029588875-21">{</span><span class="mf">1.0</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="p" data-group-id="0668310071-22">%</span><span class="nc" data-group-id="0668310071-22">Cldr.LanguageTag</span><span class="p" data-group-id="0668310071-22">{</span><span class="w">
|
</span><span class="p" data-group-id="3029588875-22">%</span><span class="nc" data-group-id="3029588875-22">Cldr.LanguageTag</span><span class="p" data-group-id="3029588875-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">"da"</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">"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">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="0668310071-23">[</span><span class="p" data-group-id="0668310071-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="3029588875-23">[</span><span class="p" data-group-id="3029588875-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="0668310071-24">%{</span><span class="p" data-group-id="0668310071-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="3029588875-24">%{</span><span class="p" data-group-id="3029588875-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">"da"</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">"da"</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="0668310071-25">%{</span><span class="p" data-group-id="0668310071-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="3029588875-25">%{</span><span class="p" data-group-id="3029588875-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="0668310071-26">[</span><span class="p" data-group-id="0668310071-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="3029588875-26">[</span><span class="p" data-group-id="3029588875-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">"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">"da"</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="0668310071-27">%{</span><span class="p" data-group-id="0668310071-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="3029588875-27">%{</span><span class="p" data-group-id="3029588875-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="0668310071-28">[</span><span class="p" data-group-id="0668310071-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="3029588875-28">[</span><span class="p" data-group-id="3029588875-28">]</span><span class="w">
|
||||||
</span><span class="p" data-group-id="0668310071-22">}</span><span class="p" data-group-id="0668310071-21">}</span><span class="p">,</span><span class="w">
|
</span><span class="p" data-group-id="3029588875-22">}</span><span class="p" data-group-id="3029588875-21">}</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="p" data-group-id="0668310071-29">{</span><span class="mf">0.3</span><span class="p">,</span><span class="w">
|
</span><span class="p" data-group-id="3029588875-29">{</span><span class="mf">0.3</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="p" data-group-id="0668310071-30">%</span><span class="nc" data-group-id="0668310071-30">Cldr.LanguageTag</span><span class="p" data-group-id="0668310071-30">{</span><span class="w">
|
</span><span class="p" data-group-id="3029588875-30">%</span><span class="nc" data-group-id="3029588875-30">Cldr.LanguageTag</span><span class="p" data-group-id="3029588875-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">"zh-TW"</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">"zh-TW"</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">:"zh-Hant"</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">:"zh-Hant"</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="0668310071-31">[</span><span class="p" data-group-id="0668310071-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="3029588875-31">[</span><span class="p" data-group-id="3029588875-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="0668310071-32">%{</span><span class="p" data-group-id="0668310071-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="3029588875-32">%{</span><span class="p" data-group-id="3029588875-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">"zh"</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">"zh"</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="0668310071-33">%{</span><span class="p" data-group-id="0668310071-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="3029588875-33">%{</span><span class="p" data-group-id="3029588875-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="0668310071-34">[</span><span class="p" data-group-id="0668310071-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="3029588875-34">[</span><span class="p" data-group-id="3029588875-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">:"zh-Hant"</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">:"zh-Hant"</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">"zh-TW"</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">"zh-TW"</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="0668310071-35">%{</span><span class="p" data-group-id="0668310071-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="3029588875-35">%{</span><span class="p" data-group-id="3029588875-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="0668310071-36">[</span><span class="p" data-group-id="0668310071-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="3029588875-36">[</span><span class="p" data-group-id="3029588875-36">]</span><span class="w">
|
||||||
</span><span class="p" data-group-id="0668310071-30">}</span><span class="p" data-group-id="0668310071-29">}</span><span class="p">,</span><span class="w">
|
</span><span class="p" data-group-id="3029588875-30">}</span><span class="p" data-group-id="3029588875-29">}</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="p" data-group-id="0668310071-37">{</span><span class="ss">:error</span><span class="p">,</span><span class="w">
|
</span><span class="p" data-group-id="3029588875-37">{</span><span class="ss">:error</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="p" data-group-id="0668310071-38">{</span><span class="nc">Cldr.LanguageTag.ParseError</span><span class="p">,</span><span class="w">
|
</span><span class="p" data-group-id="3029588875-38">{</span><span class="nc">Cldr.LanguageTag.ParseError</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="s">"Expected a BCP47 language tag. Could not parse the remaining </span><span class="se">\"</span><span class="s">g</span><span class="se">\"</span><span class="s"> starting at position 11"</span><span class="p" data-group-id="0668310071-38">}</span><span class="p" data-group-id="0668310071-37">}</span><span class="w">
|
</span><span class="s">"Expected a BCP47 language tag. Could not parse the remaining </span><span class="se">\"</span><span class="s">g</span><span class="se">\"</span><span class="s"> starting at position 11"</span><span class="p" data-group-id="3029588875-38">}</span><span class="p" data-group-id="3029588875-37">}</span><span class="w">
|
||||||
</span><span class="p" data-group-id="0668310071-20">]</span></code></pre>
|
</span><span class="p" data-group-id="3029588875-20">]</span></code></pre>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
@ -390,11 +390,11 @@ The default is <code class="inline">:all</code>. See <a href="https://hexdocs.pm
|
|||||||
</h2>
|
</h2>
|
||||||
<p> MyApp.Cldr.Currency.currencies_for_locale "en"
|
<p> MyApp.Cldr.Currency.currencies_for_locale "en"
|
||||||
=> {:ok,
|
=> {: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="9881631532-1">%</span><span class="nc" data-group-id="9881631532-1">Cldr.Currency</span><span class="p" data-group-id="9881631532-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="2703196086-1">%</span><span class="nc" data-group-id="2703196086-1">Cldr.Currency</span><span class="p" data-group-id="2703196086-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">"FJD"</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">"FJD"</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="9881631532-2">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">"Fijian dollar"</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">"Fijian dollars"</span><span class="p" data-group-id="9881631532-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="2703196086-2">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">"Fijian dollar"</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">"Fijian dollars"</span><span class="p" data-group-id="2703196086-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">
|
||||||
@ -404,12 +404,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">"FJD"</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">"FJD"</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="9881631532-1">}</span><span class="p">,</span><span class="w">
|
</span><span class="p" data-group-id="2703196086-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="9881631532-3">%</span><span class="nc" data-group-id="9881631532-3">Cldr.Currency</span><span class="p" data-group-id="9881631532-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="2703196086-3">%</span><span class="nc" data-group-id="2703196086-3">Cldr.Currency</span><span class="p" data-group-id="2703196086-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">"SUR"</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">"SUR"</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="9881631532-4">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">"Soviet rouble"</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">"Soviet roubles"</span><span class="p" data-group-id="9881631532-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="2703196086-4">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">"Soviet rouble"</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">"Soviet roubles"</span><span class="p" data-group-id="2703196086-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">
|
||||||
@ -419,7 +419,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">"SUR"</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">"SUR"</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="9881631532-3">}</span><span class="p">,</span><span class="w">
|
</span><span class="p" data-group-id="2703196086-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>
|
||||||
@ -470,11 +470,11 @@ The default is <code class="inline">:all</code>. See <a href="https://hexdocs.pm
|
|||||||
</a>
|
</a>
|
||||||
</h2>
|
</h2>
|
||||||
<p> MyApp.Cldr.Currency.currencies_for_locale! "en"
|
<p> MyApp.Cldr.Currency.currencies_for_locale! "en"
|
||||||
=> %{</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="2175473468-1">%</span><span class="nc" data-group-id="2175473468-1">Cldr.Currency</span><span class="p" data-group-id="2175473468-1">{</span><span class="w">
|
=> %{</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="0977348022-1">%</span><span class="nc" data-group-id="0977348022-1">Cldr.Currency</span><span class="p" data-group-id="0977348022-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">"FJD"</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">"FJD"</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="2175473468-2">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">"Fijian dollar"</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">"Fijian dollars"</span><span class="p" data-group-id="2175473468-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="0977348022-2">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">"Fijian dollar"</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">"Fijian dollars"</span><span class="p" data-group-id="0977348022-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">
|
||||||
@ -484,12 +484,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">"FJD"</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">"FJD"</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="2175473468-1">}</span><span class="p">,</span><span class="w">
|
</span><span class="p" data-group-id="0977348022-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="2175473468-3">%</span><span class="nc" data-group-id="2175473468-3">Cldr.Currency</span><span class="p" data-group-id="2175473468-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="0977348022-3">%</span><span class="nc" data-group-id="0977348022-3">Cldr.Currency</span><span class="p" data-group-id="0977348022-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">"SUR"</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">"SUR"</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="2175473468-4">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">"Soviet rouble"</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">"Soviet roubles"</span><span class="p" data-group-id="2175473468-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="0977348022-4">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">"Soviet rouble"</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">"Soviet roubles"</span><span class="p" data-group-id="0977348022-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">
|
||||||
@ -499,7 +499,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">"SUR"</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">"SUR"</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="2175473468-3">}</span><span class="p">,</span><span class="w">
|
</span><span class="p" data-group-id="0977348022-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>
|
||||||
@ -557,13 +557,13 @@ or a <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.LanguageTag.html"><code cla
|
|||||||
Examples
|
Examples
|
||||||
</a>
|
</a>
|
||||||
</h2>
|
</h2>
|
||||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </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="9117726790-1">(</span><span class="s">"AUD"</span><span class="p" data-group-id="9117726790-1">)</span><span class="w">
|
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </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="6193373682-1">(</span><span class="s">"AUD"</span><span class="p" data-group-id="6193373682-1">)</span><span class="w">
|
||||||
</span><span class="p" data-group-id="9117726790-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
|
</span><span class="p" data-group-id="6193373682-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="p" data-group-id="9117726790-3">%</span><span class="nc" data-group-id="9117726790-3">Cldr.Currency</span><span class="p" data-group-id="9117726790-3">{</span><span class="w">
|
</span><span class="p" data-group-id="6193373682-3">%</span><span class="nc" data-group-id="6193373682-3">Cldr.Currency</span><span class="p" data-group-id="6193373682-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">"AUD"</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">"AUD"</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="9117726790-4">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">"Australian dollar"</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">"Australian dollars"</span><span class="p" data-group-id="9117726790-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="6193373682-4">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">"Australian dollar"</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">"Australian dollars"</span><span class="p" data-group-id="6193373682-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">"Australian Dollar"</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">"Australian Dollar"</span><span class="p">,</span><span class="w">
|
||||||
@ -571,15 +571,15 @@ or a <a href="https://hexdocs.pm/ex_cldr/2.37.2/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">"A$"</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">"A$"</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="9117726790-3">}</span><span class="p" data-group-id="9117726790-2">}</span><span class="w">
|
</span><span class="p" data-group-id="6193373682-3">}</span><span class="p" data-group-id="6193373682-2">}</span><span class="w">
|
||||||
|
|
||||||
</span><span class="gp unselectable">iex> </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="9117726790-5">(</span><span class="s">"THB"</span><span class="p" data-group-id="9117726790-5">)</span><span class="w">
|
</span><span class="gp unselectable">iex> </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="6193373682-5">(</span><span class="s">"THB"</span><span class="p" data-group-id="6193373682-5">)</span><span class="w">
|
||||||
</span><span class="p" data-group-id="9117726790-6">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
|
</span><span class="p" data-group-id="6193373682-6">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="p" data-group-id="9117726790-7">%</span><span class="nc" data-group-id="9117726790-7">Cldr.Currency</span><span class="p" data-group-id="9117726790-7">{</span><span class="w">
|
</span><span class="p" data-group-id="6193373682-7">%</span><span class="nc" data-group-id="6193373682-7">Cldr.Currency</span><span class="p" data-group-id="6193373682-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">"THB"</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">"THB"</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="9117726790-8">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">"Thai baht"</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">"Thai baht"</span><span class="p" data-group-id="9117726790-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="6193373682-8">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">"Thai baht"</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">"Thai baht"</span><span class="p" data-group-id="6193373682-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">"Thai Baht"</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">"Thai Baht"</span><span class="p">,</span><span class="w">
|
||||||
@ -587,7 +587,7 @@ or a <a href="https://hexdocs.pm/ex_cldr/2.37.2/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">"THB"</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">"THB"</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="9117726790-7">}</span><span class="p" data-group-id="9117726790-6">}</span></code></pre>
|
</span><span class="p" data-group-id="6193373682-7">}</span><span class="p" data-group-id="6193373682-6">}</span></code></pre>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
<section class="detail" id="currency_for_code!/2">
|
<section class="detail" id="currency_for_code!/2">
|
||||||
@ -646,12 +646,12 @@ or a <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.LanguageTag.html"><code cla
|
|||||||
Examples
|
Examples
|
||||||
</a>
|
</a>
|
||||||
</h2>
|
</h2>
|
||||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </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="3280812122-1">(</span><span class="s">"AUD"</span><span class="p" data-group-id="3280812122-1">)</span><span class="w">
|
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </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="2228122553-1">(</span><span class="s">"AUD"</span><span class="p" data-group-id="2228122553-1">)</span><span class="w">
|
||||||
</span><span class="p" data-group-id="3280812122-2">%</span><span class="nc" data-group-id="3280812122-2">Cldr.Currency</span><span class="p" data-group-id="3280812122-2">{</span><span class="w">
|
</span><span class="p" data-group-id="2228122553-2">%</span><span class="nc" data-group-id="2228122553-2">Cldr.Currency</span><span class="p" data-group-id="2228122553-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">"AUD"</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">"AUD"</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="3280812122-3">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">"Australian dollar"</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">"Australian dollars"</span><span class="p" data-group-id="3280812122-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="2228122553-3">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">"Australian dollar"</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">"Australian dollars"</span><span class="p" data-group-id="2228122553-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">"Australian Dollar"</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">"Australian Dollar"</span><span class="p">,</span><span class="w">
|
||||||
@ -659,14 +659,14 @@ or a <a href="https://hexdocs.pm/ex_cldr/2.37.2/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">"A$"</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">"A$"</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="3280812122-2">}</span><span class="w">
|
</span><span class="p" data-group-id="2228122553-2">}</span><span class="w">
|
||||||
|
|
||||||
</span><span class="gp unselectable">iex> </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="3280812122-4">(</span><span class="s">"THB"</span><span class="p" data-group-id="3280812122-4">)</span><span class="w">
|
</span><span class="gp unselectable">iex> </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="2228122553-4">(</span><span class="s">"THB"</span><span class="p" data-group-id="2228122553-4">)</span><span class="w">
|
||||||
</span><span class="p" data-group-id="3280812122-5">%</span><span class="nc" data-group-id="3280812122-5">Cldr.Currency</span><span class="p" data-group-id="3280812122-5">{</span><span class="w">
|
</span><span class="p" data-group-id="2228122553-5">%</span><span class="nc" data-group-id="2228122553-5">Cldr.Currency</span><span class="p" data-group-id="2228122553-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">"THB"</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">"THB"</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="3280812122-6">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">"Thai baht"</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">"Thai baht"</span><span class="p" data-group-id="3280812122-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="2228122553-6">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">"Thai baht"</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">"Thai baht"</span><span class="p" data-group-id="2228122553-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">"Thai Baht"</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">"Thai Baht"</span><span class="p">,</span><span class="w">
|
||||||
@ -674,7 +674,7 @@ or a <a href="https://hexdocs.pm/ex_cldr/2.37.2/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">"THB"</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">"THB"</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="3280812122-5">}</span></code></pre>
|
</span><span class="p" data-group-id="2228122553-5">}</span></code></pre>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
<section class="detail" id="currency_from_locale/1">
|
<section class="detail" id="currency_from_locale/1">
|
||||||
@ -715,11 +715,11 @@ or a <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.LanguageTag.html"><code cla
|
|||||||
Examples
|
Examples
|
||||||
</a>
|
</a>
|
||||||
</h2>
|
</h2>
|
||||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </span><span class="p" data-group-id="2381595434-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="2381595434-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">"en"</span><span class="w">
|
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </span><span class="p" data-group-id="4711112335-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="4711112335-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">"en"</span><span class="w">
|
||||||
</span><span class="gp unselectable">iex> </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> </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> </span><span class="p" data-group-id="2381595434-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="2381595434-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">"en-AU"</span><span class="w">
|
</span><span class="gp unselectable">iex> </span><span class="p" data-group-id="4711112335-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="4711112335-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">"en-AU"</span><span class="w">
|
||||||
</span><span class="gp unselectable">iex> </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> </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">
|
||||||
|
|
||||||
@ -768,13 +768,13 @@ or a <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.LanguageTag.html"><code cla
|
|||||||
</a>
|
</a>
|
||||||
</h2>
|
</h2>
|
||||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </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">"en"</span><span class="w">
|
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </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">"en"</span><span class="w">
|
||||||
</span><span class="p" data-group-id="8717593242-1">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
|
</span><span class="p" data-group-id="1184866319-1">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="p" data-group-id="8717593242-2">%{</span><span class="w">
|
</span><span class="p" data-group-id="1184866319-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="8717593242-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="8717593242-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="1184866319-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="1184866319-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="8717593242-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="8717593242-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="1184866319-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="1184866319-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="8717593242-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="8717593242-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="1184866319-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="1184866319-5">}</span><span class="w">
|
||||||
</span><span class="p" data-group-id="8717593242-2">}</span><span class="w">
|
</span><span class="p" data-group-id="1184866319-2">}</span><span class="w">
|
||||||
</span><span class="p" data-group-id="8717593242-1">}</span></code></pre>
|
</span><span class="p" data-group-id="1184866319-1">}</span></code></pre>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
<section class="detail" id="currency_strings/3">
|
<section class="detail" id="currency_strings/3">
|
||||||
@ -834,8 +834,8 @@ The default is <code class="inline">:all</code>. See <a href="https://hexdocs.pm
|
|||||||
</a>
|
</a>
|
||||||
</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">"en"</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">"en"</span><span class="w">
|
||||||
</span><span class="p">=></span><span class="w"> </span><span class="p" data-group-id="0693099725-1">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
|
</span><span class="p">=></span><span class="w"> </span><span class="p" data-group-id="5174565224-1">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="p" data-group-id="0693099725-2">%{</span><span class="w">
|
</span><span class="p" data-group-id="5174565224-2">%{</span><span class="w">
|
||||||
</span><span class="s">"mexican silver pesos"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="ss">:MXP</span><span class="p">,</span><span class="w">
|
</span><span class="s">"mexican silver pesos"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="ss">:MXP</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="s">"sudanese dinar"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="ss">:SDD</span><span class="p">,</span><span class="w">
|
</span><span class="s">"sudanese dinar"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="ss">:SDD</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="s">"bad"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="ss">:BAD</span><span class="p">,</span><span class="w">
|
</span><span class="s">"bad"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="ss">:BAD</span><span class="p">,</span><span class="w">
|
||||||
@ -845,7 +845,7 @@ The default is <code class="inline">:all</code>. See <a href="https://hexdocs.pm
|
|||||||
</span><span class="s">"guyanaese dollars"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="ss">:GYD</span><span class="p">,</span><span class="w">
|
</span><span class="s">"guyanaese dollars"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="ss">:GYD</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="s">"equatorial guinean ekwele"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="ss">:GQE</span><span class="p">,</span><span class="w">
|
</span><span class="s">"equatorial guinean ekwele"</span><span class="w"> </span><span class="p">=></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="0693099725-2">}</span><span class="p" data-group-id="0693099725-1">}</span></code></pre>
|
</span><span class="p" data-group-id="5174565224-2">}</span><span class="p" data-group-id="5174565224-1">}</span></code></pre>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
<section class="detail" id="currency_strings!/3">
|
<section class="detail" id="currency_strings!/3">
|
||||||
@ -905,7 +905,7 @@ The default is <code class="inline">:all</code>. See <a href="https://hexdocs.pm
|
|||||||
</a>
|
</a>
|
||||||
</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">"en"</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">"en"</span><span class="w">
|
||||||
</span><span class="p">=></span><span class="w"> </span><span class="p" data-group-id="8083638505-1">%{</span><span class="w">
|
</span><span class="p">=></span><span class="w"> </span><span class="p" data-group-id="8373511123-1">%{</span><span class="w">
|
||||||
</span><span class="s">"mexican silver pesos"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="ss">:MXP</span><span class="p">,</span><span class="w">
|
</span><span class="s">"mexican silver pesos"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="ss">:MXP</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="s">"sudanese dinar"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="ss">:SDD</span><span class="p">,</span><span class="w">
|
</span><span class="s">"sudanese dinar"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="ss">:SDD</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="s">"bad"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="ss">:BAD</span><span class="p">,</span><span class="w">
|
</span><span class="s">"bad"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="ss">:BAD</span><span class="p">,</span><span class="w">
|
||||||
@ -915,7 +915,7 @@ The default is <code class="inline">:all</code>. See <a href="https://hexdocs.pm
|
|||||||
</span><span class="s">"guyanaese dollars"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="ss">:GYD</span><span class="p">,</span><span class="w">
|
</span><span class="s">"guyanaese dollars"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="ss">:GYD</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="s">"equatorial guinean ekwele"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="ss">:GQE</span><span class="p">,</span><span class="w">
|
</span><span class="s">"equatorial guinean ekwele"</span><span class="w"> </span><span class="p">=></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="8083638505-1">}</span></code></pre>
|
</span><span class="p" data-group-id="8373511123-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">
|
||||||
@ -1004,7 +1004,7 @@ mapping is returned for that territory.</p><h2 id="current_territory_currencies/
|
|||||||
Example
|
Example
|
||||||
</a>
|
</a>
|
||||||
</h2>
|
</h2>
|
||||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </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="9399450158-1">(</span><span class="p" data-group-id="9399450158-1">)</span></code></pre>
|
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </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="6695567410-1">(</span><span class="p" data-group-id="6695567410-1">)</span></code></pre>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
<section class="detail" id="known_currencies/0">
|
<section class="detail" id="known_currencies/0">
|
||||||
@ -1097,10 +1097,10 @@ currency code</li></ul><h2 id="known_currency_code/1-returns" class="section-hea
|
|||||||
</a>
|
</a>
|
||||||
</h2>
|
</h2>
|
||||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </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">"AUD"</span><span class="w">
|
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </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">"AUD"</span><span class="w">
|
||||||
</span><span class="p" data-group-id="4236477262-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="4236477262-1">}</span><span class="w">
|
</span><span class="p" data-group-id="5564430936-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="5564430936-1">}</span><span class="w">
|
||||||
|
|
||||||
</span><span class="gp unselectable">iex> </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">"GGG"</span><span class="w">
|
</span><span class="gp unselectable">iex> </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">"GGG"</span><span class="w">
|
||||||
</span><span class="p" data-group-id="4236477262-2">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="4236477262-3">{</span><span class="nc">Cldr.UnknownCurrencyError</span><span class="p">,</span><span class="w"> </span><span class="s">"The currency </span><span class="se">\"</span><span class="s">GGG</span><span class="se">\"</span><span class="s"> is invalid"</span><span class="p" data-group-id="4236477262-3">}</span><span class="p" data-group-id="4236477262-2">}</span></code></pre>
|
</span><span class="p" data-group-id="5564430936-2">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="5564430936-3">{</span><span class="nc">Cldr.UnknownCurrencyError</span><span class="p">,</span><span class="w"> </span><span class="s">"The currency </span><span class="se">\"</span><span class="s">GGG</span><span class="se">\"</span><span class="s"> is invalid"</span><span class="p" data-group-id="5564430936-3">}</span><span class="p" data-group-id="5564430936-2">}</span></code></pre>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
<section class="detail" id="known_currency_code?/1">
|
<section class="detail" id="known_currency_code?/1">
|
||||||
@ -1247,14 +1247,14 @@ such as <code class="inline">0.05</code>. Optional.</li></ul><h2 id="new/2-retur
|
|||||||
Example
|
Example
|
||||||
</a>
|
</a>
|
||||||
</h2>
|
</h2>
|
||||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr.Currency</span><span class="o">.</span><span class="n">new</span><span class="p" data-group-id="4466758255-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">"Custom Name"</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="4466758255-1">)</span><span class="w">
|
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr.Currency</span><span class="o">.</span><span class="n">new</span><span class="p" data-group-id="6905825767-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">"Custom Name"</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="6905825767-1">)</span><span class="w">
|
||||||
</span><span class="p" data-group-id="4466758255-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
|
</span><span class="p" data-group-id="6905825767-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="p" data-group-id="4466758255-3">%</span><span class="nc" data-group-id="4466758255-3">Cldr.Currency</span><span class="p" data-group-id="4466758255-3">{</span><span class="w">
|
</span><span class="p" data-group-id="6905825767-3">%</span><span class="nc" data-group-id="6905825767-3">Cldr.Currency</span><span class="p" data-group-id="6905825767-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="4466758255-4">%{</span><span class="ss">other</span><span class="p">:</span><span class="w"> </span><span class="s">"Custom Name"</span><span class="p" data-group-id="4466758255-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="6905825767-4">%{</span><span class="ss">other</span><span class="p">:</span><span class="w"> </span><span class="s">"Custom Name"</span><span class="p" data-group-id="6905825767-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">
|
||||||
@ -1264,11 +1264,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">"XAE"</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">"XAE"</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="4466758255-3">}</span><span class="p" data-group-id="4466758255-2">}</span><span class="w">
|
</span><span class="p" data-group-id="6905825767-3">}</span><span class="p" data-group-id="6905825767-2">}</span><span class="w">
|
||||||
</span><span class="gp unselectable">iex> </span><span class="nc">MyApp.Cldr.Currency</span><span class="o">.</span><span class="n">new</span><span class="p" data-group-id="4466758255-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">"Custom Name"</span><span class="p" data-group-id="4466758255-5">)</span><span class="w">
|
</span><span class="gp unselectable">iex> </span><span class="nc">MyApp.Cldr.Currency</span><span class="o">.</span><span class="n">new</span><span class="p" data-group-id="6905825767-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">"Custom Name"</span><span class="p" data-group-id="6905825767-5">)</span><span class="w">
|
||||||
</span><span class="p" data-group-id="4466758255-6">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="s">"Required options are missing. Required options are [:name, :digits]"</span><span class="p" data-group-id="4466758255-6">}</span><span class="w">
|
</span><span class="p" data-group-id="6905825767-6">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="s">"Required options are missing. Required options are [:name, :digits]"</span><span class="p" data-group-id="6905825767-6">}</span><span class="w">
|
||||||
</span><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr.Currency</span><span class="o">.</span><span class="n">new</span><span class="p" data-group-id="4466758255-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">"XAE"</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="4466758255-7">)</span><span class="w">
|
</span><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr.Currency</span><span class="o">.</span><span class="n">new</span><span class="p" data-group-id="6905825767-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">"XAE"</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="6905825767-7">)</span><span class="w">
|
||||||
</span><span class="p" data-group-id="4466758255-8">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="4466758255-9">{</span><span class="nc">Cldr.CurrencyAlreadyDefined</span><span class="p">,</span><span class="w"> </span><span class="s">"Currency :XAE is already defined."</span><span class="p" data-group-id="4466758255-9">}</span><span class="p" data-group-id="4466758255-8">}</span></code></pre>
|
</span><span class="p" data-group-id="6905825767-8">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="6905825767-9">{</span><span class="nc">Cldr.CurrencyAlreadyDefined</span><span class="p">,</span><span class="w"> </span><span class="s">"Currency :XAE is already defined."</span><span class="p" data-group-id="6905825767-9">}</span><span class="p" data-group-id="6905825767-8">}</span></code></pre>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
<section class="detail" id="pluralize/3">
|
<section class="detail" id="pluralize/3">
|
||||||
@ -1327,19 +1327,19 @@ default is <a href="Plausible.Cldr.html#get_locale/0"><code class="inline">Plaus
|
|||||||
</a>
|
</a>
|
||||||
</h2>
|
</h2>
|
||||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </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> </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="7128204906-1">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">"US dollar"</span><span class="p" data-group-id="7128204906-1">}</span><span class="w">
|
</span><span class="p" data-group-id="8807525631-1">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">"US dollar"</span><span class="p" data-group-id="8807525631-1">}</span><span class="w">
|
||||||
|
|
||||||
</span><span class="gp unselectable">iex> </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> </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="7128204906-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">"US dollars"</span><span class="p" data-group-id="7128204906-2">}</span><span class="w">
|
</span><span class="p" data-group-id="8807525631-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">"US dollars"</span><span class="p" data-group-id="8807525631-2">}</span><span class="w">
|
||||||
|
|
||||||
</span><span class="gp unselectable">iex> </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">"zh"</span><span class="w">
|
</span><span class="gp unselectable">iex> </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">"zh"</span><span class="w">
|
||||||
</span><span class="p" data-group-id="7128204906-3">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">"美元"</span><span class="p" data-group-id="7128204906-3">}</span><span class="w">
|
</span><span class="p" data-group-id="8807525631-3">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">"美元"</span><span class="p" data-group-id="8807525631-3">}</span><span class="w">
|
||||||
|
|
||||||
</span><span class="gp unselectable">iex> </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">"fr"</span><span class="w">
|
</span><span class="gp unselectable">iex> </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">"fr"</span><span class="w">
|
||||||
</span><span class="p" data-group-id="7128204906-4">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">"dollars des États-Unis"</span><span class="p" data-group-id="7128204906-4">}</span><span class="w">
|
</span><span class="p" data-group-id="8807525631-4">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">"dollars des États-Unis"</span><span class="p" data-group-id="8807525631-4">}</span><span class="w">
|
||||||
|
|
||||||
</span><span class="gp unselectable">iex> </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">"fr"</span><span class="w">
|
</span><span class="gp unselectable">iex> </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">"fr"</span><span class="w">
|
||||||
</span><span class="p" data-group-id="7128204906-5">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">"dollar des États-Unis"</span><span class="p" data-group-id="7128204906-5">}</span></code></pre>
|
</span><span class="p" data-group-id="8807525631-5">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">"dollar des États-Unis"</span><span class="p" data-group-id="8807525631-5">}</span></code></pre>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
<section class="detail" id="strings_for_currency/2">
|
<section class="detail" id="strings_for_currency/2">
|
||||||
@ -1382,7 +1382,7 @@ or a <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.LanguageTag.html"><code cla
|
|||||||
</a>
|
</a>
|
||||||
</h2>
|
</h2>
|
||||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </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">"en"</span><span class="w">
|
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </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">"en"</span><span class="w">
|
||||||
</span><span class="p" data-group-id="4533689967-1">[</span><span class="s">"a$"</span><span class="p">,</span><span class="w"> </span><span class="s">"australian dollars"</span><span class="p">,</span><span class="w"> </span><span class="s">"aud"</span><span class="p">,</span><span class="w"> </span><span class="s">"australian dollar"</span><span class="p" data-group-id="4533689967-1">]</span></code></pre>
|
</span><span class="p" data-group-id="4837226045-1">[</span><span class="s">"a$"</span><span class="p">,</span><span class="w"> </span><span class="s">"australian dollars"</span><span class="p">,</span><span class="w"> </span><span class="s">"aud"</span><span class="p">,</span><span class="w"> </span><span class="s">"australian dollar"</span><span class="p" data-group-id="4837226045-1">]</span></code></pre>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
@ -297,16 +297,16 @@ this specific locale..</p><h2 id="fallback_locale_names/1-arguments" class="sect
|
|||||||
Examples
|
Examples
|
||||||
</a>
|
</a>
|
||||||
</h2>
|
</h2>
|
||||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </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="8702144848-1">(</span><span class="ss">:"fr-CA"</span><span class="p" data-group-id="8702144848-1">)</span><span class="w">
|
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </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="2440459080-1">(</span><span class="ss">:"fr-CA"</span><span class="p" data-group-id="2440459080-1">)</span><span class="w">
|
||||||
</span><span class="p" data-group-id="8702144848-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="8702144848-3">[</span><span class="ss">:"fr-CA"</span><span class="p">,</span><span class="w"> </span><span class="ss">:fr</span><span class="p">,</span><span class="w"> </span><span class="ss">:und</span><span class="p" data-group-id="8702144848-3">]</span><span class="p" data-group-id="8702144848-2">}</span><span class="w">
|
</span><span class="p" data-group-id="2440459080-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="2440459080-3">[</span><span class="ss">:"fr-CA"</span><span class="p">,</span><span class="w"> </span><span class="ss">:fr</span><span class="p">,</span><span class="w"> </span><span class="ss">:und</span><span class="p" data-group-id="2440459080-3">]</span><span class="p" data-group-id="2440459080-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> </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="8702144848-4">(</span><span class="ss">:nb</span><span class="p" data-group-id="8702144848-4">)</span><span class="w">
|
</span><span class="gp unselectable">iex> </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="2440459080-4">(</span><span class="ss">:nb</span><span class="p" data-group-id="2440459080-4">)</span><span class="w">
|
||||||
</span><span class="p" data-group-id="8702144848-5">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="8702144848-6">[</span><span class="ss">:nb</span><span class="p">,</span><span class="w"> </span><span class="ss">:no</span><span class="p">,</span><span class="w"> </span><span class="ss">:und</span><span class="p" data-group-id="8702144848-6">]</span><span class="p" data-group-id="8702144848-5">}</span></code></pre>
|
</span><span class="p" data-group-id="2440459080-5">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="2440459080-6">[</span><span class="ss">:nb</span><span class="p">,</span><span class="w"> </span><span class="ss">:no</span><span class="p">,</span><span class="w"> </span><span class="ss">:und</span><span class="p" data-group-id="2440459080-6">]</span><span class="p" data-group-id="2440459080-5">}</span></code></pre>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
<section class="detail" id="fallback_locales/1">
|
<section class="detail" id="fallback_locales/1">
|
||||||
@ -360,20 +360,20 @@ this specific locale.</p><h2 id="fallback_locales/1-arguments" class="section-he
|
|||||||
Examples
|
Examples
|
||||||
</a>
|
</a>
|
||||||
</h2>
|
</h2>
|
||||||
<pre><code class="makeup elixir" translate="no"><span class="nc">Plausible.Cldr.Locale</span><span class="o">.</span><span class="n">fallback_locales</span><span class="p" data-group-id="3227551447-1">(</span><span class="ss">:"fr-CA"</span><span class="p" data-group-id="3227551447-1">)</span><span class="w">
|
<pre><code class="makeup elixir" translate="no"><span class="nc">Plausible.Cldr.Locale</span><span class="o">.</span><span class="n">fallback_locales</span><span class="p" data-group-id="3362565634-1">(</span><span class="ss">:"fr-CA"</span><span class="p" data-group-id="3362565634-1">)</span><span class="w">
|
||||||
</span><span class="p">=></span><span class="w"> </span><span class="p" data-group-id="3227551447-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
|
</span><span class="p">=></span><span class="w"> </span><span class="p" data-group-id="3362565634-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="p" data-group-id="3227551447-3">[</span><span class="p" data-group-id="3227551447-4">#</span><span class="nc" data-group-id="3227551447-4">Cldr.LanguageTag</span><span class="p" data-group-id="3227551447-4"><</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="3227551447-5">[</span><span class="n">validated</span><span class="p" data-group-id="3227551447-5">]</span><span class="p" data-group-id="3227551447-4">></span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="3227551447-6">#</span><span class="nc" data-group-id="3227551447-6">Cldr.LanguageTag</span><span class="p" data-group-id="3227551447-6"><</span><span class="n">fr</span><span class="w"> </span><span class="p" data-group-id="3227551447-7">[</span><span class="n">validated</span><span class="p" data-group-id="3227551447-7">]</span><span class="p" data-group-id="3227551447-6">></span><span class="p">,</span><span class="w">
|
</span><span class="p" data-group-id="3362565634-3">[</span><span class="p" data-group-id="3362565634-4">#</span><span class="nc" data-group-id="3362565634-4">Cldr.LanguageTag</span><span class="p" data-group-id="3362565634-4"><</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="3362565634-5">[</span><span class="n">validated</span><span class="p" data-group-id="3362565634-5">]</span><span class="p" data-group-id="3362565634-4">></span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="3362565634-6">#</span><span class="nc" data-group-id="3362565634-6">Cldr.LanguageTag</span><span class="p" data-group-id="3362565634-6"><</span><span class="n">fr</span><span class="w"> </span><span class="p" data-group-id="3362565634-7">[</span><span class="n">validated</span><span class="p" data-group-id="3362565634-7">]</span><span class="p" data-group-id="3362565634-6">></span><span class="p">,</span><span class="w">
|
||||||
</span><span class="p" data-group-id="3227551447-8">#</span><span class="nc" data-group-id="3227551447-8">Cldr.LanguageTag</span><span class="p" data-group-id="3227551447-8"><</span><span class="n">und</span><span class="w"> </span><span class="p" data-group-id="3227551447-9">[</span><span class="n">validated</span><span class="p" data-group-id="3227551447-9">]</span><span class="p" data-group-id="3227551447-8">></span><span class="p" data-group-id="3227551447-3">]</span><span class="p" data-group-id="3227551447-2">}</span><span class="w">
|
</span><span class="p" data-group-id="3362565634-8">#</span><span class="nc" data-group-id="3362565634-8">Cldr.LanguageTag</span><span class="p" data-group-id="3362565634-8"><</span><span class="n">und</span><span class="w"> </span><span class="p" data-group-id="3362565634-9">[</span><span class="n">validated</span><span class="p" data-group-id="3362565634-9">]</span><span class="p" data-group-id="3362565634-8">></span><span class="p" data-group-id="3362565634-3">]</span><span class="p" data-group-id="3362565634-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="3227551447-10">(</span><span class="ss">:nb</span><span class="p" data-group-id="3227551447-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="3362565634-10">(</span><span class="ss">:nb</span><span class="p" data-group-id="3362565634-10">)</span><span class="p">)</span><span class="w">
|
||||||
</span><span class="p">=></span><span class="w"> </span><span class="p" data-group-id="3227551447-11">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
|
</span><span class="p">=></span><span class="w"> </span><span class="p" data-group-id="3362565634-11">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="p" data-group-id="3227551447-12">[</span><span class="p" data-group-id="3227551447-13">#</span><span class="nc" data-group-id="3227551447-13">Cldr.LanguageTag</span><span class="p" data-group-id="3227551447-13"><</span><span class="n">nb</span><span class="w"> </span><span class="p" data-group-id="3227551447-14">[</span><span class="n">validated</span><span class="p" data-group-id="3227551447-14">]</span><span class="p" data-group-id="3227551447-13">></span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="3227551447-15">#</span><span class="nc" data-group-id="3227551447-15">Cldr.LanguageTag</span><span class="p" data-group-id="3227551447-15"><</span><span class="n">no</span><span class="w"> </span><span class="p" data-group-id="3227551447-16">[</span><span class="n">validated</span><span class="p" data-group-id="3227551447-16">]</span><span class="p" data-group-id="3227551447-15">></span><span class="p">,</span><span class="w">
|
</span><span class="p" data-group-id="3362565634-12">[</span><span class="p" data-group-id="3362565634-13">#</span><span class="nc" data-group-id="3362565634-13">Cldr.LanguageTag</span><span class="p" data-group-id="3362565634-13"><</span><span class="n">nb</span><span class="w"> </span><span class="p" data-group-id="3362565634-14">[</span><span class="n">validated</span><span class="p" data-group-id="3362565634-14">]</span><span class="p" data-group-id="3362565634-13">></span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="3362565634-15">#</span><span class="nc" data-group-id="3362565634-15">Cldr.LanguageTag</span><span class="p" data-group-id="3362565634-15"><</span><span class="n">no</span><span class="w"> </span><span class="p" data-group-id="3362565634-16">[</span><span class="n">validated</span><span class="p" data-group-id="3362565634-16">]</span><span class="p" data-group-id="3362565634-15">></span><span class="p">,</span><span class="w">
|
||||||
</span><span class="p" data-group-id="3227551447-17">#</span><span class="nc" data-group-id="3227551447-17">Cldr.LanguageTag</span><span class="p" data-group-id="3227551447-17"><</span><span class="n">und</span><span class="w"> </span><span class="p" data-group-id="3227551447-18">[</span><span class="n">validated</span><span class="p" data-group-id="3227551447-18">]</span><span class="p" data-group-id="3227551447-17">></span><span class="p" data-group-id="3227551447-12">]</span><span class="p" data-group-id="3227551447-11">}</span></code></pre>
|
</span><span class="p" data-group-id="3362565634-17">#</span><span class="nc" data-group-id="3362565634-17">Cldr.LanguageTag</span><span class="p" data-group-id="3362565634-17"><</span><span class="n">und</span><span class="w"> </span><span class="p" data-group-id="3362565634-18">[</span><span class="n">validated</span><span class="p" data-group-id="3362565634-18">]</span><span class="p" data-group-id="3362565634-17">></span><span class="p" data-group-id="3362565634-12">]</span><span class="p" data-group-id="3362565634-11">}</span></code></pre>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
<section class="detail" id="locale_for_territory/1">
|
<section class="detail" id="locale_for_territory/1">
|
||||||
@ -504,15 +504,15 @@ generic top-level domain names.</p><h2 id="locale_from_host/2-examples" class="s
|
|||||||
</a>
|
</a>
|
||||||
</h2>
|
</h2>
|
||||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </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">"a.b.com.au"</span><span class="w">
|
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </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">"a.b.com.au"</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="2091559012-1">(</span><span class="ss">:"en-AU"</span><span class="p" data-group-id="2091559012-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="7034953082-1">(</span><span class="ss">:"en-AU"</span><span class="p" data-group-id="7034953082-1">)</span><span class="w">
|
||||||
|
|
||||||
</span><span class="gp unselectable">iex> </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="2091559012-2">(</span><span class="s">"a.b.com.tv"</span><span class="p" data-group-id="2091559012-2">)</span><span class="w">
|
</span><span class="gp unselectable">iex> </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="7034953082-2">(</span><span class="s">"a.b.com.tv"</span><span class="p" data-group-id="7034953082-2">)</span><span class="w">
|
||||||
</span><span class="p" data-group-id="2091559012-3">{</span><span class="ss">:error</span><span class="p">,</span><span class="w">
|
</span><span class="p" data-group-id="7034953082-3">{</span><span class="ss">:error</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="p" data-group-id="2091559012-4">{</span><span class="nc">Cldr.UnknownLocaleError</span><span class="p">,</span><span class="w"> </span><span class="s">"No locale was identified for territory </span><span class="se">\"</span><span class="s">tv</span><span class="se">\"</span><span class="s">"</span><span class="p" data-group-id="2091559012-4">}</span><span class="p" data-group-id="2091559012-3">}</span><span class="w">
|
</span><span class="p" data-group-id="7034953082-4">{</span><span class="nc">Cldr.UnknownLocaleError</span><span class="p">,</span><span class="w"> </span><span class="s">"No locale was identified for territory </span><span class="se">\"</span><span class="s">tv</span><span class="se">\"</span><span class="s">"</span><span class="p" data-group-id="7034953082-4">}</span><span class="p" data-group-id="7034953082-3">}</span><span class="w">
|
||||||
|
|
||||||
</span><span class="gp unselectable">iex> </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="2091559012-5">(</span><span class="s">"a.b.com"</span><span class="p" data-group-id="2091559012-5">)</span><span class="w">
|
</span><span class="gp unselectable">iex> </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="7034953082-5">(</span><span class="s">"a.b.com"</span><span class="p" data-group-id="7034953082-5">)</span><span class="w">
|
||||||
</span><span class="p" data-group-id="2091559012-6">{</span><span class="ss">:error</span><span class="p">,</span><span class="w">
|
</span><span class="p" data-group-id="7034953082-6">{</span><span class="ss">:error</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="p" data-group-id="2091559012-7">{</span><span class="nc">Cldr.UnknownLocaleError</span><span class="p">,</span><span class="w"> </span><span class="s">"No locale was identified for territory </span><span class="se">\"</span><span class="s">com</span><span class="se">\"</span><span class="s">"</span><span class="p" data-group-id="2091559012-7">}</span><span class="p" data-group-id="2091559012-6">}</span></code></pre>
|
</span><span class="p" data-group-id="7034953082-7">{</span><span class="nc">Cldr.UnknownLocaleError</span><span class="p">,</span><span class="w"> </span><span class="s">"No locale was identified for territory </span><span class="se">\"</span><span class="s">com</span><span class="se">\"</span><span class="s">"</span><span class="p" data-group-id="7034953082-7">}</span><span class="p" data-group-id="7034953082-6">}</span></code></pre>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
<section class="detail" id="new/1">
|
<section class="detail" id="new/1">
|
||||||
@ -654,12 +654,12 @@ be a territory.</p><h2 id="territory_from_host/1-arguments" class="section-headi
|
|||||||
Examples
|
Examples
|
||||||
</a>
|
</a>
|
||||||
</h2>
|
</h2>
|
||||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </span><span class="nc">Cldr.Locale</span><span class="o">.</span><span class="n">territory_from_host</span><span class="p" data-group-id="9933234113-1">(</span><span class="s">"a.b.com.au"</span><span class="p" data-group-id="9933234113-1">)</span><span class="w">
|
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </span><span class="nc">Cldr.Locale</span><span class="o">.</span><span class="n">territory_from_host</span><span class="p" data-group-id="1838133344-1">(</span><span class="s">"a.b.com.au"</span><span class="p" data-group-id="1838133344-1">)</span><span class="w">
|
||||||
</span><span class="p" data-group-id="9933234113-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="9933234113-2">}</span><span class="w">
|
</span><span class="p" data-group-id="1838133344-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="1838133344-2">}</span><span class="w">
|
||||||
|
|
||||||
</span><span class="gp unselectable">iex> </span><span class="nc">Cldr.Locale</span><span class="o">.</span><span class="n">territory_from_host</span><span class="p" data-group-id="9933234113-3">(</span><span class="s">"a.b.com"</span><span class="p" data-group-id="9933234113-3">)</span><span class="w">
|
</span><span class="gp unselectable">iex> </span><span class="nc">Cldr.Locale</span><span class="o">.</span><span class="n">territory_from_host</span><span class="p" data-group-id="1838133344-3">(</span><span class="s">"a.b.com"</span><span class="p" data-group-id="1838133344-3">)</span><span class="w">
|
||||||
</span><span class="p" data-group-id="9933234113-4">{</span><span class="ss">:error</span><span class="p">,</span><span class="w">
|
</span><span class="p" data-group-id="1838133344-4">{</span><span class="ss">:error</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="p" data-group-id="9933234113-5">{</span><span class="nc">Cldr.UnknownLocaleError</span><span class="p">,</span><span class="w"> </span><span class="s">"No locale was identified for territory </span><span class="se">\"</span><span class="s">com</span><span class="se">\"</span><span class="s">"</span><span class="p" data-group-id="9933234113-5">}</span><span class="p" data-group-id="9933234113-4">}</span></code></pre>
|
</span><span class="p" data-group-id="1838133344-5">{</span><span class="nc">Cldr.UnknownLocaleError</span><span class="p">,</span><span class="w"> </span><span class="s">"No locale was identified for territory </span><span class="se">\"</span><span class="s">com</span><span class="se">\"</span><span class="s">"</span><span class="p" data-group-id="1838133344-5">}</span><span class="p" data-group-id="1838133344-4">}</span></code></pre>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
<section class="detail" id="territory_from_locale/1">
|
<section class="detail" id="territory_from_locale/1">
|
||||||
|
@ -426,31 +426,31 @@ The valid substitution keys are <code class="inline">:zero</code>, <code class="
|
|||||||
Examples
|
Examples
|
||||||
</a>
|
</a>
|
||||||
</h2>
|
</h2>
|
||||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </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">"en"</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="3130038790-1">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">"one"</span><span class="p" data-group-id="3130038790-1">}</span><span class="w">
|
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </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">"en"</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="9193653389-1">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">"one"</span><span class="p" data-group-id="9193653389-1">}</span><span class="w">
|
||||||
</span><span class="s">"one"</span><span class="w">
|
</span><span class="s">"one"</span><span class="w">
|
||||||
|
|
||||||
</span><span class="gp unselectable">iex> </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">"en"</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="3130038790-2">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">"one"</span><span class="p" data-group-id="3130038790-2">}</span><span class="w">
|
</span><span class="gp unselectable">iex> </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">"en"</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="9193653389-2">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">"one"</span><span class="p" data-group-id="9193653389-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> </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">"en"</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="3130038790-3">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">"one"</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">"two"</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">"other"</span><span class="p" data-group-id="3130038790-3">}</span><span class="w">
|
</span><span class="gp unselectable">iex> </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">"en"</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="9193653389-3">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">"one"</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">"two"</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">"other"</span><span class="p" data-group-id="9193653389-3">}</span><span class="w">
|
||||||
</span><span class="s">"other"</span><span class="w">
|
</span><span class="s">"other"</span><span class="w">
|
||||||
|
|
||||||
</span><span class="gp unselectable">iex> </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">"en"</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="3130038790-4">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">"one"</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">"two"</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">"other"</span><span class="p" data-group-id="3130038790-4">}</span><span class="w">
|
</span><span class="gp unselectable">iex> </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">"en"</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="9193653389-4">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">"one"</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">"two"</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">"other"</span><span class="p" data-group-id="9193653389-4">}</span><span class="w">
|
||||||
</span><span class="s">"other"</span><span class="w">
|
</span><span class="s">"other"</span><span class="w">
|
||||||
|
|
||||||
</span><span class="gp unselectable">iex> </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="3130038790-5">(</span><span class="mi">1</span><span class="p" data-group-id="3130038790-5">)</span><span class="p">,</span><span class="w"> </span><span class="s">"en"</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="3130038790-6">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">"one"</span><span class="p" data-group-id="3130038790-6">}</span><span class="w">
|
</span><span class="gp unselectable">iex> </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="9193653389-5">(</span><span class="mi">1</span><span class="p" data-group-id="9193653389-5">)</span><span class="p">,</span><span class="w"> </span><span class="s">"en"</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="9193653389-6">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">"one"</span><span class="p" data-group-id="9193653389-6">}</span><span class="w">
|
||||||
</span><span class="s">"one"</span><span class="w">
|
</span><span class="s">"one"</span><span class="w">
|
||||||
|
|
||||||
</span><span class="gp unselectable">iex> </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="3130038790-7">(</span><span class="mi">2</span><span class="p" data-group-id="3130038790-7">)</span><span class="p">,</span><span class="w"> </span><span class="s">"en"</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="3130038790-8">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">"one"</span><span class="p" data-group-id="3130038790-8">}</span><span class="w">
|
</span><span class="gp unselectable">iex> </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="9193653389-7">(</span><span class="mi">2</span><span class="p" data-group-id="9193653389-7">)</span><span class="p">,</span><span class="w"> </span><span class="s">"en"</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="9193653389-8">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">"one"</span><span class="p" data-group-id="9193653389-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> </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="3130038790-9">(</span><span class="mi">2</span><span class="p" data-group-id="3130038790-9">)</span><span class="p">,</span><span class="w"> </span><span class="s">"en"</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="3130038790-10">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">"one"</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">"two"</span><span class="p" data-group-id="3130038790-10">}</span><span class="w">
|
</span><span class="gp unselectable">iex> </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="9193653389-9">(</span><span class="mi">2</span><span class="p" data-group-id="9193653389-9">)</span><span class="p">,</span><span class="w"> </span><span class="s">"en"</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="9193653389-10">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">"one"</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">"two"</span><span class="p" data-group-id="9193653389-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> </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">"ar"</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="3130038790-11">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">"one"</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">"few"</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">"other"</span><span class="p" data-group-id="3130038790-11">}</span><span class="w">
|
</span><span class="gp unselectable">iex> </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">"ar"</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="9193653389-11">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">"one"</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">"few"</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">"other"</span><span class="p" data-group-id="9193653389-11">}</span><span class="w">
|
||||||
</span><span class="s">"few"</span><span class="w">
|
</span><span class="s">"few"</span><span class="w">
|
||||||
|
|
||||||
</span><span class="gp unselectable">iex> </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">"en"</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="3130038790-12">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">"one"</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">"few"</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">"other"</span><span class="p" data-group-id="3130038790-12">}</span><span class="w">
|
</span><span class="gp unselectable">iex> </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">"en"</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="9193653389-12">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">"one"</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">"few"</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">"other"</span><span class="p" data-group-id="9193653389-12">}</span><span class="w">
|
||||||
</span><span class="s">"other"</span></code></pre>
|
</span><span class="s">"other"</span></code></pre>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
@ -439,7 +439,7 @@ to precompile all the known formats at compile time.</p><h2 id="decimal_format_l
|
|||||||
</a>
|
</a>
|
||||||
</h2>
|
</h2>
|
||||||
<pre><code class="makeup elixir" translate="no"><span class="c1">#=> Plausible.Cldr.Number.Format.Format.decimal_format_list</span><span class="w">
|
<pre><code class="makeup elixir" translate="no"><span class="c1">#=> Plausible.Cldr.Number.Format.Format.decimal_format_list</span><span class="w">
|
||||||
</span><span class="p" data-group-id="0023947522-1">[</span><span class="s">"#"</span><span class="p">,</span><span class="w"> </span><span class="s">"#,##,##0%"</span><span class="p">,</span><span class="w">
|
</span><span class="p" data-group-id="6801001898-1">[</span><span class="s">"#"</span><span class="p">,</span><span class="w"> </span><span class="s">"#,##,##0%"</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="s">"#,##,##0.###"</span><span class="p">,</span><span class="w"> </span><span class="s">"#,##,##0.00¤"</span><span class="p">,</span><span class="w"> </span><span class="s">"#,##,##0.00¤;(#,##,##0.00¤)"</span><span class="p">,</span><span class="w">
|
</span><span class="s">"#,##,##0.###"</span><span class="p">,</span><span class="w"> </span><span class="s">"#,##,##0.00¤"</span><span class="p">,</span><span class="w"> </span><span class="s">"#,##,##0.00¤;(#,##,##0.00¤)"</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="s">"#,##,##0 %"</span><span class="p">,</span><span class="w"> </span><span class="s">"#,##0%"</span><span class="p">,</span><span class="w"> </span><span class="s">"#,##0.###"</span><span class="p">,</span><span class="w"> </span><span class="s">"#,##0.00 ¤"</span><span class="p">,</span><span class="w">
|
</span><span class="s">"#,##,##0 %"</span><span class="p">,</span><span class="w"> </span><span class="s">"#,##0%"</span><span class="p">,</span><span class="w"> </span><span class="s">"#,##0.###"</span><span class="p">,</span><span class="w"> </span><span class="s">"#,##0.00 ¤"</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="s">"#,##0.00 ¤;(#,##0.00 ¤)"</span><span class="p">,</span><span class="w"> </span><span class="s">"#,##0.00¤"</span><span class="p">,</span><span class="w"> </span><span class="s">"#,##0.00¤;(#,##0.00¤)"</span><span class="p">,</span><span class="w">
|
</span><span class="s">"#,##0.00 ¤;(#,##0.00 ¤)"</span><span class="p">,</span><span class="w"> </span><span class="s">"#,##0.00¤"</span><span class="p">,</span><span class="w"> </span><span class="s">"#,##0.00¤;(#,##0.00¤)"</span><span class="p">,</span><span class="w">
|
||||||
@ -449,7 +449,7 @@ to precompile all the known formats at compile time.</p><h2 id="decimal_format_l
|
|||||||
</span><span class="s">"000 B ¤"</span><span class="p">,</span><span class="w"> </span><span class="s">"000 E ¤"</span><span class="p">,</span><span class="w"> </span><span class="s">"000 K ¤"</span><span class="p">,</span><span class="w"> </span><span class="s">"000 MRD ¤"</span><span class="p">,</span><span class="w"> </span><span class="s">"000 Md ¤"</span><span class="p">,</span><span class="w"> </span><span class="s">"000 Mio'.' ¤"</span><span class="p">,</span><span class="w">
|
</span><span class="s">"000 B ¤"</span><span class="p">,</span><span class="w"> </span><span class="s">"000 E ¤"</span><span class="p">,</span><span class="w"> </span><span class="s">"000 K ¤"</span><span class="p">,</span><span class="w"> </span><span class="s">"000 MRD ¤"</span><span class="p">,</span><span class="w"> </span><span class="s">"000 Md ¤"</span><span class="p">,</span><span class="w"> </span><span class="s">"000 Mio'.' ¤"</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="s">"000 Mio ¤"</span><span class="p">,</span><span class="w"> </span><span class="s">"000 Mld ¤"</span><span class="p">,</span><span class="w"> </span><span class="s">"000 Mln ¤"</span><span class="p">,</span><span class="w"> </span><span class="s">"000 Mn ¤"</span><span class="p">,</span><span class="w"> </span><span class="s">"000 Mrd'.' ¤"</span><span class="p">,</span><span class="w">
|
</span><span class="s">"000 Mio ¤"</span><span class="p">,</span><span class="w"> </span><span class="s">"000 Mld ¤"</span><span class="p">,</span><span class="w"> </span><span class="s">"000 Mln ¤"</span><span class="p">,</span><span class="w"> </span><span class="s">"000 Mn ¤"</span><span class="p">,</span><span class="w"> </span><span class="s">"000 Mrd'.' ¤"</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="s">"000 Mrd ¤"</span><span class="p">,</span><span class="w"> </span><span class="s">"000 Mr ¤"</span><span class="p">,</span><span class="w"> </span><span class="s">"000 M ¤"</span><span class="p">,</span><span class="w"> </span><span class="s">"000 NT ¤"</span><span class="p">,</span><span class="w"> </span><span class="s">"000 N ¤"</span><span class="p">,</span><span class="w"> </span><span class="s">"000 Tn ¤"</span><span class="p">,</span><span class="w">
|
</span><span class="s">"000 Mrd ¤"</span><span class="p">,</span><span class="w"> </span><span class="s">"000 Mr ¤"</span><span class="p">,</span><span class="w"> </span><span class="s">"000 M ¤"</span><span class="p">,</span><span class="w"> </span><span class="s">"000 NT ¤"</span><span class="p">,</span><span class="w"> </span><span class="s">"000 N ¤"</span><span class="p">,</span><span class="w"> </span><span class="s">"000 Tn ¤"</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="s">"000 Tr ¤"</span><span class="p">,</span><span class="w"> </span><span class="n">...</span><span class="p" data-group-id="0023947522-1">]</span></code></pre>
|
</span><span class="s">"000 Tr ¤"</span><span class="p">,</span><span class="w"> </span><span class="n">...</span><span class="p" data-group-id="6801001898-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">
|
||||||
@ -497,8 +497,8 @@ the known formats at compile time. Its use is not otherwise recommended.</p><h2
|
|||||||
Example
|
Example
|
||||||
</a>
|
</a>
|
||||||
</h2>
|
</h2>
|
||||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </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="2601816501-1">(</span><span class="ss">:en</span><span class="p" data-group-id="2601816501-1">)</span><span class="w">
|
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </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="3987909062-1">(</span><span class="ss">:en</span><span class="p" data-group-id="3987909062-1">)</span><span class="w">
|
||||||
</span><span class="p" data-group-id="2601816501-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="2601816501-3">[</span><span class="s">"#,##0%"</span><span class="p">,</span><span class="w"> </span><span class="s">"#,##0.###"</span><span class="p">,</span><span class="w"> </span><span class="s">"#,##0.00"</span><span class="p">,</span><span class="w"> </span><span class="s">"#,##0.00;(#,##0.00)"</span><span class="p">,</span><span class="s">"#E0"</span><span class="p">,</span><span class="w">
|
</span><span class="p" data-group-id="3987909062-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="3987909062-3">[</span><span class="s">"#,##0%"</span><span class="p">,</span><span class="w"> </span><span class="s">"#,##0.###"</span><span class="p">,</span><span class="w"> </span><span class="s">"#,##0.00"</span><span class="p">,</span><span class="w"> </span><span class="s">"#,##0.00;(#,##0.00)"</span><span class="p">,</span><span class="s">"#E0"</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="s">"0 billion"</span><span class="p">,</span><span class="w"> </span><span class="s">"0 million"</span><span class="p">,</span><span class="w"> </span><span class="s">"0 thousand"</span><span class="p">,</span><span class="w">
|
</span><span class="s">"0 billion"</span><span class="p">,</span><span class="w"> </span><span class="s">"0 million"</span><span class="p">,</span><span class="w"> </span><span class="s">"0 thousand"</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="s">"0 trillion"</span><span class="p">,</span><span class="w"> </span><span class="s">"00 billion"</span><span class="p">,</span><span class="w"> </span><span class="s">"00 million"</span><span class="p">,</span><span class="w"> </span><span class="s">"00 thousand"</span><span class="p">,</span><span class="w"> </span><span class="s">"00 trillion"</span><span class="p">,</span><span class="w">
|
</span><span class="s">"0 trillion"</span><span class="p">,</span><span class="w"> </span><span class="s">"00 billion"</span><span class="p">,</span><span class="w"> </span><span class="s">"00 million"</span><span class="p">,</span><span class="w"> </span><span class="s">"00 thousand"</span><span class="p">,</span><span class="w"> </span><span class="s">"00 trillion"</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="s">"000 billion"</span><span class="p">,</span><span class="w"> </span><span class="s">"000 million"</span><span class="p">,</span><span class="w"> </span><span class="s">"000 thousand"</span><span class="p">,</span><span class="w"> </span><span class="s">"000 trillion"</span><span class="p">,</span><span class="w"> </span><span class="s">"000B"</span><span class="p">,</span><span class="w"> </span><span class="s">"000K"</span><span class="p">,</span><span class="w">
|
</span><span class="s">"000 billion"</span><span class="p">,</span><span class="w"> </span><span class="s">"000 million"</span><span class="p">,</span><span class="w"> </span><span class="s">"000 thousand"</span><span class="p">,</span><span class="w"> </span><span class="s">"000 trillion"</span><span class="p">,</span><span class="w"> </span><span class="s">"000B"</span><span class="p">,</span><span class="w"> </span><span class="s">"000K"</span><span class="p">,</span><span class="w">
|
||||||
@ -506,7 +506,7 @@ the known formats at compile time. Its use is not otherwise recommended.</p><h2
|
|||||||
</span><span class="s">"¤#,##0.00"</span><span class="p">,</span><span class="w"> </span><span class="s">"¤#,##0.00;(¤#,##0.00)"</span><span class="p">,</span><span class="w"> </span><span class="s">"¤000B"</span><span class="p">,</span><span class="w"> </span><span class="s">"¤000K"</span><span class="p">,</span><span class="w"> </span><span class="s">"¤000M"</span><span class="p">,</span><span class="w">
|
</span><span class="s">"¤#,##0.00"</span><span class="p">,</span><span class="w"> </span><span class="s">"¤#,##0.00;(¤#,##0.00)"</span><span class="p">,</span><span class="w"> </span><span class="s">"¤000B"</span><span class="p">,</span><span class="w"> </span><span class="s">"¤000K"</span><span class="p">,</span><span class="w"> </span><span class="s">"¤000M"</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="s">"¤000T"</span><span class="p">,</span><span class="w"> </span><span class="s">"¤00B"</span><span class="p">,</span><span class="w"> </span><span class="s">"¤00K"</span><span class="p">,</span><span class="w"> </span><span class="s">"¤00M"</span><span class="p">,</span><span class="w"> </span><span class="s">"¤00T"</span><span class="p">,</span><span class="w"> </span><span class="s">"¤0B"</span><span class="p">,</span><span class="w"> </span><span class="s">"¤0K"</span><span class="p">,</span><span class="w"> </span><span class="s">"¤0M"</span><span class="p">,</span><span class="w"> </span><span class="s">"¤0T"</span><span class="p">,</span><span class="w">
|
</span><span class="s">"¤000T"</span><span class="p">,</span><span class="w"> </span><span class="s">"¤00B"</span><span class="p">,</span><span class="w"> </span><span class="s">"¤00K"</span><span class="p">,</span><span class="w"> </span><span class="s">"¤00M"</span><span class="p">,</span><span class="w"> </span><span class="s">"¤00T"</span><span class="p">,</span><span class="w"> </span><span class="s">"¤0B"</span><span class="p">,</span><span class="w"> </span><span class="s">"¤0K"</span><span class="p">,</span><span class="w"> </span><span class="s">"¤0M"</span><span class="p">,</span><span class="w"> </span><span class="s">"¤0T"</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="s">"¤ #,##0.00"</span><span class="p">,</span><span class="w"> </span><span class="s">"¤ #,##0.00;(¤ #,##0.00)"</span><span class="p">,</span><span class="w"> </span><span class="s">"¤ 000B"</span><span class="p">,</span><span class="w"> </span><span class="s">"¤ 000K"</span><span class="p">,</span><span class="w"> </span><span class="s">"¤ 000M"</span><span class="p">,</span><span class="w">
|
</span><span class="s">"¤ #,##0.00"</span><span class="p">,</span><span class="w"> </span><span class="s">"¤ #,##0.00;(¤ #,##0.00)"</span><span class="p">,</span><span class="w"> </span><span class="s">"¤ 000B"</span><span class="p">,</span><span class="w"> </span><span class="s">"¤ 000K"</span><span class="p">,</span><span class="w"> </span><span class="s">"¤ 000M"</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="s">"¤ 000T"</span><span class="p">,</span><span class="w"> </span><span class="s">"¤ 00B"</span><span class="p">,</span><span class="w"> </span><span class="s">"¤ 00K"</span><span class="p">,</span><span class="w"> </span><span class="s">"¤ 00M"</span><span class="p">,</span><span class="w"> </span><span class="s">"¤ 00T"</span><span class="p">,</span><span class="w"> </span><span class="s">"¤ 0B"</span><span class="p">,</span><span class="w"> </span><span class="s">"¤ 0K"</span><span class="p">,</span><span class="w"> </span><span class="s">"¤ 0M"</span><span class="p">,</span><span class="w"> </span><span class="s">"¤ 0T"</span><span class="p" data-group-id="2601816501-3">]</span><span class="p" data-group-id="2601816501-2">}</span></code></pre>
|
</span><span class="s">"¤ 000T"</span><span class="p">,</span><span class="w"> </span><span class="s">"¤ 00B"</span><span class="p">,</span><span class="w"> </span><span class="s">"¤ 00K"</span><span class="p">,</span><span class="w"> </span><span class="s">"¤ 00M"</span><span class="p">,</span><span class="w"> </span><span class="s">"¤ 00T"</span><span class="p">,</span><span class="w"> </span><span class="s">"¤ 0B"</span><span class="p">,</span><span class="w"> </span><span class="s">"¤ 0K"</span><span class="p">,</span><span class="w"> </span><span class="s">"¤ 0M"</span><span class="p">,</span><span class="w"> </span><span class="s">"¤ 0T"</span><span class="p" data-group-id="3987909062-3">]</span><span class="p" data-group-id="3987909062-2">}</span></code></pre>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
<section class="detail" id="default_grouping_for/1">
|
<section class="detail" id="default_grouping_for/1">
|
||||||
@ -559,8 +559,8 @@ is <a href="Plausible.Cldr.html#get_locale/0"><code class="inline">Plausible.Cld
|
|||||||
Examples
|
Examples
|
||||||
</a>
|
</a>
|
||||||
</h2>
|
</h2>
|
||||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </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="4650306930-1">(</span><span class="ss">:en</span><span class="p" data-group-id="4650306930-1">)</span><span class="w">
|
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </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="5288088616-1">(</span><span class="ss">:en</span><span class="p" data-group-id="5288088616-1">)</span><span class="w">
|
||||||
</span><span class="p" data-group-id="4650306930-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="4650306930-3">%{</span><span class="ss">fraction</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="4650306930-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="4650306930-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="4650306930-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="4650306930-5">}</span><span class="p" data-group-id="4650306930-3">}</span><span class="p" data-group-id="4650306930-2">}</span></code></pre>
|
</span><span class="p" data-group-id="5288088616-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="5288088616-3">%{</span><span class="ss">fraction</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="5288088616-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="5288088616-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="5288088616-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="5288088616-5">}</span><span class="p" data-group-id="5288088616-3">}</span><span class="p" data-group-id="5288088616-2">}</span></code></pre>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
<section class="detail" id="default_grouping_for!/1">
|
<section class="detail" id="default_grouping_for!/1">
|
||||||
@ -612,8 +612,8 @@ is <a href="Plausible.Cldr.html#get_locale/0"><code class="inline">Plausible.Cld
|
|||||||
Examples
|
Examples
|
||||||
</a>
|
</a>
|
||||||
</h2>
|
</h2>
|
||||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </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="6615508982-1">(</span><span class="ss">:en</span><span class="p" data-group-id="6615508982-1">)</span><span class="w">
|
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </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="1291329849-1">(</span><span class="ss">:en</span><span class="p" data-group-id="1291329849-1">)</span><span class="w">
|
||||||
</span><span class="p" data-group-id="6615508982-2">%{</span><span class="ss">fraction</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="6615508982-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="6615508982-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="6615508982-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="6615508982-4">}</span><span class="p" data-group-id="6615508982-2">}</span></code></pre>
|
</span><span class="p" data-group-id="1291329849-2">%{</span><span class="ss">fraction</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="1291329849-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="1291329849-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="1291329849-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="1291329849-4">}</span><span class="p" data-group-id="1291329849-2">}</span></code></pre>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
<section class="detail" id="formats_for/2">
|
<section class="detail" id="formats_for/2">
|
||||||
@ -670,18 +670,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">"#,##0 %"</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">"#,##0 %"</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">"#E0"</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">"#E0"</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">"#,##0.###"</span><span class="w">
|
</span><span class="ss">standard</span><span class="p">:</span><span class="w"> </span><span class="s">"#,##0.###"</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="9935200363-1">[</span><span class="p" data-group-id="9935200363-2">{</span><span class="s">"1000"</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="9935200363-3">[</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">"0 k ¤"</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">"0 k ¤"</span><span class="p" data-group-id="9935200363-3">]</span><span class="p" data-group-id="9935200363-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="6560473842-1">[</span><span class="p" data-group-id="6560473842-2">{</span><span class="s">"1000"</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="6560473842-3">[</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">"0 k ¤"</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">"0 k ¤"</span><span class="p" data-group-id="6560473842-3">]</span><span class="p" data-group-id="6560473842-2">}</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="p" data-group-id="9935200363-4">{</span><span class="s">"10000"</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="9935200363-5">[</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">"00 k ¤"</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">"00 k ¤"</span><span class="p" data-group-id="9935200363-5">]</span><span class="p" data-group-id="9935200363-4">}</span><span class="p">,</span><span class="w">
|
</span><span class="p" data-group-id="6560473842-4">{</span><span class="s">"10000"</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="6560473842-5">[</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">"00 k ¤"</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">"00 k ¤"</span><span class="p" data-group-id="6560473842-5">]</span><span class="p" data-group-id="6560473842-4">}</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="p" data-group-id="9935200363-6">{</span><span class="s">"100000"</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="9935200363-7">[</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">"000 k ¤"</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">"000 k ¤"</span><span class="p" data-group-id="9935200363-7">]</span><span class="p" data-group-id="9935200363-6">}</span><span class="p">,</span><span class="w">
|
</span><span class="p" data-group-id="6560473842-6">{</span><span class="s">"100000"</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="6560473842-7">[</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">"000 k ¤"</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">"000 k ¤"</span><span class="p" data-group-id="6560473842-7">]</span><span class="p" data-group-id="6560473842-6">}</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="p" data-group-id="9935200363-8">{</span><span class="s">"1000000"</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="9935200363-9">[</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">"0 M ¤"</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">"0 M ¤"</span><span class="p" data-group-id="9935200363-9">]</span><span class="p" data-group-id="9935200363-8">}</span><span class="p">,</span><span class="w">
|
</span><span class="p" data-group-id="6560473842-8">{</span><span class="s">"1000000"</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="6560473842-9">[</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">"0 M ¤"</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">"0 M ¤"</span><span class="p" data-group-id="6560473842-9">]</span><span class="p" data-group-id="6560473842-8">}</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="p" data-group-id="9935200363-10">{</span><span class="s">"10000000"</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="9935200363-11">[</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">"00 M ¤"</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">"00 M ¤"</span><span class="p" data-group-id="9935200363-11">]</span><span class="p" data-group-id="9935200363-10">}</span><span class="p">,</span><span class="w">
|
</span><span class="p" data-group-id="6560473842-10">{</span><span class="s">"10000000"</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="6560473842-11">[</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">"00 M ¤"</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">"00 M ¤"</span><span class="p" data-group-id="6560473842-11">]</span><span class="p" data-group-id="6560473842-10">}</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="p" data-group-id="9935200363-12">{</span><span class="s">"100000000"</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="9935200363-13">[</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">"000 M ¤"</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">"000 M ¤"</span><span class="p" data-group-id="9935200363-13">]</span><span class="p" data-group-id="9935200363-12">}</span><span class="p">,</span><span class="w">
|
</span><span class="p" data-group-id="6560473842-12">{</span><span class="s">"100000000"</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="6560473842-13">[</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">"000 M ¤"</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">"000 M ¤"</span><span class="p" data-group-id="6560473842-13">]</span><span class="p" data-group-id="6560473842-12">}</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="p" data-group-id="9935200363-14">{</span><span class="s">"1000000000"</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="9935200363-15">[</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">"0 Md ¤"</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">"0 Md ¤"</span><span class="p" data-group-id="9935200363-15">]</span><span class="p" data-group-id="9935200363-14">}</span><span class="p">,</span><span class="w">
|
</span><span class="p" data-group-id="6560473842-14">{</span><span class="s">"1000000000"</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="6560473842-15">[</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">"0 Md ¤"</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">"0 Md ¤"</span><span class="p" data-group-id="6560473842-15">]</span><span class="p" data-group-id="6560473842-14">}</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="p" data-group-id="9935200363-16">{</span><span class="s">"10000000000"</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="9935200363-17">[</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">"00 Md ¤"</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">"00 Md ¤"</span><span class="p" data-group-id="9935200363-17">]</span><span class="p" data-group-id="9935200363-16">}</span><span class="p">,</span><span class="w">
|
</span><span class="p" data-group-id="6560473842-16">{</span><span class="s">"10000000000"</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="6560473842-17">[</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">"00 Md ¤"</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">"00 Md ¤"</span><span class="p" data-group-id="6560473842-17">]</span><span class="p" data-group-id="6560473842-16">}</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="p" data-group-id="9935200363-18">{</span><span class="s">"100000000000"</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="9935200363-19">[</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">"000 Md ¤"</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">"000 Md ¤"</span><span class="p" data-group-id="9935200363-19">]</span><span class="p" data-group-id="9935200363-18">}</span><span class="p">,</span><span class="w">
|
</span><span class="p" data-group-id="6560473842-18">{</span><span class="s">"100000000000"</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="6560473842-19">[</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">"000 Md ¤"</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">"000 Md ¤"</span><span class="p" data-group-id="6560473842-19">]</span><span class="p" data-group-id="6560473842-18">}</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="p" data-group-id="9935200363-20">{</span><span class="s">"1000000000000"</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="9935200363-21">[</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">"0 Bn ¤"</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">"0 Bn ¤"</span><span class="p" data-group-id="9935200363-21">]</span><span class="p" data-group-id="9935200363-20">}</span><span class="p">,</span><span class="w">
|
</span><span class="p" data-group-id="6560473842-20">{</span><span class="s">"1000000000000"</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="6560473842-21">[</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">"0 Bn ¤"</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">"0 Bn ¤"</span><span class="p" data-group-id="6560473842-21">]</span><span class="p" data-group-id="6560473842-20">}</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="p" data-group-id="9935200363-22">{</span><span class="s">"10000000000000"</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="9935200363-23">[</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">"00 Bn ¤"</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">"00 Bn ¤"</span><span class="p" data-group-id="9935200363-23">]</span><span class="p" data-group-id="9935200363-22">}</span><span class="p">,</span><span class="w">
|
</span><span class="p" data-group-id="6560473842-22">{</span><span class="s">"10000000000000"</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="6560473842-23">[</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">"00 Bn ¤"</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">"00 Bn ¤"</span><span class="p" data-group-id="6560473842-23">]</span><span class="p" data-group-id="6560473842-22">}</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="p" data-group-id="9935200363-24">{</span><span class="s">"100000000000000"</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="9935200363-25">[</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">"000 Bn ¤"</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">"000 Bn ¤"</span><span class="p" data-group-id="9935200363-25">]</span><span class="p" data-group-id="9935200363-24">}</span><span class="p" data-group-id="9935200363-1">]</span><span class="p">,</span><span class="w">
|
</span><span class="p" data-group-id="6560473842-24">{</span><span class="s">"100000000000000"</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="6560473842-25">[</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">"000 Bn ¤"</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">"000 Bn ¤"</span><span class="p" data-group-id="6560473842-25">]</span><span class="p" data-group-id="6560473842-24">}</span><span class="p" data-group-id="6560473842-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>
|
||||||
@ -772,8 +772,8 @@ is <a href="Plausible.Cldr.html#get_locale/0"><code class="inline">Plausible.Cld
|
|||||||
Examples
|
Examples
|
||||||
</a>
|
</a>
|
||||||
</h2>
|
</h2>
|
||||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </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="3026613345-1">(</span><span class="s">"en"</span><span class="p" data-group-id="3026613345-1">)</span><span class="w">
|
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </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="5576437280-1">(</span><span class="s">"en"</span><span class="p" data-group-id="5576437280-1">)</span><span class="w">
|
||||||
</span><span class="p" data-group-id="3026613345-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="3026613345-2">}</span></code></pre>
|
</span><span class="p" data-group-id="5576437280-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="5576437280-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">
|
||||||
@ -825,7 +825,7 @@ is <a href="Plausible.Cldr.html#get_locale/0"><code class="inline">Plausible.Cld
|
|||||||
Examples
|
Examples
|
||||||
</a>
|
</a>
|
||||||
</h2>
|
</h2>
|
||||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </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="3689351581-1">(</span><span class="s">"en"</span><span class="p" data-group-id="3689351581-1">)</span><span class="w">
|
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </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="5144539847-1">(</span><span class="s">"en"</span><span class="p" data-group-id="5144539847-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>
|
||||||
|
@ -429,31 +429,31 @@ The valid substitution keys are <code class="inline">:zero</code>, <code class="
|
|||||||
Examples
|
Examples
|
||||||
</a>
|
</a>
|
||||||
</h2>
|
</h2>
|
||||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </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="4230850055-1">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">"one"</span><span class="p" data-group-id="4230850055-1">}</span><span class="w">
|
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </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="8622666261-1">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">"one"</span><span class="p" data-group-id="8622666261-1">}</span><span class="w">
|
||||||
</span><span class="s">"one"</span><span class="w">
|
</span><span class="s">"one"</span><span class="w">
|
||||||
|
|
||||||
</span><span class="gp unselectable">iex> </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="4230850055-2">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">"one"</span><span class="p" data-group-id="4230850055-2">}</span><span class="w">
|
</span><span class="gp unselectable">iex> </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="8622666261-2">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">"one"</span><span class="p" data-group-id="8622666261-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> </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="4230850055-3">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">"one"</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">"two"</span><span class="p" data-group-id="4230850055-3">}</span><span class="w">
|
</span><span class="gp unselectable">iex> </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="8622666261-3">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">"one"</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">"two"</span><span class="p" data-group-id="8622666261-3">}</span><span class="w">
|
||||||
</span><span class="s">"two"</span><span class="w">
|
</span><span class="s">"two"</span><span class="w">
|
||||||
|
|
||||||
</span><span class="gp unselectable">iex> </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="4230850055-4">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">"one"</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">"two"</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">"other"</span><span class="p" data-group-id="4230850055-4">}</span><span class="w">
|
</span><span class="gp unselectable">iex> </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="8622666261-4">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">"one"</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">"two"</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">"other"</span><span class="p" data-group-id="8622666261-4">}</span><span class="w">
|
||||||
</span><span class="s">"two"</span><span class="w">
|
</span><span class="s">"two"</span><span class="w">
|
||||||
|
|
||||||
</span><span class="gp unselectable">iex> </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="4230850055-5">(</span><span class="mi">1</span><span class="p" data-group-id="4230850055-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="4230850055-6">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">"one"</span><span class="p" data-group-id="4230850055-6">}</span><span class="w">
|
</span><span class="gp unselectable">iex> </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="8622666261-5">(</span><span class="mi">1</span><span class="p" data-group-id="8622666261-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="8622666261-6">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">"one"</span><span class="p" data-group-id="8622666261-6">}</span><span class="w">
|
||||||
</span><span class="s">"one"</span><span class="w">
|
</span><span class="s">"one"</span><span class="w">
|
||||||
|
|
||||||
</span><span class="gp unselectable">iex> </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="4230850055-7">(</span><span class="mi">2</span><span class="p" data-group-id="4230850055-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="4230850055-8">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">"one"</span><span class="p" data-group-id="4230850055-8">}</span><span class="w">
|
</span><span class="gp unselectable">iex> </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="8622666261-7">(</span><span class="mi">2</span><span class="p" data-group-id="8622666261-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="8622666261-8">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">"one"</span><span class="p" data-group-id="8622666261-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> </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="4230850055-9">(</span><span class="mi">2</span><span class="p" data-group-id="4230850055-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="4230850055-10">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">"one"</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">"two"</span><span class="p" data-group-id="4230850055-10">}</span><span class="w">
|
</span><span class="gp unselectable">iex> </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="8622666261-9">(</span><span class="mi">2</span><span class="p" data-group-id="8622666261-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="8622666261-10">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">"one"</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">"two"</span><span class="p" data-group-id="8622666261-10">}</span><span class="w">
|
||||||
</span><span class="s">"two"</span><span class="w">
|
</span><span class="s">"two"</span><span class="w">
|
||||||
|
|
||||||
</span><span class="gp unselectable">iex> </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">"ar"</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="4230850055-11">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">"one"</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">"few"</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">"other"</span><span class="p" data-group-id="4230850055-11">}</span><span class="w">
|
</span><span class="gp unselectable">iex> </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">"ar"</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="8622666261-11">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">"one"</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">"few"</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">"other"</span><span class="p" data-group-id="8622666261-11">}</span><span class="w">
|
||||||
</span><span class="s">"other"</span><span class="w">
|
</span><span class="s">"other"</span><span class="w">
|
||||||
|
|
||||||
</span><span class="gp unselectable">iex> </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">"en"</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="4230850055-12">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">"one"</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">"few"</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">"other"</span><span class="p" data-group-id="4230850055-12">}</span><span class="w">
|
</span><span class="gp unselectable">iex> </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">"en"</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="8622666261-12">%{</span><span class="ss">one</span><span class="p">:</span><span class="w"> </span><span class="s">"one"</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">"few"</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">"other"</span><span class="p" data-group-id="8622666261-12">}</span><span class="w">
|
||||||
</span><span class="s">"other"</span></code></pre>
|
</span><span class="s">"other"</span></code></pre>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
@ -349,9 +349,9 @@ is <a href="Plausible.Cldr.html#get_locale/0"><code class="inline">Plausible.Cld
|
|||||||
Example:
|
Example:
|
||||||
</a>
|
</a>
|
||||||
</h2>
|
</h2>
|
||||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </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="8217385842-1">(</span><span class="ss">:th</span><span class="p" data-group-id="8217385842-1">)</span><span class="w">
|
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </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="9846655382-1">(</span><span class="ss">:th</span><span class="p" data-group-id="9846655382-1">)</span><span class="w">
|
||||||
</span><span class="p" data-group-id="8217385842-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="8217385842-3">%{</span><span class="w">
|
</span><span class="p" data-group-id="9846655382-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="9846655382-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="8217385842-4">%</span><span class="nc" data-group-id="8217385842-4">Cldr.Number.Symbol</span><span class="p" data-group-id="8217385842-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="9846655382-4">%</span><span class="nc" data-group-id="9846655382-4">Cldr.Number.Symbol</span><span class="p" data-group-id="9846655382-4">{</span><span class="w">
|
||||||
</span><span class="ss">decimal</span><span class="p">:</span><span class="w"> </span><span class="s">"."</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">"."</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">"E"</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">"E"</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">","</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">","</span><span class="p">,</span><span class="w">
|
||||||
@ -364,8 +364,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">"+"</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">"+"</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">"×"</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">"×"</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">":"</span><span class="w">
|
</span><span class="ss">time_separator</span><span class="p">:</span><span class="w"> </span><span class="s">":"</span><span class="w">
|
||||||
</span><span class="p" data-group-id="8217385842-4">}</span><span class="p">,</span><span class="w">
|
</span><span class="p" data-group-id="9846655382-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="8217385842-5">%</span><span class="nc" data-group-id="8217385842-5">Cldr.Number.Symbol</span><span class="p" data-group-id="8217385842-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="9846655382-5">%</span><span class="nc" data-group-id="9846655382-5">Cldr.Number.Symbol</span><span class="p" data-group-id="9846655382-5">{</span><span class="w">
|
||||||
</span><span class="ss">decimal</span><span class="p">:</span><span class="w"> </span><span class="s">"."</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">"."</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">"E"</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">"E"</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">","</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">","</span><span class="p">,</span><span class="w">
|
||||||
@ -378,8 +378,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">"+"</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">"+"</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">"×"</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">"×"</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">":"</span><span class="w">
|
</span><span class="ss">time_separator</span><span class="p">:</span><span class="w"> </span><span class="s">":"</span><span class="w">
|
||||||
</span><span class="p" data-group-id="8217385842-5">}</span><span class="w">
|
</span><span class="p" data-group-id="9846655382-5">}</span><span class="w">
|
||||||
</span><span class="p" data-group-id="8217385842-3">}</span><span class="p" data-group-id="8217385842-2">}</span></code></pre>
|
</span><span class="p" data-group-id="9846655382-3">}</span><span class="p" data-group-id="9846655382-2">}</span></code></pre>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
<section class="detail" id="number_symbols_for/2">
|
<section class="detail" id="number_symbols_for/2">
|
||||||
|
@ -288,23 +288,23 @@ it is returned as is.</p><h2 id="number_system_for/2-examples" class="section-he
|
|||||||
</a>
|
</a>
|
||||||
</h2>
|
</h2>
|
||||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </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">"th"</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> </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">"th"</span><span class="p">,</span><span class="w"> </span><span class="ss">:latn</span><span class="w">
|
||||||
</span><span class="p" data-group-id="5240971030-1">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="5240971030-2">%{</span><span class="ss">digits</span><span class="p">:</span><span class="w"> </span><span class="s">"0123456789"</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="5240971030-2">}</span><span class="p" data-group-id="5240971030-1">}</span><span class="w">
|
</span><span class="p" data-group-id="0707438337-1">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="0707438337-2">%{</span><span class="ss">digits</span><span class="p">:</span><span class="w"> </span><span class="s">"0123456789"</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="0707438337-2">}</span><span class="p" data-group-id="0707438337-1">}</span><span class="w">
|
||||||
|
|
||||||
</span><span class="gp unselectable">iex> </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">"en"</span><span class="p">,</span><span class="w"> </span><span class="ss">:default</span><span class="w">
|
</span><span class="gp unselectable">iex> </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">"en"</span><span class="p">,</span><span class="w"> </span><span class="ss">:default</span><span class="w">
|
||||||
</span><span class="p" data-group-id="5240971030-3">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="5240971030-4">%{</span><span class="ss">digits</span><span class="p">:</span><span class="w"> </span><span class="s">"0123456789"</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="5240971030-4">}</span><span class="p" data-group-id="5240971030-3">}</span><span class="w">
|
</span><span class="p" data-group-id="0707438337-3">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="0707438337-4">%{</span><span class="ss">digits</span><span class="p">:</span><span class="w"> </span><span class="s">"0123456789"</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="0707438337-4">}</span><span class="p" data-group-id="0707438337-3">}</span><span class="w">
|
||||||
|
|
||||||
</span><span class="gp unselectable">iex> </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">"he"</span><span class="p">,</span><span class="w"> </span><span class="ss">:traditional</span><span class="w">
|
</span><span class="gp unselectable">iex> </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">"he"</span><span class="p">,</span><span class="w"> </span><span class="ss">:traditional</span><span class="w">
|
||||||
</span><span class="p" data-group-id="5240971030-5">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="5240971030-6">%{</span><span class="ss">rules</span><span class="p">:</span><span class="w"> </span><span class="s">"hebrew"</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="5240971030-6">}</span><span class="p" data-group-id="5240971030-5">}</span><span class="w">
|
</span><span class="p" data-group-id="0707438337-5">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="0707438337-6">%{</span><span class="ss">rules</span><span class="p">:</span><span class="w"> </span><span class="s">"hebrew"</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="0707438337-6">}</span><span class="p" data-group-id="0707438337-5">}</span><span class="w">
|
||||||
|
|
||||||
</span><span class="gp unselectable">iex> </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">"en"</span><span class="p">,</span><span class="w"> </span><span class="ss">:native</span><span class="w">
|
</span><span class="gp unselectable">iex> </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">"en"</span><span class="p">,</span><span class="w"> </span><span class="ss">:native</span><span class="w">
|
||||||
</span><span class="p" data-group-id="5240971030-7">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="5240971030-8">%{</span><span class="ss">digits</span><span class="p">:</span><span class="w"> </span><span class="s">"0123456789"</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="5240971030-8">}</span><span class="p" data-group-id="5240971030-7">}</span><span class="w">
|
</span><span class="p" data-group-id="0707438337-7">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="0707438337-8">%{</span><span class="ss">digits</span><span class="p">:</span><span class="w"> </span><span class="s">"0123456789"</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="0707438337-8">}</span><span class="p" data-group-id="0707438337-7">}</span><span class="w">
|
||||||
|
|
||||||
</span><span class="gp unselectable">iex> </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">"en"</span><span class="p">,</span><span class="w"> </span><span class="ss">:finance</span><span class="w">
|
</span><span class="gp unselectable">iex> </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">"en"</span><span class="p">,</span><span class="w"> </span><span class="ss">:finance</span><span class="w">
|
||||||
</span><span class="p" data-group-id="5240971030-9">{</span><span class="w">
|
</span><span class="p" data-group-id="0707438337-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="5240971030-10">{</span><span class="nc">Cldr.UnknownNumberSystemError</span><span class="p">,</span><span class="w">
|
</span><span class="p" data-group-id="0707438337-10">{</span><span class="nc">Cldr.UnknownNumberSystemError</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="s">"The number system :finance is unknown for the locale named :en. Valid number systems are %{default: :latn, native: :latn}"</span><span class="p" data-group-id="5240971030-10">}</span><span class="w">
|
</span><span class="s">"The number system :finance is unknown for the locale named :en. Valid number systems are %{default: :latn, native: :latn}"</span><span class="p" data-group-id="0707438337-10">}</span><span class="w">
|
||||||
</span><span class="p" data-group-id="5240971030-9">}</span></code></pre>
|
</span><span class="p" data-group-id="0707438337-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">
|
||||||
@ -395,10 +395,10 @@ or a <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.LanguageTag.html"><code cla
|
|||||||
</a>
|
</a>
|
||||||
</h2>
|
</h2>
|
||||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </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">"en"</span><span class="w">
|
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </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">"en"</span><span class="w">
|
||||||
</span><span class="p" data-group-id="7484393746-1">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="7484393746-2">[</span><span class="ss">:latn</span><span class="p" data-group-id="7484393746-2">]</span><span class="p" data-group-id="7484393746-1">}</span><span class="w">
|
</span><span class="p" data-group-id="5323825680-1">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="5323825680-2">[</span><span class="ss">:latn</span><span class="p" data-group-id="5323825680-2">]</span><span class="p" data-group-id="5323825680-1">}</span><span class="w">
|
||||||
|
|
||||||
</span><span class="gp unselectable">iex> </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">"zz"</span><span class="w">
|
</span><span class="gp unselectable">iex> </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">"zz"</span><span class="w">
|
||||||
</span><span class="p" data-group-id="7484393746-3">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="7484393746-4">{</span><span class="nc">Cldr.InvalidLanguageError</span><span class="p">,</span><span class="w"> </span><span class="s">"The language </span><span class="se">\"</span><span class="s">zz</span><span class="se">\"</span><span class="s"> is invalid"</span><span class="p" data-group-id="7484393746-4">}</span><span class="p" data-group-id="7484393746-3">}</span></code></pre>
|
</span><span class="p" data-group-id="5323825680-3">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="5323825680-4">{</span><span class="nc">Cldr.InvalidLanguageError</span><span class="p">,</span><span class="w"> </span><span class="s">"The language </span><span class="se">\"</span><span class="s">zz</span><span class="se">\"</span><span class="s"> is invalid"</span><span class="p" data-group-id="5323825680-4">}</span><span class="p" data-group-id="5323825680-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">
|
||||||
@ -480,13 +480,13 @@ or a <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.LanguageTag.html"><code cla
|
|||||||
</a>
|
</a>
|
||||||
</h2>
|
</h2>
|
||||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </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">"en"</span><span class="w">
|
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </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">"en"</span><span class="w">
|
||||||
</span><span class="p" data-group-id="8092677739-1">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="8092677739-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="8092677739-2">}</span><span class="p" data-group-id="8092677739-1">}</span><span class="w">
|
</span><span class="p" data-group-id="8727133067-1">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="8727133067-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="8727133067-2">}</span><span class="p" data-group-id="8727133067-1">}</span><span class="w">
|
||||||
|
|
||||||
</span><span class="gp unselectable">iex> </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">"th"</span><span class="w">
|
</span><span class="gp unselectable">iex> </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">"th"</span><span class="w">
|
||||||
</span><span class="p" data-group-id="8092677739-3">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="8092677739-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="8092677739-4">}</span><span class="p" data-group-id="8092677739-3">}</span><span class="w">
|
</span><span class="p" data-group-id="8727133067-3">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="8727133067-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="8727133067-4">}</span><span class="p" data-group-id="8727133067-3">}</span><span class="w">
|
||||||
|
|
||||||
</span><span class="gp unselectable">iex> </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">"zz"</span><span class="w">
|
</span><span class="gp unselectable">iex> </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">"zz"</span><span class="w">
|
||||||
</span><span class="p" data-group-id="8092677739-5">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="8092677739-6">{</span><span class="nc">Cldr.InvalidLanguageError</span><span class="p">,</span><span class="w"> </span><span class="s">"The language </span><span class="se">\"</span><span class="s">zz</span><span class="se">\"</span><span class="s"> is invalid"</span><span class="p" data-group-id="8092677739-6">}</span><span class="p" data-group-id="8092677739-5">}</span></code></pre>
|
</span><span class="p" data-group-id="8727133067-5">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="8727133067-6">{</span><span class="nc">Cldr.InvalidLanguageError</span><span class="p">,</span><span class="w"> </span><span class="s">"The language </span><span class="se">\"</span><span class="s">zz</span><span class="se">\"</span><span class="s"> is invalid"</span><span class="p" data-group-id="8727133067-6">}</span><span class="p" data-group-id="8727133067-5">}</span></code></pre>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
<section class="detail" id="number_systems_for!/1">
|
<section class="detail" id="number_systems_for!/1">
|
||||||
@ -584,20 +584,20 @@ actual system name.</p><h2 id="system_name_from/2-examples" class="section-headi
|
|||||||
Examples
|
Examples
|
||||||
</a>
|
</a>
|
||||||
</h2>
|
</h2>
|
||||||
<pre><code class="makeup elixir" translate="no"><span class="n">ex</span><span class="o">></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="6444144978-1">(</span><span class="ss">:default</span><span class="p">,</span><span class="w"> </span><span class="s">"en"</span><span class="p" data-group-id="6444144978-1">)</span><span class="w">
|
<pre><code class="makeup elixir" translate="no"><span class="n">ex</span><span class="o">></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="3431008232-1">(</span><span class="ss">:default</span><span class="p">,</span><span class="w"> </span><span class="s">"en"</span><span class="p" data-group-id="3431008232-1">)</span><span class="w">
|
||||||
</span><span class="p" data-group-id="6444144978-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="6444144978-2">}</span><span class="w">
|
</span><span class="p" data-group-id="3431008232-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="3431008232-2">}</span><span class="w">
|
||||||
|
|
||||||
</span><span class="gp unselectable">iex> </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="6444144978-3">(</span><span class="s">"latn"</span><span class="p">,</span><span class="w"> </span><span class="s">"en"</span><span class="p" data-group-id="6444144978-3">)</span><span class="w">
|
</span><span class="gp unselectable">iex> </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="3431008232-3">(</span><span class="s">"latn"</span><span class="p">,</span><span class="w"> </span><span class="s">"en"</span><span class="p" data-group-id="3431008232-3">)</span><span class="w">
|
||||||
</span><span class="p" data-group-id="6444144978-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="6444144978-4">}</span><span class="w">
|
</span><span class="p" data-group-id="3431008232-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="3431008232-4">}</span><span class="w">
|
||||||
|
|
||||||
</span><span class="gp unselectable">iex> </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="6444144978-5">(</span><span class="ss">:native</span><span class="p">,</span><span class="w"> </span><span class="s">"en"</span><span class="p" data-group-id="6444144978-5">)</span><span class="w">
|
</span><span class="gp unselectable">iex> </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="3431008232-5">(</span><span class="ss">:native</span><span class="p">,</span><span class="w"> </span><span class="s">"en"</span><span class="p" data-group-id="3431008232-5">)</span><span class="w">
|
||||||
</span><span class="p" data-group-id="6444144978-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="6444144978-6">}</span><span class="w">
|
</span><span class="p" data-group-id="3431008232-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="3431008232-6">}</span><span class="w">
|
||||||
|
|
||||||
</span><span class="gp unselectable">iex> </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="6444144978-7">(</span><span class="ss">:nope</span><span class="p">,</span><span class="w"> </span><span class="s">"en"</span><span class="p" data-group-id="6444144978-7">)</span><span class="w">
|
</span><span class="gp unselectable">iex> </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="3431008232-7">(</span><span class="ss">:nope</span><span class="p">,</span><span class="w"> </span><span class="s">"en"</span><span class="p" data-group-id="3431008232-7">)</span><span class="w">
|
||||||
</span><span class="p" data-group-id="6444144978-8">{</span><span class="w">
|
</span><span class="p" data-group-id="3431008232-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="6444144978-9">{</span><span class="nc">Cldr.UnknownNumberSystemError</span><span class="p">,</span><span class="w"> </span><span class="s">"The number system :nope is unknown"</span><span class="p" data-group-id="6444144978-9">}</span><span class="w">
|
</span><span class="p" data-group-id="3431008232-9">{</span><span class="nc">Cldr.UnknownNumberSystemError</span><span class="p">,</span><span class="w"> </span><span class="s">"The number system :nope is unknown"</span><span class="p" data-group-id="3431008232-9">}</span><span class="w">
|
||||||
</span><span class="p" data-group-id="6444144978-8">}</span></code></pre><p>Note that return value is not guaranteed to be a valid
|
</span><span class="p" data-group-id="3431008232-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>
|
||||||
@ -644,16 +644,16 @@ is recommended.</p></li></ul><h2 id="to_system/2-examples" class="section-headin
|
|||||||
</a>
|
</a>
|
||||||
</h2>
|
</h2>
|
||||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </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> </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="7829771341-1">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">"קכ״ג׳תנ״ו"</span><span class="p" data-group-id="7829771341-1">}</span><span class="w">
|
</span><span class="p" data-group-id="4198143694-1">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">"קכ״ג׳תנ״ו"</span><span class="p" data-group-id="4198143694-1">}</span><span class="w">
|
||||||
|
|
||||||
</span><span class="gp unselectable">iex> </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> </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="7829771341-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">"一百二十三"</span><span class="p" data-group-id="7829771341-2">}</span><span class="w">
|
</span><span class="p" data-group-id="4198143694-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">"一百二十三"</span><span class="p" data-group-id="4198143694-2">}</span><span class="w">
|
||||||
|
|
||||||
</span><span class="gp unselectable">iex> </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> </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="7829771341-3">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">"一百二十三"</span><span class="p" data-group-id="7829771341-3">}</span><span class="w">
|
</span><span class="p" data-group-id="4198143694-3">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">"一百二十三"</span><span class="p" data-group-id="4198143694-3">}</span><span class="w">
|
||||||
|
|
||||||
</span><span class="gp unselectable">iex> </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> </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="7829771341-4">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">"壹佰贰拾叁"</span><span class="p" data-group-id="7829771341-4">}</span></code></pre>
|
</span><span class="p" data-group-id="4198143694-4">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">"壹佰贰拾叁"</span><span class="p" data-group-id="4198143694-4">}</span></code></pre>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
<section class="detail" id="to_system!/2">
|
<section class="detail" id="to_system!/2">
|
||||||
|
@ -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="9027813829-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="1182003079-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="9027813829-2">[</span><span class="s">"en"</span><span class="p">,</span><span class="w"> </span><span class="s">"fr"</span><span class="p">,</span><span class="w"> </span><span class="s">"th"</span><span class="p" data-group-id="9027813829-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="1182003079-2">[</span><span class="s">"en"</span><span class="p">,</span><span class="w"> </span><span class="s">"fr"</span><span class="p">,</span><span class="w"> </span><span class="s">"th"</span><span class="p" data-group-id="1182003079-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">"en"</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">"en"</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="9027813829-3">[</span><span class="p" data-group-id="9027813829-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="9027813829-4">}</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="9027813829-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="9027813829-5">}</span><span class="p" data-group-id="9027813829-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="1182003079-3">[</span><span class="p" data-group-id="1182003079-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="1182003079-4">}</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1182003079-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="1182003079-5">}</span><span class="p" data-group-id="1182003079-3">]</span><span class="w">
|
||||||
</span><span class="k" data-group-id="9027813829-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="1182003079-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.31.3/Cldr.Number.System.html#systems_with_digits/0"><code class="inline">Cldr.Number.System.systems_with_digits/0</code></a>.</p><p>If a transliteration is requested between two number pairs that have not been configured for
|
configured: from <code class="inline">:latn</code> to <code class="inline">:thai</code> and from <code class="inline">:arab</code> to <code class="inline">:thai</code>.</p><p>A list of configurable number systems is returned by <a href="https://hexdocs.pm/ex_cldr_numbers/2.31.3/Cldr.Number.System.html#systems_with_digits/0"><code class="inline">Cldr.Number.System.systems_with_digits/0</code></a>.</p><p>If a transliteration is requested between two number pairs that have not been configured for
|
||||||
precompilation, a warning is logged.</p>
|
precompilation, a warning is logged.</p>
|
||||||
</section>
|
</section>
|
||||||
@ -252,22 +252,22 @@ and <a href="Plausible.Cldr.Number.System.html#number_systems_for/1"><code class
|
|||||||
Examples
|
Examples
|
||||||
</a>
|
</a>
|
||||||
</h2>
|
</h2>
|
||||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr.Number.Transliterate</span><span class="o">.</span><span class="n">transliterate</span><span class="p" data-group-id="5854740658-1">(</span><span class="s">"123556"</span><span class="p" data-group-id="5854740658-1">)</span><span class="w">
|
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr.Number.Transliterate</span><span class="o">.</span><span class="n">transliterate</span><span class="p" data-group-id="5494361394-1">(</span><span class="s">"123556"</span><span class="p" data-group-id="5494361394-1">)</span><span class="w">
|
||||||
</span><span class="s">"123556"</span><span class="w">
|
</span><span class="s">"123556"</span><span class="w">
|
||||||
|
|
||||||
</span><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr.Number.Transliterate</span><span class="o">.</span><span class="n">transliterate</span><span class="p" data-group-id="5854740658-2">(</span><span class="s">"123,556.000"</span><span class="p">,</span><span class="w"> </span><span class="s">"fr"</span><span class="p">,</span><span class="w"> </span><span class="ss">:default</span><span class="p" data-group-id="5854740658-2">)</span><span class="w">
|
</span><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr.Number.Transliterate</span><span class="o">.</span><span class="n">transliterate</span><span class="p" data-group-id="5494361394-2">(</span><span class="s">"123,556.000"</span><span class="p">,</span><span class="w"> </span><span class="s">"fr"</span><span class="p">,</span><span class="w"> </span><span class="ss">:default</span><span class="p" data-group-id="5494361394-2">)</span><span class="w">
|
||||||
</span><span class="s">"123 556,000"</span><span class="w">
|
</span><span class="s">"123 556,000"</span><span class="w">
|
||||||
|
|
||||||
</span><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr.Number.Transliterate</span><span class="o">.</span><span class="n">transliterate</span><span class="p" data-group-id="5854740658-3">(</span><span class="s">"123556"</span><span class="p">,</span><span class="w"> </span><span class="s">"th"</span><span class="p">,</span><span class="w"> </span><span class="ss">:default</span><span class="p" data-group-id="5854740658-3">)</span><span class="w">
|
</span><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr.Number.Transliterate</span><span class="o">.</span><span class="n">transliterate</span><span class="p" data-group-id="5494361394-3">(</span><span class="s">"123556"</span><span class="p">,</span><span class="w"> </span><span class="s">"th"</span><span class="p">,</span><span class="w"> </span><span class="ss">:default</span><span class="p" data-group-id="5494361394-3">)</span><span class="w">
|
||||||
</span><span class="s">"123556"</span><span class="w">
|
</span><span class="s">"123556"</span><span class="w">
|
||||||
|
|
||||||
</span><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr.Number.Transliterate</span><span class="o">.</span><span class="n">transliterate</span><span class="p" data-group-id="5854740658-4">(</span><span class="s">"123556"</span><span class="p">,</span><span class="w"> </span><span class="s">"th"</span><span class="p">,</span><span class="w"> </span><span class="s">"thai"</span><span class="p" data-group-id="5854740658-4">)</span><span class="w">
|
</span><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr.Number.Transliterate</span><span class="o">.</span><span class="n">transliterate</span><span class="p" data-group-id="5494361394-4">(</span><span class="s">"123556"</span><span class="p">,</span><span class="w"> </span><span class="s">"th"</span><span class="p">,</span><span class="w"> </span><span class="s">"thai"</span><span class="p" data-group-id="5494361394-4">)</span><span class="w">
|
||||||
</span><span class="s">"๑๒๓๕๕๖"</span><span class="w">
|
</span><span class="s">"๑๒๓๕๕๖"</span><span class="w">
|
||||||
|
|
||||||
</span><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr.Number.Transliterate</span><span class="o">.</span><span class="n">transliterate</span><span class="p" data-group-id="5854740658-5">(</span><span class="s">"123556"</span><span class="p">,</span><span class="w"> </span><span class="s">"th"</span><span class="p">,</span><span class="w"> </span><span class="ss">:native</span><span class="p" data-group-id="5854740658-5">)</span><span class="w">
|
</span><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr.Number.Transliterate</span><span class="o">.</span><span class="n">transliterate</span><span class="p" data-group-id="5494361394-5">(</span><span class="s">"123556"</span><span class="p">,</span><span class="w"> </span><span class="s">"th"</span><span class="p">,</span><span class="w"> </span><span class="ss">:native</span><span class="p" data-group-id="5494361394-5">)</span><span class="w">
|
||||||
</span><span class="s">"๑๒๓๕๕๖"</span><span class="w">
|
</span><span class="s">"๑๒๓๕๕๖"</span><span class="w">
|
||||||
|
|
||||||
</span><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr.Number.Transliterate</span><span class="o">.</span><span class="n">transliterate</span><span class="p" data-group-id="5854740658-6">(</span><span class="s">"Some number is: 123556"</span><span class="p">,</span><span class="w"> </span><span class="s">"th"</span><span class="p">,</span><span class="w"> </span><span class="s">"thai"</span><span class="p" data-group-id="5854740658-6">)</span><span class="w">
|
</span><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr.Number.Transliterate</span><span class="o">.</span><span class="n">transliterate</span><span class="p" data-group-id="5494361394-6">(</span><span class="s">"Some number is: 123556"</span><span class="p">,</span><span class="w"> </span><span class="s">"th"</span><span class="p">,</span><span class="w"> </span><span class="s">"thai"</span><span class="p" data-group-id="5494361394-6">)</span><span class="w">
|
||||||
</span><span class="s">"Some number is: ๑๒๓๕๕๖"</span></code></pre>
|
</span><span class="s">"Some number is: ๑๒๓๕๕๖"</span></code></pre>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
@ -412,19 +412,19 @@ using the Elixir standard library functions.</p><h2 id="parse/2-examples" class=
|
|||||||
Examples
|
Examples
|
||||||
</a>
|
</a>
|
||||||
</h2>
|
</h2>
|
||||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">parse</span><span class="p" data-group-id="4624161325-1">(</span><span class="s">"+1.000,34"</span><span class="p">,</span><span class="w"> </span><span class="ss">locale</span><span class="p">:</span><span class="w"> </span><span class="s">"de"</span><span class="p" data-group-id="4624161325-1">)</span><span class="w">
|
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">parse</span><span class="p" data-group-id="5542985472-1">(</span><span class="s">"+1.000,34"</span><span class="p">,</span><span class="w"> </span><span class="ss">locale</span><span class="p">:</span><span class="w"> </span><span class="s">"de"</span><span class="p" data-group-id="5542985472-1">)</span><span class="w">
|
||||||
</span><span class="p" data-group-id="4624161325-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="4624161325-2">}</span><span class="w">
|
</span><span class="p" data-group-id="5542985472-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="5542985472-2">}</span><span class="w">
|
||||||
|
|
||||||
</span><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">parse</span><span class="p" data-group-id="4624161325-3">(</span><span class="s">"-1_000_000.34"</span><span class="p" data-group-id="4624161325-3">)</span><span class="w">
|
</span><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">parse</span><span class="p" data-group-id="5542985472-3">(</span><span class="s">"-1_000_000.34"</span><span class="p" data-group-id="5542985472-3">)</span><span class="w">
|
||||||
</span><span class="p" data-group-id="4624161325-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="4624161325-4">}</span><span class="w">
|
</span><span class="p" data-group-id="5542985472-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="5542985472-4">}</span><span class="w">
|
||||||
|
|
||||||
</span><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">parse</span><span class="p" data-group-id="4624161325-5">(</span><span class="s">"1.000"</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">"de"</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="4624161325-5">)</span><span class="w">
|
</span><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">parse</span><span class="p" data-group-id="5542985472-5">(</span><span class="s">"1.000"</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">"de"</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="5542985472-5">)</span><span class="w">
|
||||||
</span><span class="p" data-group-id="4624161325-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="4624161325-6">}</span><span class="w">
|
</span><span class="p" data-group-id="5542985472-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="5542985472-6">}</span><span class="w">
|
||||||
|
|
||||||
</span><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">parse</span><span class="p" data-group-id="4624161325-7">(</span><span class="s">"+1.000,34"</span><span class="p">,</span><span class="w"> </span><span class="ss">locale</span><span class="p">:</span><span class="w"> </span><span class="s">"de"</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="4624161325-7">)</span><span class="w">
|
</span><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">parse</span><span class="p" data-group-id="5542985472-7">(</span><span class="s">"+1.000,34"</span><span class="p">,</span><span class="w"> </span><span class="ss">locale</span><span class="p">:</span><span class="w"> </span><span class="s">"de"</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="5542985472-7">)</span><span class="w">
|
||||||
</span><span class="p" data-group-id="4624161325-8">{</span><span class="ss">:error</span><span class="p">,</span><span class="w">
|
</span><span class="p" data-group-id="5542985472-8">{</span><span class="ss">:error</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="p" data-group-id="4624161325-9">{</span><span class="nc">Cldr.Number.ParseError</span><span class="p">,</span><span class="w">
|
</span><span class="p" data-group-id="5542985472-9">{</span><span class="nc">Cldr.Number.ParseError</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="s">"The string </span><span class="se">\"</span><span class="s">+1.000,34</span><span class="se">\"</span><span class="s"> could not be parsed as a number"</span><span class="p" data-group-id="4624161325-9">}</span><span class="p" data-group-id="4624161325-8">}</span></code></pre>
|
</span><span class="s">"The string </span><span class="se">\"</span><span class="s">+1.000,34</span><span class="se">\"</span><span class="s"> could not be parsed as a number"</span><span class="p" data-group-id="5542985472-9">}</span><span class="p" data-group-id="5542985472-8">}</span></code></pre>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
<section class="detail" id="resolve_currencies/2">
|
<section class="detail" id="resolve_currencies/2">
|
||||||
@ -496,17 +496,17 @@ financial instruments.</p></li></ul><h2 id="resolve_currencies/2-examples" class
|
|||||||
Examples
|
Examples
|
||||||
</a>
|
</a>
|
||||||
</h2>
|
</h2>
|
||||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">scan</span><span class="p" data-group-id="5399229145-1">(</span><span class="s">"100 US dollars"</span><span class="p" data-group-id="5399229145-1">)</span><span class="w">
|
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">scan</span><span class="p" data-group-id="0886737492-1">(</span><span class="s">"100 US dollars"</span><span class="p" data-group-id="0886737492-1">)</span><span class="w">
|
||||||
</span><span class="gp unselectable">...> </span><span class="o">|></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">...> </span><span class="o">|></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="5399229145-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="5399229145-2">]</span><span class="w">
|
</span><span class="p" data-group-id="0886737492-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="0886737492-2">]</span><span class="w">
|
||||||
|
|
||||||
</span><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">scan</span><span class="p" data-group-id="5399229145-3">(</span><span class="s">"100 eurosports"</span><span class="p" data-group-id="5399229145-3">)</span><span class="w">
|
</span><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">scan</span><span class="p" data-group-id="0886737492-3">(</span><span class="s">"100 eurosports"</span><span class="p" data-group-id="0886737492-3">)</span><span class="w">
|
||||||
</span><span class="gp unselectable">...> </span><span class="o">|></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="5399229145-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="5399229145-4">)</span><span class="w">
|
</span><span class="gp unselectable">...> </span><span class="o">|></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="0886737492-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="0886737492-4">)</span><span class="w">
|
||||||
</span><span class="p" data-group-id="5399229145-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="5399229145-5">]</span><span class="w">
|
</span><span class="p" data-group-id="0886737492-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="0886737492-5">]</span><span class="w">
|
||||||
|
|
||||||
</span><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">scan</span><span class="p" data-group-id="5399229145-6">(</span><span class="s">"100 dollars des États-Unis"</span><span class="p" data-group-id="5399229145-6">)</span><span class="w">
|
</span><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">scan</span><span class="p" data-group-id="0886737492-6">(</span><span class="s">"100 dollars des États-Unis"</span><span class="p" data-group-id="0886737492-6">)</span><span class="w">
|
||||||
</span><span class="gp unselectable">...> </span><span class="o">|></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="5399229145-7">(</span><span class="ss">locale</span><span class="p">:</span><span class="w"> </span><span class="s">"fr"</span><span class="p" data-group-id="5399229145-7">)</span><span class="w">
|
</span><span class="gp unselectable">...> </span><span class="o">|></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="0886737492-7">(</span><span class="ss">locale</span><span class="p">:</span><span class="w"> </span><span class="s">"fr"</span><span class="p" data-group-id="0886737492-7">)</span><span class="w">
|
||||||
</span><span class="p" data-group-id="5399229145-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="5399229145-8">]</span></code></pre>
|
</span><span class="p" data-group-id="0886737492-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="0886737492-8">]</span></code></pre>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
<section class="detail" id="resolve_currency/2">
|
<section class="detail" id="resolve_currency/2">
|
||||||
@ -583,19 +583,19 @@ financial instruments.</p></li></ul><h2 id="resolve_currency/2-examples" class="
|
|||||||
Examples
|
Examples
|
||||||
</a>
|
</a>
|
||||||
</h2>
|
</h2>
|
||||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">resolve_currency</span><span class="p" data-group-id="1245611926-1">(</span><span class="s">"US dollars"</span><span class="p" data-group-id="1245611926-1">)</span><span class="w">
|
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">resolve_currency</span><span class="p" data-group-id="6938954025-1">(</span><span class="s">"US dollars"</span><span class="p" data-group-id="6938954025-1">)</span><span class="w">
|
||||||
</span><span class="p" data-group-id="1245611926-2">[</span><span class="ss">:USD</span><span class="p" data-group-id="1245611926-2">]</span><span class="w">
|
</span><span class="p" data-group-id="6938954025-2">[</span><span class="ss">:USD</span><span class="p" data-group-id="6938954025-2">]</span><span class="w">
|
||||||
|
|
||||||
</span><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">resolve_currency</span><span class="p" data-group-id="1245611926-3">(</span><span class="s">"100 eurosports"</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="1245611926-3">)</span><span class="w">
|
</span><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">resolve_currency</span><span class="p" data-group-id="6938954025-3">(</span><span class="s">"100 eurosports"</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="6938954025-3">)</span><span class="w">
|
||||||
</span><span class="p" data-group-id="1245611926-4">[</span><span class="ss">:EUR</span><span class="p" data-group-id="1245611926-4">]</span><span class="w">
|
</span><span class="p" data-group-id="6938954025-4">[</span><span class="ss">:EUR</span><span class="p" data-group-id="6938954025-4">]</span><span class="w">
|
||||||
|
|
||||||
</span><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">resolve_currency</span><span class="p" data-group-id="1245611926-5">(</span><span class="s">"dollars des États-Unis"</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">"fr"</span><span class="p" data-group-id="1245611926-5">)</span><span class="w">
|
</span><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">resolve_currency</span><span class="p" data-group-id="6938954025-5">(</span><span class="s">"dollars des États-Unis"</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">"fr"</span><span class="p" data-group-id="6938954025-5">)</span><span class="w">
|
||||||
</span><span class="p" data-group-id="1245611926-6">[</span><span class="ss">:USD</span><span class="p" data-group-id="1245611926-6">]</span><span class="w">
|
</span><span class="p" data-group-id="6938954025-6">[</span><span class="ss">:USD</span><span class="p" data-group-id="6938954025-6">]</span><span class="w">
|
||||||
|
|
||||||
</span><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">resolve_currency</span><span class="p" data-group-id="1245611926-7">(</span><span class="s">"not a known currency"</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">"fr"</span><span class="p" data-group-id="1245611926-7">)</span><span class="w">
|
</span><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">resolve_currency</span><span class="p" data-group-id="6938954025-7">(</span><span class="s">"not a known currency"</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">"fr"</span><span class="p" data-group-id="6938954025-7">)</span><span class="w">
|
||||||
</span><span class="p" data-group-id="1245611926-8">{</span><span class="ss">:error</span><span class="p">,</span><span class="w">
|
</span><span class="p" data-group-id="6938954025-8">{</span><span class="ss">:error</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="p" data-group-id="1245611926-9">{</span><span class="nc">Cldr.UnknownCurrencyError</span><span class="p">,</span><span class="w">
|
</span><span class="p" data-group-id="6938954025-9">{</span><span class="nc">Cldr.UnknownCurrencyError</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="s">"The currency </span><span class="se">\"</span><span class="s">not a known currency</span><span class="se">\"</span><span class="s"> is unknown or not supported"</span><span class="p" data-group-id="1245611926-9">}</span><span class="p" data-group-id="1245611926-8">}</span></code></pre>
|
</span><span class="s">"The currency </span><span class="se">\"</span><span class="s">not a known currency</span><span class="se">\"</span><span class="s"> is unknown or not supported"</span><span class="p" data-group-id="6938954025-9">}</span><span class="p" data-group-id="6938954025-8">}</span></code></pre>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
<section class="detail" id="resolve_per/2">
|
<section class="detail" id="resolve_per/2">
|
||||||
@ -659,13 +659,13 @@ The default is <code class="inline">options[:backend].get_locale()</code></li></
|
|||||||
</a>
|
</a>
|
||||||
</h2>
|
</h2>
|
||||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </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">"11%"</span><span class="w">
|
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </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">"11%"</span><span class="w">
|
||||||
</span><span class="p" data-group-id="5308685845-1">[</span><span class="s">"11"</span><span class="p">,</span><span class="w"> </span><span class="ss">:percent</span><span class="p" data-group-id="5308685845-1">]</span><span class="w">
|
</span><span class="p" data-group-id="5995267976-1">[</span><span class="s">"11"</span><span class="p">,</span><span class="w"> </span><span class="ss">:percent</span><span class="p" data-group-id="5995267976-1">]</span><span class="w">
|
||||||
|
|
||||||
</span><span class="gp unselectable">iex> </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">"% of linguists"</span><span class="w">
|
</span><span class="gp unselectable">iex> </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">"% of linguists"</span><span class="w">
|
||||||
</span><span class="p" data-group-id="5308685845-2">[</span><span class="ss">:percent</span><span class="p">,</span><span class="w"> </span><span class="s">" of linguists"</span><span class="p" data-group-id="5308685845-2">]</span><span class="w">
|
</span><span class="p" data-group-id="5995267976-2">[</span><span class="ss">:percent</span><span class="p">,</span><span class="w"> </span><span class="s">" of linguists"</span><span class="p" data-group-id="5995267976-2">]</span><span class="w">
|
||||||
|
|
||||||
</span><span class="gp unselectable">iex> </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">"% of linguists %"</span><span class="w">
|
</span><span class="gp unselectable">iex> </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">"% of linguists %"</span><span class="w">
|
||||||
</span><span class="p" data-group-id="5308685845-3">[</span><span class="ss">:percent</span><span class="p">,</span><span class="w"> </span><span class="s">" of linguists "</span><span class="p">,</span><span class="w"> </span><span class="ss">:percent</span><span class="p" data-group-id="5308685845-3">]</span></code></pre>
|
</span><span class="p" data-group-id="5995267976-3">[</span><span class="ss">:percent</span><span class="p">,</span><span class="w"> </span><span class="s">" of linguists "</span><span class="p">,</span><span class="w"> </span><span class="ss">:percent</span><span class="p" data-group-id="5995267976-3">]</span></code></pre>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
<section class="detail" id="resolve_pers/2">
|
<section class="detail" id="resolve_pers/2">
|
||||||
@ -722,9 +722,9 @@ The default is <code class="inline">options[:backend].get_locale()</code></li></
|
|||||||
Examples
|
Examples
|
||||||
</a>
|
</a>
|
||||||
</h2>
|
</h2>
|
||||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">scan</span><span class="p" data-group-id="9968074516-1">(</span><span class="s">"100%"</span><span class="p" data-group-id="9968074516-1">)</span><span class="w">
|
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">scan</span><span class="p" data-group-id="2419974024-1">(</span><span class="s">"100%"</span><span class="p" data-group-id="2419974024-1">)</span><span class="w">
|
||||||
</span><span class="gp unselectable">...> </span><span class="o">|></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="9968074516-2">(</span><span class="p" data-group-id="9968074516-2">)</span><span class="w">
|
</span><span class="gp unselectable">...> </span><span class="o">|></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="2419974024-2">(</span><span class="p" data-group-id="2419974024-2">)</span><span class="w">
|
||||||
</span><span class="p" data-group-id="9968074516-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="9968074516-3">]</span></code></pre>
|
</span><span class="p" data-group-id="2419974024-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="2419974024-3">]</span></code></pre>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
<section class="detail" id="scan/2">
|
<section class="detail" id="scan/2">
|
||||||
@ -784,20 +784,20 @@ and any options provided are passed to that function.</p><h2 id="scan/2-examples
|
|||||||
Examples
|
Examples
|
||||||
</a>
|
</a>
|
||||||
</h2>
|
</h2>
|
||||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">scan</span><span class="p" data-group-id="3390363848-1">(</span><span class="s">"£1_000_000.34"</span><span class="p" data-group-id="3390363848-1">)</span><span class="w">
|
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">scan</span><span class="p" data-group-id="4271884479-1">(</span><span class="s">"£1_000_000.34"</span><span class="p" data-group-id="4271884479-1">)</span><span class="w">
|
||||||
</span><span class="p" data-group-id="3390363848-2">[</span><span class="s">"£"</span><span class="p">,</span><span class="w"> </span><span class="mf">1000000.34</span><span class="p" data-group-id="3390363848-2">]</span><span class="w">
|
</span><span class="p" data-group-id="4271884479-2">[</span><span class="s">"£"</span><span class="p">,</span><span class="w"> </span><span class="mf">1000000.34</span><span class="p" data-group-id="4271884479-2">]</span><span class="w">
|
||||||
|
|
||||||
</span><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">scan</span><span class="p" data-group-id="3390363848-3">(</span><span class="s">"I want £1_000_000 dollars"</span><span class="p" data-group-id="3390363848-3">)</span><span class="w">
|
</span><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">scan</span><span class="p" data-group-id="4271884479-3">(</span><span class="s">"I want £1_000_000 dollars"</span><span class="p" data-group-id="4271884479-3">)</span><span class="w">
|
||||||
</span><span class="p" data-group-id="3390363848-4">[</span><span class="s">"I want £"</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">" dollars"</span><span class="p" data-group-id="3390363848-4">]</span><span class="w">
|
</span><span class="p" data-group-id="4271884479-4">[</span><span class="s">"I want £"</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">" dollars"</span><span class="p" data-group-id="4271884479-4">]</span><span class="w">
|
||||||
|
|
||||||
</span><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">scan</span><span class="p" data-group-id="3390363848-5">(</span><span class="s">"The prize is 23"</span><span class="p" data-group-id="3390363848-5">)</span><span class="w">
|
</span><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">scan</span><span class="p" data-group-id="4271884479-5">(</span><span class="s">"The prize is 23"</span><span class="p" data-group-id="4271884479-5">)</span><span class="w">
|
||||||
</span><span class="p" data-group-id="3390363848-6">[</span><span class="s">"The prize is "</span><span class="p">,</span><span class="w"> </span><span class="mi">23</span><span class="p" data-group-id="3390363848-6">]</span><span class="w">
|
</span><span class="p" data-group-id="4271884479-6">[</span><span class="s">"The prize is "</span><span class="p">,</span><span class="w"> </span><span class="mi">23</span><span class="p" data-group-id="4271884479-6">]</span><span class="w">
|
||||||
|
|
||||||
</span><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">scan</span><span class="p" data-group-id="3390363848-7">(</span><span class="s">"The lottery number is 23 for the next draw"</span><span class="p" data-group-id="3390363848-7">)</span><span class="w">
|
</span><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">scan</span><span class="p" data-group-id="4271884479-7">(</span><span class="s">"The lottery number is 23 for the next draw"</span><span class="p" data-group-id="4271884479-7">)</span><span class="w">
|
||||||
</span><span class="p" data-group-id="3390363848-8">[</span><span class="s">"The lottery number is "</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">" for the next draw"</span><span class="p" data-group-id="3390363848-8">]</span><span class="w">
|
</span><span class="p" data-group-id="4271884479-8">[</span><span class="s">"The lottery number is "</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">" for the next draw"</span><span class="p" data-group-id="4271884479-8">]</span><span class="w">
|
||||||
|
|
||||||
</span><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">scan</span><span class="p" data-group-id="3390363848-9">(</span><span class="s">"The loss is -1.000 euros"</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">"de"</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="3390363848-9">)</span><span class="w">
|
</span><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">scan</span><span class="p" data-group-id="4271884479-9">(</span><span class="s">"The loss is -1.000 euros"</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">"de"</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="4271884479-9">)</span><span class="w">
|
||||||
</span><span class="p" data-group-id="3390363848-10">[</span><span class="s">"The loss is "</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">" euros"</span><span class="p" data-group-id="3390363848-10">]</span></code></pre>
|
</span><span class="p" data-group-id="4271884479-10">[</span><span class="s">"The loss is "</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">" euros"</span><span class="p" data-group-id="4271884479-10">]</span></code></pre>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
<section class="detail" id="to_approx_string/2">
|
<section class="detail" id="to_approx_string/2">
|
||||||
@ -844,7 +844,7 @@ options.</p></li></ul><h2 id="to_approx_string/2-example" class="section-heading
|
|||||||
</a>
|
</a>
|
||||||
</h2>
|
</h2>
|
||||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </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> </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="5558627782-1">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">"~1,234"</span><span class="p" data-group-id="5558627782-1">}</span></code></pre>
|
</span><span class="p" data-group-id="3438243461-1">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">"~1,234"</span><span class="p" data-group-id="3438243461-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">
|
||||||
@ -891,7 +891,7 @@ options.</p></li></ul><h2 id="to_at_least_string/2-example" class="section-headi
|
|||||||
</a>
|
</a>
|
||||||
</h2>
|
</h2>
|
||||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </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> </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="6176746635-1">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">"1,234+"</span><span class="p" data-group-id="6176746635-1">}</span></code></pre>
|
</span><span class="p" data-group-id="0454962119-1">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">"1,234+"</span><span class="p" data-group-id="0454962119-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">
|
||||||
@ -938,7 +938,7 @@ options.</p></li></ul><h2 id="to_at_most_string/2-example" class="section-headin
|
|||||||
</a>
|
</a>
|
||||||
</h2>
|
</h2>
|
||||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </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> </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="1003730802-1">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">"≤1,234"</span><span class="p" data-group-id="1003730802-1">}</span></code></pre>
|
</span><span class="p" data-group-id="7317916584-1">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">"≤1,234"</span><span class="p" data-group-id="7317916584-1">}</span></code></pre>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
<section class="detail" id="to_range_string/2">
|
<section class="detail" id="to_range_string/2">
|
||||||
@ -985,7 +985,7 @@ options.</p></li></ul><h2 id="to_range_string/2-example" class="section-heading"
|
|||||||
</a>
|
</a>
|
||||||
</h2>
|
</h2>
|
||||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </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> </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="4252185446-1">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">"1,234–5,678"</span><span class="p" data-group-id="4252185446-1">}</span></code></pre>
|
</span><span class="p" data-group-id="1567465561-1">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">"1,234–5,678"</span><span class="p" data-group-id="1567465561-1">}</span></code></pre>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
<section class="detail" id="to_string/2">
|
<section class="detail" id="to_string/2">
|
||||||
@ -1104,21 +1104,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> </span><span class="nc">Cldr.Number</span><span class="o">.</span><span class="n">to_string</span><span class="p" data-group-id="9922448884-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="9922448884-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> </span><span class="nc">Cldr.Number</span><span class="o">.</span><span class="n">to_string</span><span class="p" data-group-id="8607621967-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="8607621967-2">fn</span><span class="w">
|
||||||
</span><span class="gp unselectable">...> </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">-></span><span class="w"> </span><span class="s">"<span class=</span><span class="se">\"</span><span class="s">symbol</span><span class="se">\"</span><span class="s">>"</span><span class="w"> </span><span class="o"><></span><span class="w"> </span><span class="n">string</span><span class="w"> </span><span class="o"><></span><span class="w"> </span><span class="s">"</span>"</span><span class="w">
|
</span><span class="gp unselectable">...> </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">-></span><span class="w"> </span><span class="s">"<span class=</span><span class="se">\"</span><span class="s">symbol</span><span class="se">\"</span><span class="s">>"</span><span class="w"> </span><span class="o"><></span><span class="w"> </span><span class="n">string</span><span class="w"> </span><span class="o"><></span><span class="w"> </span><span class="s">"</span>"</span><span class="w">
|
||||||
</span><span class="gp unselectable">...> </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">-></span><span class="w"> </span><span class="s">"<span class=</span><span class="se">\"</span><span class="s">number</span><span class="se">\"</span><span class="s">>"</span><span class="w"> </span><span class="o"><></span><span class="w"> </span><span class="n">string</span><span class="w"> </span><span class="o"><></span><span class="w"> </span><span class="s">"</span>"</span><span class="w">
|
</span><span class="gp unselectable">...> </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">-></span><span class="w"> </span><span class="s">"<span class=</span><span class="se">\"</span><span class="s">number</span><span class="se">\"</span><span class="s">>"</span><span class="w"> </span><span class="o"><></span><span class="w"> </span><span class="n">string</span><span class="w"> </span><span class="o"><></span><span class="w"> </span><span class="s">"</span>"</span><span class="w">
|
||||||
</span><span class="gp unselectable">...> </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">-></span><span class="w"> </span><span class="s">"<span>"</span><span class="w"> </span><span class="o"><></span><span class="w"> </span><span class="n">string</span><span class="w"> </span><span class="o"><></span><span class="w"> </span><span class="s">"</span>"</span><span class="w">
|
</span><span class="gp unselectable">...> </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">-></span><span class="w"> </span><span class="s">"<span>"</span><span class="w"> </span><span class="o"><></span><span class="w"> </span><span class="n">string</span><span class="w"> </span><span class="o"><></span><span class="w"> </span><span class="s">"</span>"</span><span class="w">
|
||||||
</span><span class="gp unselectable">...> </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">-></span><span class="w"> </span><span class="n">string</span><span class="w">
|
</span><span class="gp unselectable">...> </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">-></span><span class="w"> </span><span class="n">string</span><span class="w">
|
||||||
</span><span class="gp unselectable">...> </span><span class="k" data-group-id="9922448884-2">end</span><span class="p" data-group-id="9922448884-1">)</span><span class="w">
|
</span><span class="gp unselectable">...> </span><span class="k" data-group-id="8607621967-2">end</span><span class="p" data-group-id="8607621967-1">)</span><span class="w">
|
||||||
</span><span class="p" data-group-id="9922448884-3">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">"<span class=</span><span class="se">\"</span><span class="s">symbol</span><span class="se">\"</span><span class="s">>$</span><span class=</span><span class="se">\"</span><span class="s">number</span><span class="se">\"</span><span class="s">>100.00</span>"</span><span class="p" data-group-id="9922448884-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="8607621967-3">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">"<span class=</span><span class="se">\"</span><span class="s">symbol</span><span class="se">\"</span><span class="s">>$</span><span class=</span><span class="se">\"</span><span class="s">number</span><span class="se">\"</span><span class="s">>100.00</span>"</span><span class="p" data-group-id="8607621967-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> </span><span class="nc">Cldr.Number</span><span class="o">.</span><span class="n">to_string</span><span class="p" data-group-id="8224559675-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="8224559675-2">fn</span><span class="w">
|
correctly encoded. For example:</p><pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </span><span class="nc">Cldr.Number</span><span class="o">.</span><span class="n">to_string</span><span class="p" data-group-id="2192505067-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="2192505067-2">fn</span><span class="w">
|
||||||
</span><span class="gp unselectable">...> </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">-></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="8224559675-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">"symbol"</span><span class="p" data-group-id="8224559675-3">)</span><span class="w">
|
</span><span class="gp unselectable">...> </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">-></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="2192505067-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">"symbol"</span><span class="p" data-group-id="2192505067-3">)</span><span class="w">
|
||||||
</span><span class="gp unselectable">...> </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">-></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="8224559675-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">"number"</span><span class="p" data-group-id="8224559675-4">)</span><span class="w">
|
</span><span class="gp unselectable">...> </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">-></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="2192505067-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">"number"</span><span class="p" data-group-id="2192505067-4">)</span><span class="w">
|
||||||
</span><span class="gp unselectable">...> </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">-></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="8224559675-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="8224559675-5">)</span><span class="w">
|
</span><span class="gp unselectable">...> </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">-></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="2192505067-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="2192505067-5">)</span><span class="w">
|
||||||
</span><span class="gp unselectable">...> </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">-></span><span class="w"> </span><span class="n">string</span><span class="w">
|
</span><span class="gp unselectable">...> </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">-></span><span class="w"> </span><span class="n">string</span><span class="w">
|
||||||
</span><span class="gp unselectable">...> </span><span class="k" data-group-id="8224559675-2">end</span><span class="p" data-group-id="8224559675-1">)</span><span class="w">
|
</span><span class="gp unselectable">...> </span><span class="k" data-group-id="2192505067-2">end</span><span class="p" data-group-id="2192505067-1">)</span><span class="w">
|
||||||
</span><span class="p" data-group-id="8224559675-6">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">"<span class=</span><span class="se">\"</span><span class="s">symbol</span><span class="se">\"</span><span class="s">>$</span><span class=</span><span class="se">\"</span><span class="s">number</span><span class="se">\"</span><span class="s">>100.00</span>"</span><span class="p" data-group-id="8224559675-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="2192505067-6">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">"<span class=</span><span class="se">\"</span><span class="s">symbol</span><span class="se">\"</span><span class="s">>$</span><span class=</span><span class="se">\"</span><span class="s">number</span><span class="se">\"</span><span class="s">>100.00</span>"</span><span class="p" data-group-id="2192505067-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.
|
||||||
@ -1139,80 +1139,80 @@ inserted in the final formatted number.</p><h2 id="to_string/2-returns" class="s
|
|||||||
</a>
|
</a>
|
||||||
</h2>
|
</h2>
|
||||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </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> </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="4089662565-1">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">"12,345"</span><span class="p" data-group-id="4089662565-1">}</span><span class="w">
|
</span><span class="p" data-group-id="5586746124-1">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">"12,345"</span><span class="p" data-group-id="5586746124-1">}</span><span class="w">
|
||||||
|
|
||||||
</span><span class="gp unselectable">iex> </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">"fr"</span><span class="w">
|
</span><span class="gp unselectable">iex> </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">"fr"</span><span class="w">
|
||||||
</span><span class="p" data-group-id="4089662565-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">"12 345"</span><span class="p" data-group-id="4089662565-2">}</span><span class="w">
|
</span><span class="p" data-group-id="5586746124-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">"12 345"</span><span class="p" data-group-id="5586746124-2">}</span><span class="w">
|
||||||
|
|
||||||
</span><span class="gp unselectable">iex> </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">"es"</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> </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">"es"</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="4089662565-3">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">"1.345,32 €"</span><span class="p" data-group-id="4089662565-3">}</span><span class="w">
|
</span><span class="p" data-group-id="5586746124-3">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">"1.345,32 €"</span><span class="p" data-group-id="5586746124-3">}</span><span class="w">
|
||||||
|
|
||||||
</span><span class="gp unselectable">iex> </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">"es"</span><span class="w">
|
</span><span class="gp unselectable">iex> </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">"es"</span><span class="w">
|
||||||
</span><span class="p" data-group-id="4089662565-4">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">"1345,32 €"</span><span class="p" data-group-id="4089662565-4">}</span><span class="w">
|
</span><span class="p" data-group-id="5586746124-4">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">"1345,32 €"</span><span class="p" data-group-id="5586746124-4">}</span><span class="w">
|
||||||
|
|
||||||
</span><span class="gp unselectable">iex> </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">"fr"</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">"USD"</span><span class="w">
|
</span><span class="gp unselectable">iex> </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">"fr"</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">"USD"</span><span class="w">
|
||||||
</span><span class="p" data-group-id="4089662565-5">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">"12 345,00 $US"</span><span class="p" data-group-id="4089662565-5">}</span><span class="w">
|
</span><span class="p" data-group-id="5586746124-5">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">"12 345,00 $US"</span><span class="p" data-group-id="5586746124-5">}</span><span class="w">
|
||||||
|
|
||||||
</span><span class="gp unselectable">iex> </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">"#E0"</span><span class="w">
|
</span><span class="gp unselectable">iex> </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">"#E0"</span><span class="w">
|
||||||
</span><span class="p" data-group-id="4089662565-6">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">"1.2345E4"</span><span class="p" data-group-id="4089662565-6">}</span><span class="w">
|
</span><span class="p" data-group-id="5586746124-6">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">"1.2345E4"</span><span class="p" data-group-id="5586746124-6">}</span><span class="w">
|
||||||
|
|
||||||
</span><span class="gp unselectable">iex> </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">"THB"</span><span class="w">
|
</span><span class="gp unselectable">iex> </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">"THB"</span><span class="w">
|
||||||
</span><span class="p" data-group-id="4089662565-7">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">"THB 12,345.00"</span><span class="p" data-group-id="4089662565-7">}</span><span class="w">
|
</span><span class="p" data-group-id="5586746124-7">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">"THB 12,345.00"</span><span class="p" data-group-id="5586746124-7">}</span><span class="w">
|
||||||
|
|
||||||
</span><span class="gp unselectable">iex> </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">"THB"</span><span class="w">
|
</span><span class="gp unselectable">iex> </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">"THB"</span><span class="w">
|
||||||
</span><span class="p" data-group-id="4089662565-8">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">"(THB 12,345.00)"</span><span class="p" data-group-id="4089662565-8">}</span><span class="w">
|
</span><span class="p" data-group-id="5586746124-8">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">"(THB 12,345.00)"</span><span class="p" data-group-id="5586746124-8">}</span><span class="w">
|
||||||
|
|
||||||
</span><span class="gp unselectable">iex> </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">"THB"</span><span class="p">,</span><span class="w">
|
</span><span class="gp unselectable">iex> </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">"THB"</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="gp unselectable">...> </span><span class="ss">locale</span><span class="p">:</span><span class="w"> </span><span class="s">"th"</span><span class="w">
|
</span><span class="gp unselectable">...> </span><span class="ss">locale</span><span class="p">:</span><span class="w"> </span><span class="s">"th"</span><span class="w">
|
||||||
</span><span class="p" data-group-id="4089662565-9">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">"฿12,345.00"</span><span class="p" data-group-id="4089662565-9">}</span><span class="w">
|
</span><span class="p" data-group-id="5586746124-9">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">"฿12,345.00"</span><span class="p" data-group-id="5586746124-9">}</span><span class="w">
|
||||||
|
|
||||||
</span><span class="gp unselectable">iex> </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">"THB"</span><span class="p">,</span><span class="w">
|
</span><span class="gp unselectable">iex> </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">"THB"</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="gp unselectable">...> </span><span class="ss">locale</span><span class="p">:</span><span class="w"> </span><span class="s">"th"</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">...> </span><span class="ss">locale</span><span class="p">:</span><span class="w"> </span><span class="s">"th"</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="4089662565-10">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">"฿๑๒,๓๔๕.๐๐"</span><span class="p" data-group-id="4089662565-10">}</span><span class="w">
|
</span><span class="p" data-group-id="5586746124-10">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">"฿๑๒,๓๔๕.๐๐"</span><span class="p" data-group-id="5586746124-10">}</span><span class="w">
|
||||||
|
|
||||||
</span><span class="gp unselectable">iex> </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> </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="4089662565-11">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">"1 thousand"</span><span class="p" data-group-id="4089662565-11">}</span><span class="w">
|
</span><span class="p" data-group-id="5586746124-11">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">"1 thousand"</span><span class="p" data-group-id="5586746124-11">}</span><span class="w">
|
||||||
|
|
||||||
</span><span class="gp unselectable">iex> </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">"USD"</span><span class="w">
|
</span><span class="gp unselectable">iex> </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">"USD"</span><span class="w">
|
||||||
</span><span class="p" data-group-id="4089662565-12">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">"1,244 US dollars"</span><span class="p" data-group-id="4089662565-12">}</span><span class="w">
|
</span><span class="p" data-group-id="5586746124-12">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">"1,244 US dollars"</span><span class="p" data-group-id="5586746124-12">}</span><span class="w">
|
||||||
|
|
||||||
</span><span class="gp unselectable">iex> </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> </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="4089662565-13">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">"1K"</span><span class="p" data-group-id="4089662565-13">}</span><span class="w">
|
</span><span class="p" data-group-id="5586746124-13">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">"1K"</span><span class="p" data-group-id="5586746124-13">}</span><span class="w">
|
||||||
|
|
||||||
</span><span class="gp unselectable">iex> </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">"EUR"</span><span class="w">
|
</span><span class="gp unselectable">iex> </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">"EUR"</span><span class="w">
|
||||||
</span><span class="p" data-group-id="4089662565-14">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">"€1K"</span><span class="p" data-group-id="4089662565-14">}</span><span class="w">
|
</span><span class="p" data-group-id="5586746124-14">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">"€1K"</span><span class="p" data-group-id="5586746124-14">}</span><span class="w">
|
||||||
|
|
||||||
</span><span class="gp unselectable">iex> </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> </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="4089662565-15">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">"one thousand two hundred thirty-four"</span><span class="p" data-group-id="4089662565-15">}</span><span class="w">
|
</span><span class="p" data-group-id="5586746124-15">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">"one thousand two hundred thirty-four"</span><span class="p" data-group-id="5586746124-15">}</span><span class="w">
|
||||||
|
|
||||||
</span><span class="gp unselectable">iex> </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> </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="4089662565-16">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">"one thousand two hundred and thirty-four"</span><span class="p" data-group-id="4089662565-16">}</span><span class="w">
|
</span><span class="p" data-group-id="5586746124-16">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">"one thousand two hundred and thirty-four"</span><span class="p" data-group-id="5586746124-16">}</span><span class="w">
|
||||||
|
|
||||||
</span><span class="gp unselectable">iex> </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> </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="4089662565-17">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">"nineteen eighty-nine"</span><span class="p" data-group-id="4089662565-17">}</span><span class="w">
|
</span><span class="p" data-group-id="5586746124-17">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">"nineteen eighty-nine"</span><span class="p" data-group-id="5586746124-17">}</span><span class="w">
|
||||||
|
|
||||||
</span><span class="gp unselectable">iex> </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> </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="4089662565-18">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">"123rd"</span><span class="p" data-group-id="4089662565-18">}</span><span class="w">
|
</span><span class="p" data-group-id="5586746124-18">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">"123rd"</span><span class="p" data-group-id="5586746124-18">}</span><span class="w">
|
||||||
|
|
||||||
</span><span class="gp unselectable">iex> </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> </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="4089662565-19">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">"CXXIII"</span><span class="p" data-group-id="4089662565-19">}</span><span class="w">
|
</span><span class="p" data-group-id="5586746124-19">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">"CXXIII"</span><span class="p" data-group-id="5586746124-19">}</span><span class="w">
|
||||||
|
|
||||||
</span><span class="gp unselectable">iex> </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">"th-u-nu-thai"</span><span class="w">
|
</span><span class="gp unselectable">iex> </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">"th-u-nu-thai"</span><span class="w">
|
||||||
</span><span class="p" data-group-id="4089662565-20">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">"๑๒๓"</span><span class="p" data-group-id="4089662565-20">}</span></code></pre><h2 id="to_string/2-errors" class="section-heading">
|
</span><span class="p" data-group-id="5586746124-20">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">"๑๒๓"</span><span class="p" data-group-id="5586746124-20">}</span></code></pre><h2 id="to_string/2-errors" class="section-heading">
|
||||||
<a href="#to_string/2-errors">
|
<a href="#to_string/2-errors">
|
||||||
<i class="ri-link-m" aria-hidden="true"></i>
|
<i class="ri-link-m" aria-hidden="true"></i>
|
||||||
Errors
|
Errors
|
||||||
</a>
|
</a>
|
||||||
</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> </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">to_string</span><span class="p" data-group-id="3528758468-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">"0#"</span><span class="p" data-group-id="3528758468-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> </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">to_string</span><span class="p" data-group-id="4297429647-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">"0#"</span><span class="p" data-group-id="4297429647-1">)</span><span class="w">
|
||||||
</span><span class="p" data-group-id="3528758468-2">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="3528758468-3">{</span><span class="nc">Cldr.FormatCompileError</span><span class="p">,</span><span class="w">
|
</span><span class="p" data-group-id="4297429647-2">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="4297429647-3">{</span><span class="nc">Cldr.FormatCompileError</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="s">"Decimal format compiler: syntax error before: </span><span class="se">\"</span><span class="s">#</span><span class="se">\"</span><span class="s">"</span><span class="p" data-group-id="3528758468-3">}</span><span class="p" data-group-id="3528758468-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">"Decimal format compiler: syntax error before: </span><span class="se">\"</span><span class="s">#</span><span class="se">\"</span><span class="s">"</span><span class="p" data-group-id="4297429647-3">}</span><span class="p" data-group-id="4297429647-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> </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">to_string</span><span class="p" data-group-id="8850091717-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">"he"</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">"hebr"</span><span class="p" data-group-id="8850091717-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> </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">to_string</span><span class="p" data-group-id="1898253743-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">"he"</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">"hebr"</span><span class="p" data-group-id="1898253743-1">)</span><span class="w">
|
||||||
</span><span class="p" data-group-id="8850091717-2">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="8850091717-3">{</span><span class="nc">Cldr.UnknownFormatError</span><span class="p">,</span><span class="w">
|
</span><span class="p" data-group-id="1898253743-2">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1898253743-3">{</span><span class="nc">Cldr.UnknownFormatError</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="s">"The locale :he with number system :hebr does not define a format :standard"</span><span class="p" data-group-id="8850091717-3">}</span><span class="p" data-group-id="8850091717-2">}</span></code></pre>
|
</span><span class="s">"The locale :he with number system :hebr does not define a format :standard"</span><span class="p" data-group-id="1898253743-3">}</span><span class="p" data-group-id="1898253743-2">}</span></code></pre>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
<section class="detail" id="to_string!/2">
|
<section class="detail" id="to_string!/2">
|
||||||
@ -1316,17 +1316,17 @@ returned by <a href="https://hexdocs.pm/ex_cldr/2.37.2/Cldr.html#known_number_sy
|
|||||||
</a>
|
</a>
|
||||||
</h2>
|
</h2>
|
||||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </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">"en"</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> </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">"en"</span><span class="p">,</span><span class="w"> </span><span class="ss">:latn</span><span class="w">
|
||||||
</span><span class="p" data-group-id="8843136026-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="8843136026-1">}</span><span class="w">
|
</span><span class="p" data-group-id="7050979187-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="7050979187-1">}</span><span class="w">
|
||||||
|
|
||||||
</span><span class="gp unselectable">iex> </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">"en"</span><span class="p">,</span><span class="w"> </span><span class="ss">:default</span><span class="w">
|
</span><span class="gp unselectable">iex> </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">"en"</span><span class="p">,</span><span class="w"> </span><span class="ss">:default</span><span class="w">
|
||||||
</span><span class="p" data-group-id="8843136026-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="8843136026-2">}</span><span class="w">
|
</span><span class="p" data-group-id="7050979187-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="7050979187-2">}</span><span class="w">
|
||||||
|
|
||||||
</span><span class="gp unselectable">iex> </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">"en"</span><span class="p">,</span><span class="w"> </span><span class="ss">:unknown</span><span class="w">
|
</span><span class="gp unselectable">iex> </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">"en"</span><span class="p">,</span><span class="w"> </span><span class="ss">:unknown</span><span class="w">
|
||||||
</span><span class="p" data-group-id="8843136026-3">{</span><span class="ss">:error</span><span class="p">,</span><span class="w">
|
</span><span class="p" data-group-id="7050979187-3">{</span><span class="ss">:error</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="p" data-group-id="8843136026-4">{</span><span class="nc">Cldr.UnknownNumberSystemError</span><span class="p">,</span><span class="w"> </span><span class="s">"The number system :unknown is unknown"</span><span class="p" data-group-id="8843136026-4">}</span><span class="p" data-group-id="8843136026-3">}</span><span class="w">
|
</span><span class="p" data-group-id="7050979187-4">{</span><span class="nc">Cldr.UnknownNumberSystemError</span><span class="p">,</span><span class="w"> </span><span class="s">"The number system :unknown is unknown"</span><span class="p" data-group-id="7050979187-4">}</span><span class="p" data-group-id="7050979187-3">}</span><span class="w">
|
||||||
|
|
||||||
</span><span class="gp unselectable">iex> </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">"zz"</span><span class="p">,</span><span class="w"> </span><span class="ss">:default</span><span class="w">
|
</span><span class="gp unselectable">iex> </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">"zz"</span><span class="p">,</span><span class="w"> </span><span class="ss">:default</span><span class="w">
|
||||||
</span><span class="p" data-group-id="8843136026-5">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="8843136026-6">{</span><span class="nc">Cldr.InvalidLanguageError</span><span class="p">,</span><span class="w"> </span><span class="s">"The language </span><span class="se">\"</span><span class="s">zz</span><span class="se">\"</span><span class="s"> is invalid"</span><span class="p" data-group-id="8843136026-6">}</span><span class="p" data-group-id="8843136026-5">}</span></code></pre>
|
</span><span class="p" data-group-id="7050979187-5">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="7050979187-6">{</span><span class="nc">Cldr.InvalidLanguageError</span><span class="p">,</span><span class="w"> </span><span class="s">"The language </span><span class="se">\"</span><span class="s">zz</span><span class="se">\"</span><span class="s"> is invalid"</span><span class="p" data-group-id="7050979187-6">}</span><span class="p" data-group-id="7050979187-5">}</span></code></pre>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
@ -116,9 +116,9 @@ 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 "und" 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 "und" 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.31.3/Cldr.Number.html#to_string/2"><code class="inline">Cldr.Number.to_string/2</code></a> function.</p><p>The functions on this module are defined at compile time based upon the RBNF rules
|
number formatting.</p><p>The standard public API for RBNF is via the <a href="https://hexdocs.pm/ex_cldr_numbers/2.31.3/Cldr.Number.html#to_string/2"><code class="inline">Cldr.Number.to_string/2</code></a> function.</p><p>The functions on this module are defined at compile time based upon the RBNF rules
|
||||||
defined in the Unicode CLDR data repository. Available rules are identified by:</p><pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </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="4562963880-1">(</span><span class="ss">:und</span><span class="p" data-group-id="4562963880-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> </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="1617481275-1">(</span><span class="ss">:und</span><span class="p" data-group-id="1617481275-1">)</span><span class="w">
|
||||||
</span><span class="gp unselectable">...> </span><span class="o">|></span><span class="w"> </span><span class="nc">Enum</span><span class="o">.</span><span class="n">sort</span><span class="p" data-group-id="4562963880-2">(</span><span class="p" data-group-id="4562963880-2">)</span><span class="w">
|
</span><span class="gp unselectable">...> </span><span class="o">|></span><span class="w"> </span><span class="nc">Enum</span><span class="o">.</span><span class="n">sort</span><span class="p" data-group-id="1617481275-2">(</span><span class="p" data-group-id="1617481275-2">)</span><span class="w">
|
||||||
</span><span class="p" data-group-id="4562963880-3">[</span><span class="w">
|
</span><span class="p" data-group-id="1617481275-3">[</span><span class="w">
|
||||||
</span><span class="ss">:armenian_lower</span><span class="p">,</span><span class="w">
|
</span><span class="ss">:armenian_lower</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="ss">:armenian_upper</span><span class="p">,</span><span class="w">
|
</span><span class="ss">:armenian_upper</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">:cyrillic_lower</span><span class="p">,</span><span class="w">
|
||||||
@ -132,9 +132,9 @@ defined in the Unicode CLDR data repository. Available rules are identified by:
|
|||||||
</span><span class="ss">:roman_upper</span><span class="p">,</span><span class="w">
|
</span><span class="ss">:roman_upper</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="ss">:tamil</span><span class="p">,</span><span class="w">
|
</span><span class="ss">:tamil</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="ss">:zz_default</span><span class="w">
|
</span><span class="ss">:zz_default</span><span class="w">
|
||||||
</span><span class="p" data-group-id="4562963880-3">]</span></code></pre><p>A rule can then be invoked on an available rule_set. For example</p><pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </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="7090153890-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="7090153890-1">)</span><span class="w">
|
</span><span class="p" data-group-id="1617481275-3">]</span></code></pre><p>A rule can then be invoked on an available rule_set. For example</p><pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </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="8490740679-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="8490740679-1">)</span><span class="w">
|
||||||
</span><span class="s">"CXXIII"</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> </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">to_string</span><span class="p" data-group-id="4034755840-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="4034755840-1">)</span><span class="w">
|
</span><span class="s">"CXXIII"</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> </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">to_string</span><span class="p" data-group-id="6030717690-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="6030717690-1">)</span><span class="w">
|
||||||
</span><span class="p" data-group-id="4034755840-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">"CXXIII"</span><span class="p" data-group-id="4034755840-2">}</span></code></pre>
|
</span><span class="p" data-group-id="6030717690-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">"CXXIII"</span><span class="p" data-group-id="6030717690-2">}</span></code></pre>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|
||||||
|
@ -116,20 +116,20 @@ 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.31.3/Cldr.Number.html#to_string/2"><code class="inline">Cldr.Number.to_string/2</code></a> function.</p><p>The functions on this module are defined at compile time based upon the RBNF rules
|
is considered complete for English however.</p><p>The standard public API for RBNF is via the <a href="https://hexdocs.pm/ex_cldr_numbers/2.31.3/Cldr.Number.html#to_string/2"><code class="inline">Cldr.Number.to_string/2</code></a> function.</p><p>The functions on this module are defined at compile time based upon the RBNF rules
|
||||||
defined in the Unicode CLDR data repository. Available rules are identified by:</p><pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </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="8928705114-1">(</span><span class="ss">:en</span><span class="p" data-group-id="8928705114-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> </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="5569854688-1">(</span><span class="ss">:en</span><span class="p" data-group-id="5569854688-1">)</span><span class="w">
|
||||||
</span><span class="p" data-group-id="8928705114-2">[</span><span class="ss">:digits_ordinal</span><span class="p" data-group-id="8928705114-2">]</span><span class="w">
|
</span><span class="p" data-group-id="5569854688-2">[</span><span class="ss">:digits_ordinal</span><span class="p" data-group-id="5569854688-2">]</span><span class="w">
|
||||||
|
|
||||||
</span><span class="gp unselectable">iex> </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="8928705114-3">(</span><span class="s">"fr"</span><span class="p" data-group-id="8928705114-3">)</span><span class="w">
|
</span><span class="gp unselectable">iex> </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="5569854688-3">(</span><span class="s">"fr"</span><span class="p" data-group-id="5569854688-3">)</span><span class="w">
|
||||||
</span><span class="gp unselectable">...> </span><span class="o">|></span><span class="w"> </span><span class="nc">Enum</span><span class="o">.</span><span class="n">sort</span><span class="p" data-group-id="8928705114-4">(</span><span class="p" data-group-id="8928705114-4">)</span><span class="w">
|
</span><span class="gp unselectable">...> </span><span class="o">|></span><span class="w"> </span><span class="nc">Enum</span><span class="o">.</span><span class="n">sort</span><span class="p" data-group-id="5569854688-4">(</span><span class="p" data-group-id="5569854688-4">)</span><span class="w">
|
||||||
</span><span class="p" data-group-id="8928705114-5">[</span><span class="w">
|
</span><span class="p" data-group-id="5569854688-5">[</span><span class="w">
|
||||||
</span><span class="ss">:digits_ordinal</span><span class="p">,</span><span class="w">
|
</span><span class="ss">:digits_ordinal</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_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_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_masculine_plural</span><span class="w">
|
</span><span class="ss">:digits_ordinal_masculine_plural</span><span class="w">
|
||||||
</span><span class="p" data-group-id="8928705114-5">]</span></code></pre><p>A rule can then be invoked on an available rule_set. For example</p><pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </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="4494307114-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="4494307114-1">)</span><span class="w">
|
</span><span class="p" data-group-id="5569854688-5">]</span></code></pre><p>A rule can then be invoked on an available rule_set. For example</p><pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </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="0800824960-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="0800824960-1">)</span><span class="w">
|
||||||
</span><span class="s">"123rd"</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> </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">to_string</span><span class="p" data-group-id="0902601766-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="0902601766-1">)</span><span class="w">
|
</span><span class="s">"123rd"</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> </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">to_string</span><span class="p" data-group-id="9085948836-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="9085948836-1">)</span><span class="w">
|
||||||
</span><span class="p" data-group-id="0902601766-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">"123rd"</span><span class="p" data-group-id="0902601766-2">}</span></code></pre>
|
</span><span class="p" data-group-id="9085948836-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">"123rd"</span><span class="p" data-group-id="9085948836-2">}</span></code></pre>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|
||||||
|
@ -116,9 +116,9 @@ 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.31.3/Cldr.Number.html#to_string/2"><code class="inline">Cldr.Number.to_string/2</code></a> function.</p><p>The functions on this module are defined at compile time based upon the RBNF rules
|
is considered complete for English however.</p><p>The standard public API for RBNF is via the <a href="https://hexdocs.pm/ex_cldr_numbers/2.31.3/Cldr.Number.html#to_string/2"><code class="inline">Cldr.Number.to_string/2</code></a> function.</p><p>The functions on this module are defined at compile time based upon the RBNF rules
|
||||||
defined in the Unicode CLDR data repository. Available rules are identified by:</p><pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </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="7183030944-1">(</span><span class="s">"en"</span><span class="p" data-group-id="7183030944-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> </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="0338190725-1">(</span><span class="s">"en"</span><span class="p" data-group-id="0338190725-1">)</span><span class="w">
|
||||||
</span><span class="gp unselectable">...> </span><span class="o">|></span><span class="w"> </span><span class="nc">Enum</span><span class="o">.</span><span class="n">sort</span><span class="p" data-group-id="7183030944-2">(</span><span class="p" data-group-id="7183030944-2">)</span><span class="w">
|
</span><span class="gp unselectable">...> </span><span class="o">|></span><span class="w"> </span><span class="nc">Enum</span><span class="o">.</span><span class="n">sort</span><span class="p" data-group-id="0338190725-2">(</span><span class="p" data-group-id="0338190725-2">)</span><span class="w">
|
||||||
</span><span class="p" data-group-id="7183030944-3">[</span><span class="w">
|
</span><span class="p" data-group-id="0338190725-3">[</span><span class="w">
|
||||||
</span><span class="ss">:spellout_cardinal</span><span class="p">,</span><span class="w">
|
</span><span class="ss">:spellout_cardinal</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_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_numbering</span><span class="p">,</span><span class="w">
|
||||||
@ -126,9 +126,9 @@ defined in the Unicode CLDR data repository. Available rules are identified by:
|
|||||||
</span><span class="ss">:spellout_numbering_year</span><span class="p">,</span><span class="w">
|
</span><span class="ss">:spellout_numbering_year</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="ss">:spellout_ordinal</span><span class="p">,</span><span class="w">
|
</span><span class="ss">:spellout_ordinal</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="ss">:spellout_ordinal_verbose</span><span class="w">
|
</span><span class="ss">:spellout_ordinal_verbose</span><span class="w">
|
||||||
</span><span class="p" data-group-id="7183030944-3">]</span></code></pre><p>A rule can then be invoked on an available rule_set. For example:</p><pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </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="7370985110-1">(</span><span class="mi">123</span><span class="p">,</span><span class="w"> </span><span class="s">"en"</span><span class="p" data-group-id="7370985110-1">)</span><span class="w">
|
</span><span class="p" data-group-id="0338190725-3">]</span></code></pre><p>A rule can then be invoked on an available rule_set. For example:</p><pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </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="6143566137-1">(</span><span class="mi">123</span><span class="p">,</span><span class="w"> </span><span class="s">"en"</span><span class="p" data-group-id="6143566137-1">)</span><span class="w">
|
||||||
</span><span class="s">"one hundred twenty-third"</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> </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">to_string</span><span class="p" data-group-id="0009725846-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="0009725846-1">)</span><span class="w">
|
</span><span class="s">"one hundred twenty-third"</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> </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">to_string</span><span class="p" data-group-id="3668719235-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="3668719235-1">)</span><span class="w">
|
||||||
</span><span class="p" data-group-id="0009725846-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">"one hundred twenty-three"</span><span class="p" data-group-id="0009725846-2">}</span></code></pre>
|
</span><span class="p" data-group-id="3668719235-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">"one hundred twenty-three"</span><span class="p" data-group-id="3668719235-2">}</span></code></pre>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|
||||||
|
@ -518,24 +518,24 @@ Functions
|
|||||||
Example
|
Example
|
||||||
</a>
|
</a>
|
||||||
</h2>
|
</h2>
|
||||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">default_locale</span><span class="p" data-group-id="2795339338-1">(</span><span class="p" data-group-id="2795339338-1">)</span><span class="w">
|
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">default_locale</span><span class="p" data-group-id="4962367205-1">(</span><span class="p" data-group-id="4962367205-1">)</span><span class="w">
|
||||||
</span><span class="p" data-group-id="2795339338-2">%</span><span class="nc" data-group-id="2795339338-2">Cldr.LanguageTag</span><span class="p" data-group-id="2795339338-2">{</span><span class="w">
|
</span><span class="p" data-group-id="4962367205-2">%</span><span class="nc" data-group-id="4962367205-2">Cldr.LanguageTag</span><span class="p" data-group-id="4962367205-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">"en-001"</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">"en-001"</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-001"</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-001"</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="2795339338-3">[</span><span class="p" data-group-id="2795339338-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="4962367205-3">[</span><span class="p" data-group-id="4962367205-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="2795339338-4">%{</span><span class="p" data-group-id="2795339338-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="4962367205-4">%{</span><span class="p" data-group-id="4962367205-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">"en"</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">"en"</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">"en"</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">"en"</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="2795339338-5">%{</span><span class="p" data-group-id="2795339338-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="4962367205-5">%{</span><span class="p" data-group-id="4962367205-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="2795339338-6">[</span><span class="p" data-group-id="2795339338-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="4962367205-6">[</span><span class="p" data-group-id="4962367205-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">"en-001"</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">"en-001"</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">:"001"</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">:"001"</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="2795339338-7">%{</span><span class="p" data-group-id="2795339338-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="4962367205-7">%{</span><span class="p" data-group-id="4962367205-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="2795339338-8">[</span><span class="p" data-group-id="2795339338-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="4962367205-8">[</span><span class="p" data-group-id="4962367205-8">]</span><span class="w">
|
||||||
</span><span class="p" data-group-id="2795339338-2">}</span></code></pre>
|
</span><span class="p" data-group-id="4962367205-2">}</span></code></pre>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
<section class="detail" id="default_territory/0">
|
<section class="detail" id="default_territory/0">
|
||||||
@ -570,7 +570,7 @@ does not specify one and none can be inferred.</p><h2 id="default_territory/0-ex
|
|||||||
Example
|
Example
|
||||||
</a>
|
</a>
|
||||||
</h2>
|
</h2>
|
||||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">default_territory</span><span class="p" data-group-id="6305552647-1">(</span><span class="p" data-group-id="6305552647-1">)</span><span class="w">
|
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">default_territory</span><span class="p" data-group-id="6778235587-1">(</span><span class="p" data-group-id="6778235587-1">)</span><span class="w">
|
||||||
</span><span class="ss">:"001"</span></code></pre>
|
</span><span class="ss">:"001"</span></code></pre>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
@ -633,13 +633,13 @@ is inserted between words or sentences. The valid options are
|
|||||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">ellipsis</span><span class="w"> </span><span class="s">"And furthermore"</span><span class="w">
|
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">ellipsis</span><span class="w"> </span><span class="s">"And furthermore"</span><span class="w">
|
||||||
</span><span class="s">"And furthermore…"</span><span class="w">
|
</span><span class="s">"And furthermore…"</span><span class="w">
|
||||||
|
|
||||||
</span><span class="gp unselectable">iex> </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="9683697684-1">[</span><span class="s">"And furthermore"</span><span class="p">,</span><span class="w"> </span><span class="s">"there is much to be done"</span><span class="p" data-group-id="9683697684-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> </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="9445283476-1">[</span><span class="s">"And furthermore"</span><span class="p">,</span><span class="w"> </span><span class="s">"there is much to be done"</span><span class="p" data-group-id="9445283476-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">"And furthermore…there is much to be done"</span><span class="w">
|
</span><span class="s">"And furthermore…there is much to be done"</span><span class="w">
|
||||||
|
|
||||||
</span><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">ellipsis</span><span class="w"> </span><span class="s">"And furthermore"</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> </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">ellipsis</span><span class="w"> </span><span class="s">"And furthermore"</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">"And furthermore …"</span><span class="w">
|
</span><span class="s">"And furthermore …"</span><span class="w">
|
||||||
|
|
||||||
</span><span class="gp unselectable">iex> </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="9683697684-2">[</span><span class="s">"And furthermore"</span><span class="p">,</span><span class="w"> </span><span class="s">"there is much to be done"</span><span class="p" data-group-id="9683697684-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> </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="9445283476-2">[</span><span class="s">"And furthermore"</span><span class="p">,</span><span class="w"> </span><span class="s">"there is much to be done"</span><span class="p" data-group-id="9445283476-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">"And furthermore … there is much to be done"</span></code></pre>
|
</span><span class="s">"And furthermore … there is much to be done"</span></code></pre>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
@ -675,23 +675,23 @@ take an optional locale parameter for which a locale is not supplied.</p><h2 id=
|
|||||||
Example
|
Example
|
||||||
</a>
|
</a>
|
||||||
</h2>
|
</h2>
|
||||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">put_locale</span><span class="p" data-group-id="5161219277-1">(</span><span class="s">"pl"</span><span class="p" data-group-id="5161219277-1">)</span><span class="w">
|
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">put_locale</span><span class="p" data-group-id="1313924350-1">(</span><span class="s">"pl"</span><span class="p" data-group-id="1313924350-1">)</span><span class="w">
|
||||||
</span><span class="gp unselectable">iex> </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> </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="5161219277-2">%</span><span class="nc" data-group-id="5161219277-2">Cldr.LanguageTag</span><span class="p" data-group-id="5161219277-2">{</span><span class="w">
|
</span><span class="p" data-group-id="1313924350-2">%</span><span class="nc" data-group-id="1313924350-2">Cldr.LanguageTag</span><span class="p" data-group-id="1313924350-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">"pl"</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">"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">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="5161219277-3">%{</span><span class="p" data-group-id="5161219277-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="1313924350-3">%{</span><span class="p" data-group-id="1313924350-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">"pl"</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">"pl"</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="5161219277-4">%{</span><span class="p" data-group-id="5161219277-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="1313924350-4">%{</span><span class="p" data-group-id="1313924350-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="5161219277-5">[</span><span class="p" data-group-id="5161219277-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="1313924350-5">[</span><span class="p" data-group-id="1313924350-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">"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">"pl"</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="5161219277-6">%{</span><span class="p" data-group-id="5161219277-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="1313924350-6">%{</span><span class="p" data-group-id="1313924350-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="5161219277-7">[</span><span class="p" data-group-id="5161219277-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="1313924350-7">[</span><span class="p" data-group-id="1313924350-7">]</span><span class="w">
|
||||||
</span><span class="p" data-group-id="5161219277-2">}</span></code></pre>
|
</span><span class="p" data-group-id="1313924350-2">}</span></code></pre>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
<section class="detail" id="known_calendars/0">
|
<section class="detail" id="known_calendars/0">
|
||||||
@ -824,10 +824,10 @@ name is configured and available in Gettext.</p><h2 id="known_gettext_locale_nam
|
|||||||
Examples
|
Examples
|
||||||
</a>
|
</a>
|
||||||
</h2>
|
</h2>
|
||||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </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="6924135074-1">(</span><span class="s">"en"</span><span class="p" data-group-id="6924135074-1">)</span><span class="w">
|
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </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="2618821289-1">(</span><span class="s">"en"</span><span class="p" data-group-id="2618821289-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> </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="6924135074-2">(</span><span class="s">"!!"</span><span class="p" data-group-id="6924135074-2">)</span><span class="w">
|
</span><span class="gp unselectable">iex> </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="2618821289-2">(</span><span class="s">"!!"</span><span class="p" data-group-id="2618821289-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>
|
||||||
@ -946,10 +946,10 @@ name is configured and available in Cldr.</p><h2 id="known_locale_name?/1-argume
|
|||||||
Examples
|
Examples
|
||||||
</a>
|
</a>
|
||||||
</h2>
|
</h2>
|
||||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">known_locale_name?</span><span class="p" data-group-id="7200236250-1">(</span><span class="ss">:en</span><span class="p" data-group-id="7200236250-1">)</span><span class="w">
|
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">known_locale_name?</span><span class="p" data-group-id="2421569489-1">(</span><span class="ss">:en</span><span class="p" data-group-id="2421569489-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> </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">known_locale_name?</span><span class="p" data-group-id="7200236250-2">(</span><span class="ss">:"!!"</span><span class="p" data-group-id="7200236250-2">)</span><span class="w">
|
</span><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">known_locale_name?</span><span class="p" data-group-id="2421569489-2">(</span><span class="ss">:"!!"</span><span class="p" data-group-id="2421569489-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>
|
||||||
@ -1004,7 +1004,7 @@ in this module or in <a href="https://hexdocs.pm/gettext/0.22.3/Gettext.html"><c
|
|||||||
</a>
|
</a>
|
||||||
</h2>
|
</h2>
|
||||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </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> </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="1942489352-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="1942489352-1">]</span></code></pre>
|
</span><span class="p" data-group-id="8079408967-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="8079408967-1">]</span></code></pre>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
<section class="detail" id="known_number_systems/0">
|
<section class="detail" id="known_number_systems/0">
|
||||||
@ -1115,10 +1115,10 @@ rules based number formats (RBNF).</p><h2 id="known_rbnf_locale_name?/1-argument
|
|||||||
Examples
|
Examples
|
||||||
</a>
|
</a>
|
||||||
</h2>
|
</h2>
|
||||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </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="4625794516-1">(</span><span class="ss">:en</span><span class="p" data-group-id="4625794516-1">)</span><span class="w">
|
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </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="1379671113-1">(</span><span class="ss">:en</span><span class="p" data-group-id="1379671113-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> </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="4625794516-2">(</span><span class="ss">:"!!"</span><span class="p" data-group-id="4625794516-2">)</span><span class="w">
|
</span><span class="gp unselectable">iex> </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="1379671113-2">(</span><span class="ss">:"!!"</span><span class="p" data-group-id="1379671113-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>
|
||||||
@ -1239,29 +1239,29 @@ of a language tag.</p><h2 id="put_locale/1-examples" class="section-heading">
|
|||||||
Examples
|
Examples
|
||||||
</a>
|
</a>
|
||||||
</h2>
|
</h2>
|
||||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">put_locale</span><span class="p" data-group-id="0094907932-1">(</span><span class="s">"en"</span><span class="p" data-group-id="0094907932-1">)</span><span class="w">
|
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">put_locale</span><span class="p" data-group-id="9100039979-1">(</span><span class="s">"en"</span><span class="p" data-group-id="9100039979-1">)</span><span class="w">
|
||||||
</span><span class="p" data-group-id="0094907932-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
|
</span><span class="p" data-group-id="9100039979-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="p" data-group-id="0094907932-3">%</span><span class="nc" data-group-id="0094907932-3">Cldr.LanguageTag</span><span class="p" data-group-id="0094907932-3">{</span><span class="w">
|
</span><span class="p" data-group-id="9100039979-3">%</span><span class="nc" data-group-id="9100039979-3">Cldr.LanguageTag</span><span class="p" data-group-id="9100039979-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">"en"</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">"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">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="0094907932-4">[</span><span class="p" data-group-id="0094907932-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="9100039979-4">[</span><span class="p" data-group-id="9100039979-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="0094907932-5">%{</span><span class="p" data-group-id="0094907932-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="9100039979-5">%{</span><span class="p" data-group-id="9100039979-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">"en"</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">"en"</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">"en"</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">"en"</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="0094907932-6">%{</span><span class="p" data-group-id="0094907932-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="9100039979-6">%{</span><span class="p" data-group-id="9100039979-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="0094907932-7">[</span><span class="p" data-group-id="0094907932-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="9100039979-7">[</span><span class="p" data-group-id="9100039979-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">"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">"en"</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="0094907932-8">%{</span><span class="p" data-group-id="0094907932-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="9100039979-8">%{</span><span class="p" data-group-id="9100039979-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="0094907932-9">[</span><span class="p" data-group-id="0094907932-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="9100039979-9">[</span><span class="p" data-group-id="9100039979-9">]</span><span class="w">
|
||||||
</span><span class="p" data-group-id="0094907932-3">}</span><span class="p" data-group-id="0094907932-2">}</span><span class="w">
|
</span><span class="p" data-group-id="9100039979-3">}</span><span class="p" data-group-id="9100039979-2">}</span><span class="w">
|
||||||
|
|
||||||
</span><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">put_locale</span><span class="p" data-group-id="0094907932-10">(</span><span class="s">"invalid-locale!"</span><span class="p" data-group-id="0094907932-10">)</span><span class="w">
|
</span><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">put_locale</span><span class="p" data-group-id="9100039979-10">(</span><span class="s">"invalid-locale!"</span><span class="p" data-group-id="9100039979-10">)</span><span class="w">
|
||||||
</span><span class="p" data-group-id="0094907932-11">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="0094907932-12">{</span><span class="nc">Cldr.LanguageTag.ParseError</span><span class="p">,</span><span class="w">
|
</span><span class="p" data-group-id="9100039979-11">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="9100039979-12">{</span><span class="nc">Cldr.LanguageTag.ParseError</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="s">"Expected a BCP47 language tag. Could not parse the remaining </span><span class="se">\"</span><span class="s">!</span><span class="se">\"</span><span class="s"> starting at position 15"</span><span class="p" data-group-id="0094907932-12">}</span><span class="p" data-group-id="0094907932-11">}</span></code></pre>
|
</span><span class="s">"Expected a BCP47 language tag. Could not parse the remaining </span><span class="se">\"</span><span class="s">!</span><span class="se">\"</span><span class="s"> starting at position 15"</span><span class="p" data-group-id="9100039979-12">}</span><span class="p" data-group-id="9100039979-11">}</span></code></pre>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
<section class="detail" id="quote/2">
|
<section class="detail" id="quote/2">
|
||||||
@ -1444,47 +1444,47 @@ of a language tag.</p><h2 id="validate_locale/1-examples" class="section-heading
|
|||||||
Examples
|
Examples
|
||||||
</a>
|
</a>
|
||||||
</h2>
|
</h2>
|
||||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">validate_locale</span><span class="p" data-group-id="5091741856-1">(</span><span class="ss">:en</span><span class="p" data-group-id="5091741856-1">)</span><span class="w">
|
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">validate_locale</span><span class="p" data-group-id="5752370943-1">(</span><span class="ss">:en</span><span class="p" data-group-id="5752370943-1">)</span><span class="w">
|
||||||
</span><span class="p" data-group-id="5091741856-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
|
</span><span class="p" data-group-id="5752370943-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="p" data-group-id="5091741856-3">%</span><span class="nc" data-group-id="5091741856-3">Cldr.LanguageTag</span><span class="p" data-group-id="5091741856-3">{</span><span class="w">
|
</span><span class="p" data-group-id="5752370943-3">%</span><span class="nc" data-group-id="5752370943-3">Cldr.LanguageTag</span><span class="p" data-group-id="5752370943-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">"en"</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">"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">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="5091741856-4">%{</span><span class="p" data-group-id="5091741856-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="5752370943-4">%{</span><span class="p" data-group-id="5752370943-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">"en"</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">"en"</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">"en"</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">"en"</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="5091741856-5">%{</span><span class="p" data-group-id="5091741856-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="5752370943-5">%{</span><span class="p" data-group-id="5752370943-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="5091741856-6">[</span><span class="p" data-group-id="5091741856-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="5752370943-6">[</span><span class="p" data-group-id="5752370943-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">"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">"en"</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="5091741856-7">%{</span><span class="p" data-group-id="5091741856-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="5752370943-7">%{</span><span class="p" data-group-id="5752370943-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="5091741856-8">[</span><span class="p" data-group-id="5091741856-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="5752370943-8">[</span><span class="p" data-group-id="5752370943-8">]</span><span class="w">
|
||||||
</span><span class="p" data-group-id="5091741856-3">}</span><span class="p" data-group-id="5091741856-2">}</span><span class="w">
|
</span><span class="p" data-group-id="5752370943-3">}</span><span class="p" data-group-id="5752370943-2">}</span><span class="w">
|
||||||
|
|
||||||
|
|
||||||
</span><span class="gp unselectable">iex> </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="5091741856-9">(</span><span class="p" data-group-id="5091741856-9">)</span><span class="w">
|
</span><span class="gp unselectable">iex> </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="5752370943-9">(</span><span class="p" data-group-id="5752370943-9">)</span><span class="w">
|
||||||
</span><span class="p" data-group-id="5091741856-10">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
|
</span><span class="p" data-group-id="5752370943-10">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="p" data-group-id="5091741856-11">%</span><span class="nc" data-group-id="5091741856-11">Cldr.LanguageTag</span><span class="p" data-group-id="5091741856-11">{</span><span class="w">
|
</span><span class="p" data-group-id="5752370943-11">%</span><span class="nc" data-group-id="5752370943-11">Cldr.LanguageTag</span><span class="p" data-group-id="5752370943-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">"en-001"</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">"en-001"</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-001"</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-001"</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="5091741856-12">%{</span><span class="p" data-group-id="5091741856-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="5752370943-12">%{</span><span class="p" data-group-id="5752370943-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">"en"</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">"en"</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">"en"</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">"en"</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="5091741856-13">%{</span><span class="p" data-group-id="5091741856-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="5752370943-13">%{</span><span class="p" data-group-id="5752370943-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="5091741856-14">[</span><span class="p" data-group-id="5091741856-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="5752370943-14">[</span><span class="p" data-group-id="5752370943-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">"en-001"</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">"en-001"</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">:"001"</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">:"001"</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="5091741856-15">%{</span><span class="p" data-group-id="5091741856-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="5752370943-15">%{</span><span class="p" data-group-id="5752370943-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="5091741856-16">[</span><span class="p" data-group-id="5091741856-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="5752370943-16">[</span><span class="p" data-group-id="5752370943-16">]</span><span class="w">
|
||||||
</span><span class="p" data-group-id="5091741856-11">}</span><span class="p" data-group-id="5091741856-10">}</span><span class="w">
|
</span><span class="p" data-group-id="5752370943-11">}</span><span class="p" data-group-id="5752370943-10">}</span><span class="w">
|
||||||
|
|
||||||
</span><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">validate_locale</span><span class="p" data-group-id="5091741856-17">(</span><span class="s">"zzz"</span><span class="p" data-group-id="5091741856-17">)</span><span class="w">
|
</span><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">validate_locale</span><span class="p" data-group-id="5752370943-17">(</span><span class="s">"zzz"</span><span class="p" data-group-id="5752370943-17">)</span><span class="w">
|
||||||
</span><span class="p" data-group-id="5091741856-18">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="5091741856-19">{</span><span class="nc">Cldr.InvalidLanguageError</span><span class="p">,</span><span class="w"> </span><span class="s">"The language </span><span class="se">\"</span><span class="s">zzz</span><span class="se">\"</span><span class="s"> is invalid"</span><span class="p" data-group-id="5091741856-19">}</span><span class="p" data-group-id="5091741856-18">}</span></code></pre>
|
</span><span class="p" data-group-id="5752370943-18">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="5752370943-19">{</span><span class="nc">Cldr.InvalidLanguageError</span><span class="p">,</span><span class="w"> </span><span class="s">"The language </span><span class="se">\"</span><span class="s">zzz</span><span class="se">\"</span><span class="s"> is invalid"</span><span class="p" data-group-id="5752370943-19">}</span><span class="p" data-group-id="5752370943-18">}</span></code></pre>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
<section class="detail" id="validate_number_system/1">
|
<section class="detail" id="validate_number_system/1">
|
||||||
@ -1555,22 +1555,22 @@ of a language tag.</p><h2 id="validate_locale/1-examples" class="section-heading
|
|||||||
</a>
|
</a>
|
||||||
</h2>
|
</h2>
|
||||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </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> </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="5503221130-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="5503221130-1">}</span><span class="w">
|
</span><span class="p" data-group-id="4149081194-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="4149081194-1">}</span><span class="w">
|
||||||
|
|
||||||
</span><span class="gp unselectable">iex> </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> </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="5503221130-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="5503221130-2">}</span><span class="w">
|
</span><span class="p" data-group-id="4149081194-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="4149081194-2">}</span><span class="w">
|
||||||
|
|
||||||
</span><span class="gp unselectable">iex> </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> </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="5503221130-3">{</span><span class="w">
|
</span><span class="p" data-group-id="4149081194-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="5503221130-4">{</span><span class="nc">Cldr.UnknownNumberSystemTypeError</span><span class="p">,</span><span class="w"> </span><span class="s">"The number system type :latn is unknown"</span><span class="p" data-group-id="5503221130-4">}</span><span class="w">
|
</span><span class="p" data-group-id="4149081194-4">{</span><span class="nc">Cldr.UnknownNumberSystemTypeError</span><span class="p">,</span><span class="w"> </span><span class="s">"The number system type :latn is unknown"</span><span class="p" data-group-id="4149081194-4">}</span><span class="w">
|
||||||
</span><span class="p" data-group-id="5503221130-3">}</span><span class="w">
|
</span><span class="p" data-group-id="4149081194-3">}</span><span class="w">
|
||||||
|
|
||||||
</span><span class="gp unselectable">iex> </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">"bork"</span><span class="w">
|
</span><span class="gp unselectable">iex> </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">"bork"</span><span class="w">
|
||||||
</span><span class="p" data-group-id="5503221130-5">{</span><span class="w">
|
</span><span class="p" data-group-id="4149081194-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="5503221130-6">{</span><span class="nc">Cldr.UnknownNumberSystemTypeError</span><span class="p">,</span><span class="w"> </span><span class="s">"The number system type </span><span class="se">\"</span><span class="s">bork</span><span class="se">\"</span><span class="s"> is invalid"</span><span class="p" data-group-id="5503221130-6">}</span><span class="w">
|
</span><span class="p" data-group-id="4149081194-6">{</span><span class="nc">Cldr.UnknownNumberSystemTypeError</span><span class="p">,</span><span class="w"> </span><span class="s">"The number system type </span><span class="se">\"</span><span class="s">bork</span><span class="se">\"</span><span class="s"> is invalid"</span><span class="p" data-group-id="4149081194-6">}</span><span class="w">
|
||||||
</span><span class="p" data-group-id="5503221130-5">}</span></code></pre>
|
</span><span class="p" data-group-id="4149081194-5">}</span></code></pre>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
<section class="detail" id="validate_territory/1">
|
<section class="detail" id="validate_territory/1">
|
||||||
|
@ -816,23 +816,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="3787407739-1">(</span><span class="s">"create table ecto_ch_demo(a UInt64, b String) engine Null"</span><span class="p" data-group-id="3787407739-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="6892635207-1">(</span><span class="s">"create table ecto_ch_demo(a UInt64, b String) engine Null"</span><span class="p" data-group-id="6892635207-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="3787407739-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="6892635207-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">"ecto_ch_demo"</span><span class="w"> </span><span class="k" data-group-id="3787407739-3">do</span><span class="w">
|
</span><span class="n">schema</span><span class="w"> </span><span class="s">"ecto_ch_demo"</span><span class="w"> </span><span class="k" data-group-id="6892635207-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">"UInt64"</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">"UInt64"</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="3787407739-3">end</span><span class="w">
|
</span><span class="k" data-group-id="6892635207-3">end</span><span class="w">
|
||||||
</span><span class="k" data-group-id="3787407739-2">end</span><span class="w">
|
</span><span class="k" data-group-id="6892635207-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="3787407739-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="3787407739-5">fn</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="p" data-group-id="3787407739-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="3787407739-7">(</span><span class="n">i</span><span class="p" data-group-id="3787407739-7">)</span><span class="p" data-group-id="3787407739-6">}</span><span class="w"> </span><span class="k" data-group-id="3787407739-5">end</span><span class="p" data-group-id="3787407739-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="6892635207-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="6892635207-5">fn</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="p" data-group-id="6892635207-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="6892635207-7">(</span><span class="n">i</span><span class="p" data-group-id="6892635207-7">)</span><span class="p" data-group-id="6892635207-6">}</span><span class="w"> </span><span class="k" data-group-id="6892635207-5">end</span><span class="p" data-group-id="6892635207-4">)</span><span class="w">
|
||||||
</span><span class="p" data-group-id="3787407739-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="3787407739-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="3787407739-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="3787407739-9">)</span><span class="w">
|
</span><span class="p" data-group-id="6892635207-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="6892635207-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="6892635207-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="6892635207-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="3787407739-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="3787407739-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="3787407739-11">(</span><span class="s">"ecto_ch_demo"</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="3787407739-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="3787407739-13">(</span><span class="p" data-group-id="3787407739-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="3787407739-12">]</span><span class="p" data-group-id="3787407739-11">)</span></code></pre>
|
</span><span class="p" data-group-id="6892635207-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="6892635207-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="6892635207-11">(</span><span class="s">"ecto_ch_demo"</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="6892635207-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="6892635207-13">(</span><span class="p" data-group-id="6892635207-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="6892635207-12">]</span><span class="p" data-group-id="6892635207-11">)</span></code></pre>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
<section class="detail" id="load/2">
|
<section class="detail" id="load/2">
|
||||||
|
@ -1123,23 +1123,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="1651731728-1">(</span><span class="s">"create table ecto_ch_demo(a UInt64, b String) engine Null"</span><span class="p" data-group-id="1651731728-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="9159127321-1">(</span><span class="s">"create table ecto_ch_demo(a UInt64, b String) engine Null"</span><span class="p" data-group-id="9159127321-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="1651731728-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="9159127321-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">"ecto_ch_demo"</span><span class="w"> </span><span class="k" data-group-id="1651731728-3">do</span><span class="w">
|
</span><span class="n">schema</span><span class="w"> </span><span class="s">"ecto_ch_demo"</span><span class="w"> </span><span class="k" data-group-id="9159127321-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">"UInt64"</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">"UInt64"</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="1651731728-3">end</span><span class="w">
|
</span><span class="k" data-group-id="9159127321-3">end</span><span class="w">
|
||||||
</span><span class="k" data-group-id="1651731728-2">end</span><span class="w">
|
</span><span class="k" data-group-id="9159127321-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="1651731728-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="1651731728-5">fn</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="p" data-group-id="1651731728-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="1651731728-7">(</span><span class="n">i</span><span class="p" data-group-id="1651731728-7">)</span><span class="p" data-group-id="1651731728-6">}</span><span class="w"> </span><span class="k" data-group-id="1651731728-5">end</span><span class="p" data-group-id="1651731728-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="9159127321-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="9159127321-5">fn</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="p" data-group-id="9159127321-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="9159127321-7">(</span><span class="n">i</span><span class="p" data-group-id="9159127321-7">)</span><span class="p" data-group-id="9159127321-6">}</span><span class="w"> </span><span class="k" data-group-id="9159127321-5">end</span><span class="p" data-group-id="9159127321-4">)</span><span class="w">
|
||||||
</span><span class="p" data-group-id="1651731728-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="1651731728-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="1651731728-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="1651731728-9">)</span><span class="w">
|
</span><span class="p" data-group-id="9159127321-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="9159127321-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="9159127321-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="9159127321-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="1651731728-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="1651731728-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="1651731728-11">(</span><span class="s">"ecto_ch_demo"</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="1651731728-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="1651731728-13">(</span><span class="p" data-group-id="1651731728-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="1651731728-12">]</span><span class="p" data-group-id="1651731728-11">)</span></code></pre>
|
</span><span class="p" data-group-id="9159127321-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="9159127321-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="9159127321-11">(</span><span class="s">"ecto_ch_demo"</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="9159127321-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="9159127321-13">(</span><span class="p" data-group-id="9159127321-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="9159127321-12">]</span><span class="p" data-group-id="9159127321-11">)</span></code></pre>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
<section class="detail" id="load/2">
|
<section class="detail" id="load/2">
|
||||||
|
@ -231,8 +231,8 @@ Functions
|
|||||||
Examples
|
Examples
|
||||||
</a>
|
</a>
|
||||||
</h2>
|
</h2>
|
||||||
<p> In the case of a DB-IP database:</p><pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </span><span class="n">database_type</span><span class="p" data-group-id="3732440961-1">(</span><span class="p" data-group-id="3732440961-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> </span><span class="n">database_type</span><span class="p" data-group-id="6705662399-1">(</span><span class="p" data-group-id="6705662399-1">)</span><span class="w">
|
||||||
</span><span class="s">"DBIP-City-Lite"</span></code></pre><p> In the case of a MaxMind database:</p><pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </span><span class="n">database_type</span><span class="p" data-group-id="0954510488-1">(</span><span class="p" data-group-id="0954510488-1">)</span><span class="w">
|
</span><span class="s">"DBIP-City-Lite"</span></code></pre><p> In the case of a MaxMind database:</p><pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </span><span class="n">database_type</span><span class="p" data-group-id="3314004631-1">(</span><span class="p" data-group-id="3314004631-1">)</span><span class="w">
|
||||||
</span><span class="s">"GeoLite2-City"</span></code></pre>
|
</span><span class="s">"GeoLite2-City"</span></code></pre>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
@ -272,8 +272,8 @@ asynchronously.</p></li></ul><h2 id="load_db/1-examples" class="section-heading"
|
|||||||
Examples
|
Examples
|
||||||
</a>
|
</a>
|
||||||
</h2>
|
</h2>
|
||||||
<p> Loading from a local file:</p><pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </span><span class="n">load_db</span><span class="p" data-group-id="3509280894-1">(</span><span class="ss">path</span><span class="p">:</span><span class="w"> </span><span class="s">"/etc/plausible/dbip-city.mmdb"</span><span class="p" data-group-id="3509280894-1">)</span><span class="w">
|
<p> Loading from a local file:</p><pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </span><span class="n">load_db</span><span class="p" data-group-id="1470547499-1">(</span><span class="ss">path</span><span class="p">:</span><span class="w"> </span><span class="s">"/etc/plausible/dbip-city.mmdb"</span><span class="p" data-group-id="1470547499-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> </span><span class="n">load_db</span><span class="p" data-group-id="2267574025-1">(</span><span class="ss">license_key</span><span class="p">:</span><span class="w"> </span><span class="s">"LNpsJCCKPis6XvBP"</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">"GeoLite2-City"</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="2267574025-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> </span><span class="n">load_db</span><span class="p" data-group-id="6941248229-1">(</span><span class="ss">license_key</span><span class="p">:</span><span class="w"> </span><span class="s">"LNpsJCCKPis6XvBP"</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">"GeoLite2-City"</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="6941248229-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>
|
||||||
@ -302,21 +302,21 @@ asynchronously.</p></li></ul><h2 id="load_db/1-examples" class="section-heading"
|
|||||||
Examples
|
Examples
|
||||||
</a>
|
</a>
|
||||||
</h2>
|
</h2>
|
||||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </span><span class="n">lookup</span><span class="p" data-group-id="4600254598-1">(</span><span class="s">"8.7.6.5"</span><span class="p" data-group-id="4600254598-1">)</span><span class="w">
|
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </span><span class="n">lookup</span><span class="p" data-group-id="5935419287-1">(</span><span class="s">"8.7.6.5"</span><span class="p" data-group-id="5935419287-1">)</span><span class="w">
|
||||||
</span><span class="p" data-group-id="4600254598-2">%{</span><span class="w">
|
</span><span class="p" data-group-id="5935419287-2">%{</span><span class="w">
|
||||||
</span><span class="s">"city"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="p" data-group-id="4600254598-3">%{</span><span class="w">
|
</span><span class="s">"city"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="p" data-group-id="5935419287-3">%{</span><span class="w">
|
||||||
</span><span class="s">"geoname_id"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="mi">5349755</span><span class="p">,</span><span class="w">
|
</span><span class="s">"geoname_id"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="mi">5349755</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="s">"names"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="p" data-group-id="4600254598-4">%{</span><span class="w">
|
</span><span class="s">"names"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="p" data-group-id="5935419287-4">%{</span><span class="w">
|
||||||
</span><span class="s">"de"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="s">"Fontana"</span><span class="p">,</span><span class="w">
|
</span><span class="s">"de"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="s">"Fontana"</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="s">"en"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="s">"Fontana"</span><span class="p">,</span><span class="w">
|
</span><span class="s">"en"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="s">"Fontana"</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="s">"ja"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="s">"フォンタナ"</span><span class="p">,</span><span class="w">
|
</span><span class="s">"ja"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="s">"フォンタナ"</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="s">"ru"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="s">"Фонтана"</span><span class="w">
|
</span><span class="s">"ru"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="s">"Фонтана"</span><span class="w">
|
||||||
</span><span class="p" data-group-id="4600254598-4">}</span><span class="w">
|
</span><span class="p" data-group-id="5935419287-4">}</span><span class="w">
|
||||||
</span><span class="p" data-group-id="4600254598-3">}</span><span class="p">,</span><span class="w">
|
</span><span class="p" data-group-id="5935419287-3">}</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="s">"continent"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="p" data-group-id="4600254598-5">%{</span><span class="w">
|
</span><span class="s">"continent"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="p" data-group-id="5935419287-5">%{</span><span class="w">
|
||||||
</span><span class="s">"code"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="s">"NA"</span><span class="p">,</span><span class="w">
|
</span><span class="s">"code"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="s">"NA"</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="s">"geoname_id"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="mi">6255149</span><span class="p">,</span><span class="w">
|
</span><span class="s">"geoname_id"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="mi">6255149</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="s">"names"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="p" data-group-id="4600254598-6">%{</span><span class="w">
|
</span><span class="s">"names"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="p" data-group-id="5935419287-6">%{</span><span class="w">
|
||||||
</span><span class="s">"de"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="s">"Nordamerika"</span><span class="p">,</span><span class="w">
|
</span><span class="s">"de"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="s">"Nordamerika"</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="s">"en"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="s">"North America"</span><span class="p">,</span><span class="w">
|
</span><span class="s">"en"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="s">"North America"</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="s">"es"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="s">"Norteamérica"</span><span class="p">,</span><span class="w">
|
</span><span class="s">"es"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="s">"Norteamérica"</span><span class="p">,</span><span class="w">
|
||||||
@ -325,12 +325,12 @@ asynchronously.</p></li></ul><h2 id="load_db/1-examples" class="section-heading"
|
|||||||
</span><span class="s">"pt-BR"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="s">"América do Norte"</span><span class="p">,</span><span class="w">
|
</span><span class="s">"pt-BR"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="s">"América do Norte"</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="s">"ru"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="s">"Северная Америка"</span><span class="p">,</span><span class="w">
|
</span><span class="s">"ru"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="s">"Северная Америка"</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="s">"zh-CN"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="s">"北美洲"</span><span class="w">
|
</span><span class="s">"zh-CN"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="s">"北美洲"</span><span class="w">
|
||||||
</span><span class="p" data-group-id="4600254598-6">}</span><span class="w">
|
</span><span class="p" data-group-id="5935419287-6">}</span><span class="w">
|
||||||
</span><span class="p" data-group-id="4600254598-5">}</span><span class="p">,</span><span class="w">
|
</span><span class="p" data-group-id="5935419287-5">}</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="s">"country"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="p" data-group-id="4600254598-7">%{</span><span class="w">
|
</span><span class="s">"country"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="p" data-group-id="5935419287-7">%{</span><span class="w">
|
||||||
</span><span class="s">"geoname_id"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="mi">6252001</span><span class="p">,</span><span class="w">
|
</span><span class="s">"geoname_id"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="mi">6252001</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="s">"iso_code"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="s">"US"</span><span class="p">,</span><span class="w">
|
</span><span class="s">"iso_code"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="s">"US"</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="s">"names"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="p" data-group-id="4600254598-8">%{</span><span class="w">
|
</span><span class="s">"names"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="p" data-group-id="5935419287-8">%{</span><span class="w">
|
||||||
</span><span class="s">"de"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="s">"Vereinigte Staaten"</span><span class="p">,</span><span class="w">
|
</span><span class="s">"de"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="s">"Vereinigte Staaten"</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="s">"en"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="s">"United States"</span><span class="p">,</span><span class="w">
|
</span><span class="s">"en"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="s">"United States"</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="s">"es"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="s">"Estados Unidos"</span><span class="p">,</span><span class="w">
|
</span><span class="s">"es"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="s">"Estados Unidos"</span><span class="p">,</span><span class="w">
|
||||||
@ -339,20 +339,20 @@ asynchronously.</p></li></ul><h2 id="load_db/1-examples" class="section-heading"
|
|||||||
</span><span class="s">"pt-BR"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="s">"EUA"</span><span class="p">,</span><span class="w">
|
</span><span class="s">"pt-BR"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="s">"EUA"</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="s">"ru"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="s">"США"</span><span class="p">,</span><span class="w">
|
</span><span class="s">"ru"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="s">"США"</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="s">"zh-CN"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="s">"美国"</span><span class="w">
|
</span><span class="s">"zh-CN"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="s">"美国"</span><span class="w">
|
||||||
</span><span class="p" data-group-id="4600254598-8">}</span><span class="w">
|
</span><span class="p" data-group-id="5935419287-8">}</span><span class="w">
|
||||||
</span><span class="p" data-group-id="4600254598-7">}</span><span class="p">,</span><span class="w">
|
</span><span class="p" data-group-id="5935419287-7">}</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="s">"location"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="p" data-group-id="4600254598-9">%{</span><span class="w">
|
</span><span class="s">"location"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="p" data-group-id="5935419287-9">%{</span><span class="w">
|
||||||
</span><span class="s">"accuracy_radius"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="mi">50</span><span class="p">,</span><span class="w">
|
</span><span class="s">"accuracy_radius"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="mi">50</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="s">"latitude"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="mf">34.1211</span><span class="p">,</span><span class="w">
|
</span><span class="s">"latitude"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="mf">34.1211</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="s">"longitude"</span><span class="w"> </span><span class="p">=></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">"longitude"</span><span class="w"> </span><span class="p">=></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">"metro_code"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="mi">803</span><span class="p">,</span><span class="w">
|
</span><span class="s">"metro_code"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="mi">803</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="s">"time_zone"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="s">"America/Los_Angeles"</span><span class="w">
|
</span><span class="s">"time_zone"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="s">"America/Los_Angeles"</span><span class="w">
|
||||||
</span><span class="p" data-group-id="4600254598-9">}</span><span class="p">,</span><span class="w">
|
</span><span class="p" data-group-id="5935419287-9">}</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="s">"postal"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="p" data-group-id="4600254598-10">%{</span><span class="s">"code"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="s">"92336"</span><span class="p" data-group-id="4600254598-10">}</span><span class="p">,</span><span class="w">
|
</span><span class="s">"postal"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="p" data-group-id="5935419287-10">%{</span><span class="s">"code"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="s">"92336"</span><span class="p" data-group-id="5935419287-10">}</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="s">"registered_country"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="p" data-group-id="4600254598-11">%{</span><span class="w">
|
</span><span class="s">"registered_country"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="p" data-group-id="5935419287-11">%{</span><span class="w">
|
||||||
</span><span class="s">"geoname_id"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="mi">6252001</span><span class="p">,</span><span class="w">
|
</span><span class="s">"geoname_id"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="mi">6252001</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="s">"iso_code"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="s">"US"</span><span class="p">,</span><span class="w">
|
</span><span class="s">"iso_code"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="s">"US"</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="s">"names"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="p" data-group-id="4600254598-12">%{</span><span class="w">
|
</span><span class="s">"names"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="p" data-group-id="5935419287-12">%{</span><span class="w">
|
||||||
</span><span class="s">"de"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="s">"Vereinigte Staaten"</span><span class="p">,</span><span class="w">
|
</span><span class="s">"de"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="s">"Vereinigte Staaten"</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="s">"en"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="s">"United States"</span><span class="p">,</span><span class="w">
|
</span><span class="s">"en"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="s">"United States"</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="s">"es"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="s">"Estados Unidos"</span><span class="p">,</span><span class="w">
|
</span><span class="s">"es"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="s">"Estados Unidos"</span><span class="p">,</span><span class="w">
|
||||||
@ -361,13 +361,13 @@ asynchronously.</p></li></ul><h2 id="load_db/1-examples" class="section-heading"
|
|||||||
</span><span class="s">"pt-BR"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="s">"EUA"</span><span class="p">,</span><span class="w">
|
</span><span class="s">"pt-BR"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="s">"EUA"</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="s">"ru"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="s">"США"</span><span class="p">,</span><span class="w">
|
</span><span class="s">"ru"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="s">"США"</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="s">"zh-CN"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="s">"美国"</span><span class="w">
|
</span><span class="s">"zh-CN"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="s">"美国"</span><span class="w">
|
||||||
</span><span class="p" data-group-id="4600254598-12">}</span><span class="w">
|
</span><span class="p" data-group-id="5935419287-12">}</span><span class="w">
|
||||||
</span><span class="p" data-group-id="4600254598-11">}</span><span class="p">,</span><span class="w">
|
</span><span class="p" data-group-id="5935419287-11">}</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="s">"subdivisions"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="p" data-group-id="4600254598-13">[</span><span class="w">
|
</span><span class="s">"subdivisions"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="p" data-group-id="5935419287-13">[</span><span class="w">
|
||||||
</span><span class="p" data-group-id="4600254598-14">%{</span><span class="w">
|
</span><span class="p" data-group-id="5935419287-14">%{</span><span class="w">
|
||||||
</span><span class="s">"geoname_id"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="mi">5332921</span><span class="p">,</span><span class="w">
|
</span><span class="s">"geoname_id"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="mi">5332921</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="s">"iso_code"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="s">"CA"</span><span class="p">,</span><span class="w">
|
</span><span class="s">"iso_code"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="s">"CA"</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="s">"names"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="p" data-group-id="4600254598-15">%{</span><span class="w">
|
</span><span class="s">"names"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="p" data-group-id="5935419287-15">%{</span><span class="w">
|
||||||
</span><span class="s">"de"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="s">"Kalifornien"</span><span class="p">,</span><span class="w">
|
</span><span class="s">"de"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="s">"Kalifornien"</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="s">"en"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="s">"California"</span><span class="p">,</span><span class="w">
|
</span><span class="s">"en"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="s">"California"</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="s">"es"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="s">"California"</span><span class="p">,</span><span class="w">
|
</span><span class="s">"es"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="s">"California"</span><span class="p">,</span><span class="w">
|
||||||
@ -376,10 +376,10 @@ asynchronously.</p></li></ul><h2 id="load_db/1-examples" class="section-heading"
|
|||||||
</span><span class="s">"pt-BR"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="s">"Califórnia"</span><span class="p">,</span><span class="w">
|
</span><span class="s">"pt-BR"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="s">"Califórnia"</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="s">"ru"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="s">"Калифорния"</span><span class="p">,</span><span class="w">
|
</span><span class="s">"ru"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="s">"Калифорния"</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="s">"zh-CN"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="s">"加州"</span><span class="w">
|
</span><span class="s">"zh-CN"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="s">"加州"</span><span class="w">
|
||||||
</span><span class="p" data-group-id="4600254598-15">}</span><span class="w">
|
</span><span class="p" data-group-id="5935419287-15">}</span><span class="w">
|
||||||
</span><span class="p" data-group-id="4600254598-14">}</span><span class="w">
|
</span><span class="p" data-group-id="5935419287-14">}</span><span class="w">
|
||||||
</span><span class="p" data-group-id="4600254598-13">]</span><span class="w">
|
</span><span class="p" data-group-id="5935419287-13">]</span><span class="w">
|
||||||
</span><span class="p" data-group-id="4600254598-2">}</span></code></pre>
|
</span><span class="p" data-group-id="5935419287-2">}</span></code></pre>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
@ -1114,23 +1114,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="4644052490-1">(</span><span class="s">"create table ecto_ch_demo(a UInt64, b String) engine Null"</span><span class="p" data-group-id="4644052490-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="6331926933-1">(</span><span class="s">"create table ecto_ch_demo(a UInt64, b String) engine Null"</span><span class="p" data-group-id="6331926933-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="4644052490-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="6331926933-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">"ecto_ch_demo"</span><span class="w"> </span><span class="k" data-group-id="4644052490-3">do</span><span class="w">
|
</span><span class="n">schema</span><span class="w"> </span><span class="s">"ecto_ch_demo"</span><span class="w"> </span><span class="k" data-group-id="6331926933-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">"UInt64"</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">"UInt64"</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="4644052490-3">end</span><span class="w">
|
</span><span class="k" data-group-id="6331926933-3">end</span><span class="w">
|
||||||
</span><span class="k" data-group-id="4644052490-2">end</span><span class="w">
|
</span><span class="k" data-group-id="6331926933-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="4644052490-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="4644052490-5">fn</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="p" data-group-id="4644052490-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="4644052490-7">(</span><span class="n">i</span><span class="p" data-group-id="4644052490-7">)</span><span class="p" data-group-id="4644052490-6">}</span><span class="w"> </span><span class="k" data-group-id="4644052490-5">end</span><span class="p" data-group-id="4644052490-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="6331926933-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="6331926933-5">fn</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="p" data-group-id="6331926933-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="6331926933-7">(</span><span class="n">i</span><span class="p" data-group-id="6331926933-7">)</span><span class="p" data-group-id="6331926933-6">}</span><span class="w"> </span><span class="k" data-group-id="6331926933-5">end</span><span class="p" data-group-id="6331926933-4">)</span><span class="w">
|
||||||
</span><span class="p" data-group-id="4644052490-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="4644052490-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="4644052490-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="4644052490-9">)</span><span class="w">
|
</span><span class="p" data-group-id="6331926933-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="6331926933-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="6331926933-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="6331926933-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="4644052490-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="4644052490-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="4644052490-11">(</span><span class="s">"ecto_ch_demo"</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="4644052490-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="4644052490-13">(</span><span class="p" data-group-id="4644052490-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="4644052490-12">]</span><span class="p" data-group-id="4644052490-11">)</span></code></pre>
|
</span><span class="p" data-group-id="6331926933-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="6331926933-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="6331926933-11">(</span><span class="s">"ecto_ch_demo"</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="6331926933-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="6331926933-13">(</span><span class="p" data-group-id="6331926933-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="6331926933-12">]</span><span class="p" data-group-id="6331926933-11">)</span></code></pre>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
<section class="detail" id="load/2">
|
<section class="detail" id="load/2">
|
||||||
|
@ -1114,23 +1114,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="4868049211-1">(</span><span class="s">"create table ecto_ch_demo(a UInt64, b String) engine Null"</span><span class="p" data-group-id="4868049211-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="8210419448-1">(</span><span class="s">"create table ecto_ch_demo(a UInt64, b String) engine Null"</span><span class="p" data-group-id="8210419448-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="4868049211-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="8210419448-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">"ecto_ch_demo"</span><span class="w"> </span><span class="k" data-group-id="4868049211-3">do</span><span class="w">
|
</span><span class="n">schema</span><span class="w"> </span><span class="s">"ecto_ch_demo"</span><span class="w"> </span><span class="k" data-group-id="8210419448-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">"UInt64"</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">"UInt64"</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="4868049211-3">end</span><span class="w">
|
</span><span class="k" data-group-id="8210419448-3">end</span><span class="w">
|
||||||
</span><span class="k" data-group-id="4868049211-2">end</span><span class="w">
|
</span><span class="k" data-group-id="8210419448-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="4868049211-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="4868049211-5">fn</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="p" data-group-id="4868049211-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="4868049211-7">(</span><span class="n">i</span><span class="p" data-group-id="4868049211-7">)</span><span class="p" data-group-id="4868049211-6">}</span><span class="w"> </span><span class="k" data-group-id="4868049211-5">end</span><span class="p" data-group-id="4868049211-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="8210419448-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="8210419448-5">fn</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="p" data-group-id="8210419448-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="8210419448-7">(</span><span class="n">i</span><span class="p" data-group-id="8210419448-7">)</span><span class="p" data-group-id="8210419448-6">}</span><span class="w"> </span><span class="k" data-group-id="8210419448-5">end</span><span class="p" data-group-id="8210419448-4">)</span><span class="w">
|
||||||
</span><span class="p" data-group-id="4868049211-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="4868049211-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="4868049211-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="4868049211-9">)</span><span class="w">
|
</span><span class="p" data-group-id="8210419448-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="8210419448-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="8210419448-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="8210419448-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="4868049211-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="4868049211-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="4868049211-11">(</span><span class="s">"ecto_ch_demo"</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="4868049211-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="4868049211-13">(</span><span class="p" data-group-id="4868049211-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="4868049211-12">]</span><span class="p" data-group-id="4868049211-11">)</span></code></pre>
|
</span><span class="p" data-group-id="8210419448-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="8210419448-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="8210419448-11">(</span><span class="s">"ecto_ch_demo"</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="8210419448-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="8210419448-13">(</span><span class="p" data-group-id="8210419448-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="8210419448-12">]</span><span class="p" data-group-id="8210419448-11">)</span></code></pre>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
<section class="detail" id="load/2">
|
<section class="detail" id="load/2">
|
||||||
|
@ -388,7 +388,7 @@ Functions
|
|||||||
</a>
|
</a>
|
||||||
<h1 class="signature" translate="no">crm_changeset(site, attrs)</h1>
|
<h1 class="signature" translate="no">crm_changeset(site, attrs)</h1>
|
||||||
|
|
||||||
<a href="https://github.com/plausible/analytics/blob/main/lib/plausible/site.ex#L97" class="icon-action" rel="help" title="View Source">
|
<a href="https://github.com/plausible/analytics/blob/main/lib/plausible/site.ex#L98" class="icon-action" rel="help" title="View Source">
|
||||||
<i class="ri-code-s-slash-line" aria-hidden="true"></i>
|
<i class="ri-code-s-slash-line" aria-hidden="true"></i>
|
||||||
<span class="sr-only">View Source</span>
|
<span class="sr-only">View Source</span>
|
||||||
</a>
|
</a>
|
||||||
@ -410,7 +410,7 @@ Functions
|
|||||||
</a>
|
</a>
|
||||||
<h1 class="signature" translate="no">import_failure(site)</h1>
|
<h1 class="signature" translate="no">import_failure(site)</h1>
|
||||||
|
|
||||||
<a href="https://github.com/plausible/analytics/blob/main/lib/plausible/site.ex#L165" class="icon-action" rel="help" title="View Source">
|
<a href="https://github.com/plausible/analytics/blob/main/lib/plausible/site.ex#L166" class="icon-action" rel="help" title="View Source">
|
||||||
<i class="ri-code-s-slash-line" aria-hidden="true"></i>
|
<i class="ri-code-s-slash-line" aria-hidden="true"></i>
|
||||||
<span class="sr-only">View Source</span>
|
<span class="sr-only">View Source</span>
|
||||||
</a>
|
</a>
|
||||||
@ -432,7 +432,7 @@ Functions
|
|||||||
</a>
|
</a>
|
||||||
<h1 class="signature" translate="no">import_success(site)</h1>
|
<h1 class="signature" translate="no">import_success(site)</h1>
|
||||||
|
|
||||||
<a href="https://github.com/plausible/analytics/blob/main/lib/plausible/site.ex#L158" class="icon-action" rel="help" title="View Source">
|
<a href="https://github.com/plausible/analytics/blob/main/lib/plausible/site.ex#L159" class="icon-action" rel="help" title="View Source">
|
||||||
<i class="ri-code-s-slash-line" aria-hidden="true"></i>
|
<i class="ri-code-s-slash-line" aria-hidden="true"></i>
|
||||||
<span class="sr-only">View Source</span>
|
<span class="sr-only">View Source</span>
|
||||||
</a>
|
</a>
|
||||||
@ -454,7 +454,7 @@ Functions
|
|||||||
</a>
|
</a>
|
||||||
<h1 class="signature" translate="no">local_start_date(site)</h1>
|
<h1 class="signature" translate="no">local_start_date(site)</h1>
|
||||||
|
|
||||||
<a href="https://github.com/plausible/analytics/blob/main/lib/plausible/site.ex#L204" class="icon-action" rel="help" title="View Source">
|
<a href="https://github.com/plausible/analytics/blob/main/lib/plausible/site.ex#L205" class="icon-action" rel="help" title="View Source">
|
||||||
<i class="ri-code-s-slash-line" aria-hidden="true"></i>
|
<i class="ri-code-s-slash-line" aria-hidden="true"></i>
|
||||||
<span class="sr-only">View Source</span>
|
<span class="sr-only">View Source</span>
|
||||||
</a>
|
</a>
|
||||||
@ -493,7 +493,7 @@ This function does 2 transformations:
|
|||||||
</a>
|
</a>
|
||||||
<h1 class="signature" translate="no">make_private(site)</h1>
|
<h1 class="signature" translate="no">make_private(site)</h1>
|
||||||
|
|
||||||
<a href="https://github.com/plausible/analytics/blob/main/lib/plausible/site.ex#L135" class="icon-action" rel="help" title="View Source">
|
<a href="https://github.com/plausible/analytics/blob/main/lib/plausible/site.ex#L136" class="icon-action" rel="help" title="View Source">
|
||||||
<i class="ri-code-s-slash-line" aria-hidden="true"></i>
|
<i class="ri-code-s-slash-line" aria-hidden="true"></i>
|
||||||
<span class="sr-only">View Source</span>
|
<span class="sr-only">View Source</span>
|
||||||
</a>
|
</a>
|
||||||
@ -515,7 +515,7 @@ This function does 2 transformations:
|
|||||||
</a>
|
</a>
|
||||||
<h1 class="signature" translate="no">make_public(site)</h1>
|
<h1 class="signature" translate="no">make_public(site)</h1>
|
||||||
|
|
||||||
<a href="https://github.com/plausible/analytics/blob/main/lib/plausible/site.ex#L131" class="icon-action" rel="help" title="View Source">
|
<a href="https://github.com/plausible/analytics/blob/main/lib/plausible/site.ex#L132" class="icon-action" rel="help" title="View Source">
|
||||||
<i class="ri-code-s-slash-line" aria-hidden="true"></i>
|
<i class="ri-code-s-slash-line" aria-hidden="true"></i>
|
||||||
<span class="sr-only">View Source</span>
|
<span class="sr-only">View Source</span>
|
||||||
</a>
|
</a>
|
||||||
@ -559,7 +559,7 @@ This function does 2 transformations:
|
|||||||
</a>
|
</a>
|
||||||
<h1 class="signature" translate="no">remove_imported_data(site)</h1>
|
<h1 class="signature" translate="no">remove_imported_data(site)</h1>
|
||||||
|
|
||||||
<a href="https://github.com/plausible/analytics/blob/main/lib/plausible/site.ex#L178" class="icon-action" rel="help" title="View Source">
|
<a href="https://github.com/plausible/analytics/blob/main/lib/plausible/site.ex#L179" class="icon-action" rel="help" title="View Source">
|
||||||
<i class="ri-code-s-slash-line" aria-hidden="true"></i>
|
<i class="ri-code-s-slash-line" aria-hidden="true"></i>
|
||||||
<span class="sr-only">View Source</span>
|
<span class="sr-only">View Source</span>
|
||||||
</a>
|
</a>
|
||||||
@ -581,7 +581,7 @@ This function does 2 transformations:
|
|||||||
</a>
|
</a>
|
||||||
<h1 class="signature" translate="no">set_imported_source(site, imported_source)</h1>
|
<h1 class="signature" translate="no">set_imported_source(site, imported_source)</h1>
|
||||||
|
|
||||||
<a href="https://github.com/plausible/analytics/blob/main/lib/plausible/site.ex#L169" class="icon-action" rel="help" title="View Source">
|
<a href="https://github.com/plausible/analytics/blob/main/lib/plausible/site.ex#L170" class="icon-action" rel="help" title="View Source">
|
||||||
<i class="ri-code-s-slash-line" aria-hidden="true"></i>
|
<i class="ri-code-s-slash-line" aria-hidden="true"></i>
|
||||||
<span class="sr-only">View Source</span>
|
<span class="sr-only">View Source</span>
|
||||||
</a>
|
</a>
|
||||||
@ -603,7 +603,7 @@ This function does 2 transformations:
|
|||||||
</a>
|
</a>
|
||||||
<h1 class="signature" translate="no">set_native_stats_start_at(site, val)</h1>
|
<h1 class="signature" translate="no">set_native_stats_start_at(site, val)</h1>
|
||||||
|
|
||||||
<a href="https://github.com/plausible/analytics/blob/main/lib/plausible/site.ex#L143" class="icon-action" rel="help" title="View Source">
|
<a href="https://github.com/plausible/analytics/blob/main/lib/plausible/site.ex#L144" class="icon-action" rel="help" title="View Source">
|
||||||
<i class="ri-code-s-slash-line" aria-hidden="true"></i>
|
<i class="ri-code-s-slash-line" aria-hidden="true"></i>
|
||||||
<span class="sr-only">View Source</span>
|
<span class="sr-only">View Source</span>
|
||||||
</a>
|
</a>
|
||||||
@ -625,7 +625,7 @@ This function does 2 transformations:
|
|||||||
</a>
|
</a>
|
||||||
<h1 class="signature" translate="no">set_stats_start_date(site, val)</h1>
|
<h1 class="signature" translate="no">set_stats_start_date(site, val)</h1>
|
||||||
|
|
||||||
<a href="https://github.com/plausible/analytics/blob/main/lib/plausible/site.ex#L139" class="icon-action" rel="help" title="View Source">
|
<a href="https://github.com/plausible/analytics/blob/main/lib/plausible/site.ex#L140" class="icon-action" rel="help" title="View Source">
|
||||||
<i class="ri-code-s-slash-line" aria-hidden="true"></i>
|
<i class="ri-code-s-slash-line" aria-hidden="true"></i>
|
||||||
<span class="sr-only">View Source</span>
|
<span class="sr-only">View Source</span>
|
||||||
</a>
|
</a>
|
||||||
@ -649,7 +649,7 @@ This function does 2 transformations:
|
|||||||
</a>
|
</a>
|
||||||
<h1 class="signature" translate="no">start_import(site, start_date, end_date, imported_source, status \\ "importing")</h1>
|
<h1 class="signature" translate="no">start_import(site, start_date, end_date, imported_source, status \\ "importing")</h1>
|
||||||
|
|
||||||
<a href="https://github.com/plausible/analytics/blob/main/lib/plausible/site.ex#L147" class="icon-action" rel="help" title="View Source">
|
<a href="https://github.com/plausible/analytics/blob/main/lib/plausible/site.ex#L148" class="icon-action" rel="help" title="View Source">
|
||||||
<i class="ri-code-s-slash-line" aria-hidden="true"></i>
|
<i class="ri-code-s-slash-line" aria-hidden="true"></i>
|
||||||
<span class="sr-only">View Source</span>
|
<span class="sr-only">View Source</span>
|
||||||
</a>
|
</a>
|
||||||
@ -673,7 +673,7 @@ This function does 2 transformations:
|
|||||||
</a>
|
</a>
|
||||||
<h1 class="signature" translate="no">tz_offset(site, utc_now \\ DateTime.utc_now())</h1>
|
<h1 class="signature" translate="no">tz_offset(site, utc_now \\ DateTime.utc_now())</h1>
|
||||||
|
|
||||||
<a href="https://github.com/plausible/analytics/blob/main/lib/plausible/site.ex#L117" class="icon-action" rel="help" title="View Source">
|
<a href="https://github.com/plausible/analytics/blob/main/lib/plausible/site.ex#L118" class="icon-action" rel="help" title="View Source">
|
||||||
<i class="ri-code-s-slash-line" aria-hidden="true"></i>
|
<i class="ri-code-s-slash-line" aria-hidden="true"></i>
|
||||||
<span class="sr-only">View Source</span>
|
<span class="sr-only">View Source</span>
|
||||||
</a>
|
</a>
|
||||||
@ -699,7 +699,7 @@ This function does 2 transformations:
|
|||||||
</a>
|
</a>
|
||||||
<h1 class="signature" translate="no">update_changeset(site, attrs \\ %{}, opts \\ [])</h1>
|
<h1 class="signature" translate="no">update_changeset(site, attrs \\ %{}, opts \\ [])</h1>
|
||||||
|
|
||||||
<a href="https://github.com/plausible/analytics/blob/main/lib/plausible/site.ex#L86" class="icon-action" rel="help" title="View Source">
|
<a href="https://github.com/plausible/analytics/blob/main/lib/plausible/site.ex#L87" class="icon-action" rel="help" title="View Source">
|
||||||
<i class="ri-code-s-slash-line" aria-hidden="true"></i>
|
<i class="ri-code-s-slash-line" aria-hidden="true"></i>
|
||||||
<span class="sr-only">View Source</span>
|
<span class="sr-only">View Source</span>
|
||||||
</a>
|
</a>
|
||||||
|
@ -178,14 +178,14 @@ Functions
|
|||||||
Examples:
|
Examples:
|
||||||
</a>
|
</a>
|
||||||
</h3>
|
</h3>
|
||||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </span><span class="nc">FilterParser</span><span class="o">.</span><span class="n">parse_filters</span><span class="p" data-group-id="2971046976-1">(</span><span class="s">"{</span><span class="se">\"</span><span class="s">page</span><span class="se">\"</span><span class="s">:</span><span class="se">\"</span><span class="s">/blog/**</span><span class="se">\"</span><span class="s">}"</span><span class="p" data-group-id="2971046976-1">)</span><span class="w">
|
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </span><span class="nc">FilterParser</span><span class="o">.</span><span class="n">parse_filters</span><span class="p" data-group-id="6314782557-1">(</span><span class="s">"{</span><span class="se">\"</span><span class="s">page</span><span class="se">\"</span><span class="s">:</span><span class="se">\"</span><span class="s">/blog/**</span><span class="se">\"</span><span class="s">}"</span><span class="p" data-group-id="6314782557-1">)</span><span class="w">
|
||||||
</span><span class="p" data-group-id="2971046976-2">%{</span><span class="s">"page"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="s">"/blog/**"</span><span class="p" data-group-id="2971046976-2">}</span><span class="w">
|
</span><span class="p" data-group-id="6314782557-2">%{</span><span class="s">"page"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="s">"/blog/**"</span><span class="p" data-group-id="6314782557-2">}</span><span class="w">
|
||||||
|
|
||||||
</span><span class="gp unselectable">iex> </span><span class="nc">FilterParser</span><span class="o">.</span><span class="n">parse_filters</span><span class="p" data-group-id="2971046976-3">(</span><span class="s">"visit:browser!=Chrome"</span><span class="p" data-group-id="2971046976-3">)</span><span class="w">
|
</span><span class="gp unselectable">iex> </span><span class="nc">FilterParser</span><span class="o">.</span><span class="n">parse_filters</span><span class="p" data-group-id="6314782557-3">(</span><span class="s">"visit:browser!=Chrome"</span><span class="p" data-group-id="6314782557-3">)</span><span class="w">
|
||||||
</span><span class="p" data-group-id="2971046976-4">%{</span><span class="s">"visit:browser"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="p" data-group-id="2971046976-5">{</span><span class="ss">:is_not</span><span class="p">,</span><span class="w"> </span><span class="s">"Chrome"</span><span class="p" data-group-id="2971046976-5">}</span><span class="p" data-group-id="2971046976-4">}</span><span class="w">
|
</span><span class="p" data-group-id="6314782557-4">%{</span><span class="s">"visit:browser"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="p" data-group-id="6314782557-5">{</span><span class="ss">:is_not</span><span class="p">,</span><span class="w"> </span><span class="s">"Chrome"</span><span class="p" data-group-id="6314782557-5">}</span><span class="p" data-group-id="6314782557-4">}</span><span class="w">
|
||||||
|
|
||||||
</span><span class="gp unselectable">iex> </span><span class="nc">FilterParser</span><span class="o">.</span><span class="n">parse_filters</span><span class="p" data-group-id="2971046976-6">(</span><span class="no">nil</span><span class="p" data-group-id="2971046976-6">)</span><span class="w">
|
</span><span class="gp unselectable">iex> </span><span class="nc">FilterParser</span><span class="o">.</span><span class="n">parse_filters</span><span class="p" data-group-id="6314782557-6">(</span><span class="no">nil</span><span class="p" data-group-id="6314782557-6">)</span><span class="w">
|
||||||
</span><span class="p" data-group-id="2971046976-7">%{</span><span class="p" data-group-id="2971046976-7">}</span></code></pre>
|
</span><span class="p" data-group-id="6314782557-7">%{</span><span class="p" data-group-id="6314782557-7">}</span></code></pre>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
BIN
Plausible.epub
BIN
Plausible.epub
Binary file not shown.
@ -718,13 +718,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">"Filtering"</a> section for
|
<a href="https://plausible.io/docs/stats-api#filtering">"Filtering"</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="8337950655-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="1013526848-1">%{</span><span class="w">
|
||||||
</span><span class="s">"from"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="s">"2021-09-06"</span><span class="p">,</span><span class="w">
|
</span><span class="s">"from"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="s">"2021-09-06"</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="s">"interval"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="s">"month"</span><span class="p">,</span><span class="w">
|
</span><span class="s">"interval"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="s">"month"</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="s">"metric"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="s">"visitors"</span><span class="p">,</span><span class="w">
|
</span><span class="s">"metric"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="s">"visitors"</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="s">"period"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="s">"custom"</span><span class="p">,</span><span class="w">
|
</span><span class="s">"period"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="s">"custom"</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="s">"to"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="s">"2021-12-13"</span><span class="w">
|
</span><span class="s">"to"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="s">"2021-12-13"</span><span class="w">
|
||||||
</span><span class="p" data-group-id="8337950655-1">}</span></code></pre><h2 id="main_graph/2-response" class="section-heading">
|
</span><span class="p" data-group-id="1013526848-1">}</span></code></pre><h2 id="main_graph/2-response" class="section-heading">
|
||||||
<a href="#main_graph/2-response">
|
<a href="#main_graph/2-response">
|
||||||
<i class="ri-link-m" aria-hidden="true"></i>
|
<i class="ri-link-m" aria-hidden="true"></i>
|
||||||
Response
|
Response
|
||||||
@ -739,20 +739,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="4848725727-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="5913092026-1">%{</span><span class="w">
|
||||||
</span><span class="s">"full_intervals"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="p" data-group-id="4848725727-2">%{</span><span class="w">
|
</span><span class="s">"full_intervals"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="p" data-group-id="5913092026-2">%{</span><span class="w">
|
||||||
</span><span class="s">"2021-09-01"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="no">false</span><span class="p">,</span><span class="w">
|
</span><span class="s">"2021-09-01"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="no">false</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="s">"2021-10-01"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="no">true</span><span class="p">,</span><span class="w">
|
</span><span class="s">"2021-10-01"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="no">true</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="s">"2021-11-01"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="no">true</span><span class="p">,</span><span class="w">
|
</span><span class="s">"2021-11-01"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="no">true</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="s">"2021-12-01"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="no">false</span><span class="w">
|
</span><span class="s">"2021-12-01"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="no">false</span><span class="w">
|
||||||
</span><span class="p" data-group-id="4848725727-2">}</span><span class="p">,</span><span class="w">
|
</span><span class="p" data-group-id="5913092026-2">}</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="s">"imported_source"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="no">nil</span><span class="p">,</span><span class="w">
|
</span><span class="s">"imported_source"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="no">nil</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="s">"interval"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="s">"month"</span><span class="p">,</span><span class="w">
|
</span><span class="s">"interval"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="s">"month"</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="s">"labels"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="p" data-group-id="4848725727-3">[</span><span class="s">"2021-09-01"</span><span class="p">,</span><span class="w"> </span><span class="s">"2021-10-01"</span><span class="p">,</span><span class="w"> </span><span class="s">"2021-11-01"</span><span class="p">,</span><span class="w"> </span><span class="s">"2021-12-01"</span><span class="p" data-group-id="4848725727-3">]</span><span class="p">,</span><span class="w">
|
</span><span class="s">"labels"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="p" data-group-id="5913092026-3">[</span><span class="s">"2021-09-01"</span><span class="p">,</span><span class="w"> </span><span class="s">"2021-10-01"</span><span class="p">,</span><span class="w"> </span><span class="s">"2021-11-01"</span><span class="p">,</span><span class="w"> </span><span class="s">"2021-12-01"</span><span class="p" data-group-id="5913092026-3">]</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="s">"plot"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="p" data-group-id="4848725727-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="4848725727-4">]</span><span class="p">,</span><span class="w">
|
</span><span class="s">"plot"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="p" data-group-id="5913092026-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="5913092026-4">]</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="s">"present_index"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="no">nil</span><span class="p">,</span><span class="w">
|
</span><span class="s">"present_index"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="no">nil</span><span class="p">,</span><span class="w">
|
||||||
</span><span class="s">"with_imported"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="no">false</span><span class="w">
|
</span><span class="s">"with_imported"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="no">false</span><span class="w">
|
||||||
</span><span class="p" data-group-id="4848725727-1">}</span></code></pre>
|
</span><span class="p" data-group-id="5913092026-1">}</span></code></pre>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
<section class="detail" id="operating_system_versions/2">
|
<section class="detail" id="operating_system_versions/2">
|
||||||
|
Loading…
Reference in New Issue
Block a user