mirror of
https://github.com/plausible/analytics.git
synced 2024-11-23 11:12:15 +03:00
deploy: 49bb57f601
This commit is contained in:
parent
38350b9f68
commit
a6b4c8de76
2
.build
2
.build
@ -423,7 +423,7 @@ dist/merriweather-vietnamese-300-italic-EHHNZPUO.woff2
|
||||
dist/merriweather-vietnamese-300-normal-U376L4Z4.woff2
|
||||
dist/remixicon-NKANDIL5.woff2
|
||||
dist/search_data-CB6664DA.js
|
||||
dist/sidebar_items-BFDCF64D.js
|
||||
dist/sidebar_items-58316C0C.js
|
||||
index.html
|
||||
readme.html
|
||||
search.html
|
||||
|
2
404.html
2
404.html
@ -16,7 +16,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
@ -1153,23 +1153,23 @@ pool to disconnect within the given interval.</p><p>See <a href="https://hexdocs
|
||||
|
||||
<section class="docstring">
|
||||
|
||||
<p>Similar to <a href="#insert_all/2"><code class="inline">insert_all/2</code></a> but with the following differences:</p><ul><li>accepts rows as streams or lists</li><li>sends rows as a chunked request</li><li>doesn't autogenerate ids or does any other preprocessing</li></ul><p>Example:</p><pre><code class="makeup elixir" translate="no"><span class="nc">Repo</span><span class="o">.</span><span class="n">query!</span><span class="p" data-group-id="9144202052-1">(</span><span class="s">"create table ecto_ch_demo(a UInt64, b String) engine Null"</span><span class="p" data-group-id="9144202052-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="8500159256-1">(</span><span class="s">"create table ecto_ch_demo(a UInt64, b String) engine Null"</span><span class="p" data-group-id="8500159256-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="9144202052-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="8500159256-2">do</span><span class="w">
|
||||
</span><span class="kn">use</span><span class="w"> </span><span class="nc">Ecto.Schema</span><span class="w">
|
||||
|
||||
</span><span class="na">@primary_key</span><span class="w"> </span><span class="no">false</span><span class="w">
|
||||
</span><span class="n">schema</span><span class="w"> </span><span class="s">"ecto_ch_demo"</span><span class="w"> </span><span class="k" data-group-id="9144202052-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="8500159256-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">: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="9144202052-3">end</span><span class="w">
|
||||
</span><span class="k" data-group-id="9144202052-2">end</span><span class="w">
|
||||
</span><span class="k" data-group-id="8500159256-3">end</span><span class="w">
|
||||
</span><span class="k" data-group-id="8500159256-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="9144202052-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="9144202052-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="9144202052-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="9144202052-7">(</span><span class="n">i</span><span class="p" data-group-id="9144202052-7">)</span><span class="p" data-group-id="9144202052-6">}</span><span class="w"> </span><span class="k" data-group-id="9144202052-5">end</span><span class="p" data-group-id="9144202052-4">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="9144202052-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="9144202052-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="9144202052-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="9144202052-9">)</span><span class="w">
|
||||
</span><span class="n">rows</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nc">Stream</span><span class="o">.</span><span class="n">map</span><span class="p" data-group-id="8500159256-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="8500159256-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="8500159256-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="8500159256-7">(</span><span class="n">i</span><span class="p" data-group-id="8500159256-7">)</span><span class="p" data-group-id="8500159256-6">}</span><span class="w"> </span><span class="k" data-group-id="8500159256-5">end</span><span class="p" data-group-id="8500159256-4">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="8500159256-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="8500159256-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="8500159256-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="8500159256-9">)</span><span class="w">
|
||||
|
||||
</span><span class="c1"># schemaless</span><span class="w">
|
||||
</span><span class="p" data-group-id="9144202052-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="9144202052-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="9144202052-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="9144202052-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="9144202052-13">(</span><span class="p" data-group-id="9144202052-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="9144202052-12">]</span><span class="p" data-group-id="9144202052-11">)</span></code></pre>
|
||||
</span><span class="p" data-group-id="8500159256-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="8500159256-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="8500159256-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="8500159256-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="8500159256-13">(</span><span class="p" data-group-id="8500159256-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="8500159256-12">]</span><span class="p" data-group-id="8500159256-11">)</span></code></pre>
|
||||
</section>
|
||||
</section>
|
||||
<section class="detail" id="load/2">
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
@ -148,7 +148,7 @@ Pages
|
||||
the set of natural languages that are preferred as a response to the request.
|
||||
Language tags function are provided in <a href="https://hexdocs.pm/ex_cldr/2.39.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="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="6058597819-1">(</span><span class="w"> </span><span class="p" data-group-id="6058597819-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="6058597819-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="6058597819-3">)</span><span class="w"> </span><span class="p" data-group-id="6058597819-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="6058597819-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="5672066355-1">(</span><span class="w"> </span><span class="p" data-group-id="5672066355-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="5672066355-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="5672066355-3">)</span><span class="w"> </span><span class="p" data-group-id="5672066355-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="5672066355-1">)</span></code></pre><p>Each language-range MAY be given an associated quality value which represents an
|
||||
estimate of the user's preference for the languages specified by that range. The
|
||||
quality value defaults to "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>
|
||||
@ -261,54 +261,54 @@ a configured <a href="https://hexdocs.pm/ex_cldr/2.39.2/Cldr.html"><code class="
|
||||
</a>
|
||||
<span class="text">Examples</span>
|
||||
</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="1246028914-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="1246028914-1">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="1246028914-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="1246028914-3">%</span><span class="nc" data-group-id="1246028914-3">Cldr.LanguageTag</span><span class="p" data-group-id="1246028914-3">{</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="6543305213-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="6543305213-1">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="6543305213-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="6543305213-3">%</span><span class="nc" data-group-id="6543305213-3">Cldr.LanguageTag</span><span class="p" data-group-id="6543305213-3">{</span><span class="w">
|
||||
</span><span class="ss">backend</span><span class="p">:</span><span class="w"> </span><span class="nc">TestBackend.Cldr</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">canonical_locale_name</span><span class="p">:</span><span class="w"> </span><span class="s">"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">language_subtags</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="1246028914-4">[</span><span class="p" data-group-id="1246028914-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="1246028914-5">%{</span><span class="p" data-group-id="1246028914-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="6543305213-4">[</span><span class="p" data-group-id="6543305213-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="6543305213-5">%{</span><span class="p" data-group-id="6543305213-5">}</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">gettext_locale_name</span><span class="p">:</span><span class="w"> </span><span class="no">nil</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">language</span><span class="p">:</span><span class="w"> </span><span class="s">"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="1246028914-6">%{</span><span class="p" data-group-id="1246028914-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="1246028914-7">[</span><span class="p" data-group-id="1246028914-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="6543305213-6">%{</span><span class="p" data-group-id="6543305213-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="6543305213-7">[</span><span class="p" data-group-id="6543305213-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">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">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="1246028914-8">%{</span><span class="p" data-group-id="1246028914-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="1246028914-9">[</span><span class="p" data-group-id="1246028914-9">]</span><span class="w">
|
||||
</span><span class="p" data-group-id="1246028914-3">}</span><span class="p" data-group-id="1246028914-2">}</span><span class="w">
|
||||
</span><span class="ss">transform</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="6543305213-8">%{</span><span class="p" data-group-id="6543305213-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="6543305213-9">[</span><span class="p" data-group-id="6543305213-9">]</span><span class="w">
|
||||
</span><span class="p" data-group-id="6543305213-3">}</span><span class="p" data-group-id="6543305213-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="1246028914-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="1246028914-10">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="1246028914-11">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="1246028914-12">%</span><span class="nc" data-group-id="1246028914-12">Cldr.LanguageTag</span><span class="p" data-group-id="1246028914-12">{</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="6543305213-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="6543305213-10">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="6543305213-11">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="6543305213-12">%</span><span class="nc" data-group-id="6543305213-12">Cldr.LanguageTag</span><span class="p" data-group-id="6543305213-12">{</span><span class="w">
|
||||
</span><span class="ss">backend</span><span class="p">:</span><span class="w"> </span><span class="nc">TestBackend.Cldr</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">canonical_locale_name</span><span class="p">:</span><span class="w"> </span><span class="s">"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">language_subtags</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="1246028914-13">[</span><span class="p" data-group-id="1246028914-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="1246028914-14">%{</span><span class="p" data-group-id="1246028914-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="6543305213-13">[</span><span class="p" data-group-id="6543305213-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="6543305213-14">%{</span><span class="p" data-group-id="6543305213-14">}</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">gettext_locale_name</span><span class="p">:</span><span class="w"> </span><span class="no">nil</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">language</span><span class="p">:</span><span class="w"> </span><span class="s">"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="1246028914-15">%{</span><span class="p" data-group-id="1246028914-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="1246028914-16">[</span><span class="p" data-group-id="1246028914-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="6543305213-15">%{</span><span class="p" data-group-id="6543305213-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="6543305213-16">[</span><span class="p" data-group-id="6543305213-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">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">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="1246028914-17">%{</span><span class="p" data-group-id="1246028914-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="1246028914-18">[</span><span class="p" data-group-id="1246028914-18">]</span><span class="w">
|
||||
</span><span class="p" data-group-id="1246028914-12">}</span><span class="p" data-group-id="1246028914-11">}</span><span class="w">
|
||||
</span><span class="ss">transform</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="6543305213-17">%{</span><span class="p" data-group-id="6543305213-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="6543305213-18">[</span><span class="p" data-group-id="6543305213-18">]</span><span class="w">
|
||||
</span><span class="p" data-group-id="6543305213-12">}</span><span class="p" data-group-id="6543305213-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="1246028914-19">(</span><span class="s">"xx,yy;q=0.3"</span><span class="p" data-group-id="1246028914-19">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="1246028914-20">{</span><span class="ss">:error</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="1246028914-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="1246028914-21">}</span><span class="p" data-group-id="1246028914-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="6543305213-19">(</span><span class="s">"xx,yy;q=0.3"</span><span class="p" data-group-id="6543305213-19">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="6543305213-20">{</span><span class="ss">:error</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="6543305213-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="6543305213-21">}</span><span class="p" data-group-id="6543305213-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="1246028914-22">(</span><span class="s">"invalid_tag"</span><span class="p" data-group-id="1246028914-22">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="1246028914-23">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1246028914-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="1246028914-24">}</span><span class="p" data-group-id="1246028914-23">}</span></code></pre>
|
||||
</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="6543305213-22">(</span><span class="s">"invalid_tag"</span><span class="p" data-group-id="6543305213-22">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="6543305213-23">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="6543305213-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="6543305213-24">}</span><span class="p" data-group-id="6543305213-23">}</span></code></pre>
|
||||
</section>
|
||||
</section>
|
||||
<section class="detail" id="parse/1">
|
||||
@ -369,95 +369,95 @@ with an error tuple for each invalid tag added at the end of the list.</p><h2 id
|
||||
</a>
|
||||
<span class="text">Example</span>
|
||||
</h2>
|
||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </span><span class="nc">Cldr.AcceptLanguage</span><span class="o">.</span><span class="n">parse</span><span class="p" data-group-id="7961234225-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="7961234225-1">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="7961234225-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="7961234225-3">[</span><span class="w">
|
||||
</span><span class="p" data-group-id="7961234225-4">{</span><span class="mf">1.0</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="7961234225-5">%</span><span class="nc" data-group-id="7961234225-5">Cldr.LanguageTag</span><span class="p" data-group-id="7961234225-5">{</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="5731352170-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="5731352170-1">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="5731352170-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="5731352170-3">[</span><span class="w">
|
||||
</span><span class="p" data-group-id="5731352170-4">{</span><span class="mf">1.0</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="5731352170-5">%</span><span class="nc" data-group-id="5731352170-5">Cldr.LanguageTag</span><span class="p" data-group-id="5731352170-5">{</span><span class="w">
|
||||
</span><span class="ss">backend</span><span class="p">:</span><span class="w"> </span><span class="nc">TestBackend.Cldr</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">canonical_locale_name</span><span class="p">:</span><span class="w"> </span><span class="s">"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="7961234225-6">[</span><span class="p" data-group-id="7961234225-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="7961234225-7">%{</span><span class="p" data-group-id="7961234225-7">}</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">language_subtags</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="5731352170-6">[</span><span class="p" data-group-id="5731352170-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="5731352170-7">%{</span><span class="p" data-group-id="5731352170-7">}</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">gettext_locale_name</span><span class="p">:</span><span class="w"> </span><span class="no">nil</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">language</span><span class="p">:</span><span class="w"> </span><span class="s">"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="7961234225-8">%{</span><span class="p" data-group-id="7961234225-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="7961234225-9">[</span><span class="p" data-group-id="7961234225-9">]</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">locale</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="5731352170-8">%{</span><span class="p" data-group-id="5731352170-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="5731352170-9">[</span><span class="p" data-group-id="5731352170-9">]</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">rbnf_locale_name</span><span class="p">:</span><span class="w"> </span><span class="ss">:da</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">requested_locale_name</span><span class="p">:</span><span class="w"> </span><span class="s">"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">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="7961234225-10">%{</span><span class="p" data-group-id="7961234225-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="7961234225-11">[</span><span class="p" data-group-id="7961234225-11">]</span><span class="w">
|
||||
</span><span class="p" data-group-id="7961234225-5">}</span><span class="p" data-group-id="7961234225-4">}</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="7961234225-12">{</span><span class="mf">0.3</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="7961234225-13">%</span><span class="nc" data-group-id="7961234225-13">Cldr.LanguageTag</span><span class="p" data-group-id="7961234225-13">{</span><span class="w">
|
||||
</span><span class="ss">transform</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="5731352170-10">%{</span><span class="p" data-group-id="5731352170-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="5731352170-11">[</span><span class="p" data-group-id="5731352170-11">]</span><span class="w">
|
||||
</span><span class="p" data-group-id="5731352170-5">}</span><span class="p" data-group-id="5731352170-4">}</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="5731352170-12">{</span><span class="mf">0.3</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="5731352170-13">%</span><span class="nc" data-group-id="5731352170-13">Cldr.LanguageTag</span><span class="p" data-group-id="5731352170-13">{</span><span class="w">
|
||||
</span><span class="ss">backend</span><span class="p">:</span><span class="w"> </span><span class="nc">TestBackend.Cldr</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">canonical_locale_name</span><span class="p">:</span><span class="w"> </span><span class="s">"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">language_subtags</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="7961234225-14">[</span><span class="p" data-group-id="7961234225-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="7961234225-15">%{</span><span class="p" data-group-id="7961234225-15">}</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">language_subtags</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="5731352170-14">[</span><span class="p" data-group-id="5731352170-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="5731352170-15">%{</span><span class="p" data-group-id="5731352170-15">}</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">gettext_locale_name</span><span class="p">:</span><span class="w"> </span><span class="no">nil</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">language</span><span class="p">:</span><span class="w"> </span><span class="s">"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="7961234225-16">%{</span><span class="p" data-group-id="7961234225-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="7961234225-17">[</span><span class="p" data-group-id="7961234225-17">]</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">locale</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="5731352170-16">%{</span><span class="p" data-group-id="5731352170-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="5731352170-17">[</span><span class="p" data-group-id="5731352170-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">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">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="7961234225-18">%{</span><span class="p" data-group-id="7961234225-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="7961234225-19">[</span><span class="p" data-group-id="7961234225-19">]</span><span class="w">
|
||||
</span><span class="p" data-group-id="7961234225-13">}</span><span class="p" data-group-id="7961234225-12">}</span><span class="w">
|
||||
</span><span class="p" data-group-id="7961234225-3">]</span><span class="p" data-group-id="7961234225-2">}</span><span class="w">
|
||||
</span><span class="ss">transform</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="5731352170-18">%{</span><span class="p" data-group-id="5731352170-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="5731352170-19">[</span><span class="p" data-group-id="5731352170-19">]</span><span class="w">
|
||||
</span><span class="p" data-group-id="5731352170-13">}</span><span class="p" data-group-id="5731352170-12">}</span><span class="w">
|
||||
</span><span class="p" data-group-id="5731352170-3">]</span><span class="p" data-group-id="5731352170-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="7961234225-20">(</span><span class="s">"invalid_tag"</span><span class="p" data-group-id="7961234225-20">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="7961234225-21">{</span><span class="ss">:error</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="7961234225-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="7961234225-22">}</span><span class="p" data-group-id="7961234225-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="5731352170-20">(</span><span class="s">"invalid_tag"</span><span class="p" data-group-id="5731352170-20">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="5731352170-21">{</span><span class="ss">:error</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="5731352170-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="5731352170-22">}</span><span class="p" data-group-id="5731352170-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="7961234225-23">(</span><span class="s">"da,zh-TW;q=0.3,invalid_tag"</span><span class="p" data-group-id="7961234225-23">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="7961234225-24">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="7961234225-25">[</span><span class="w">
|
||||
</span><span class="p" data-group-id="7961234225-26">{</span><span class="mf">1.0</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="7961234225-27">%</span><span class="nc" data-group-id="7961234225-27">Cldr.LanguageTag</span><span class="p" data-group-id="7961234225-27">{</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="5731352170-23">(</span><span class="s">"da,zh-TW;q=0.3,invalid_tag"</span><span class="p" data-group-id="5731352170-23">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="5731352170-24">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="5731352170-25">[</span><span class="w">
|
||||
</span><span class="p" data-group-id="5731352170-26">{</span><span class="mf">1.0</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="5731352170-27">%</span><span class="nc" data-group-id="5731352170-27">Cldr.LanguageTag</span><span class="p" data-group-id="5731352170-27">{</span><span class="w">
|
||||
</span><span class="ss">backend</span><span class="p">:</span><span class="w"> </span><span class="nc">TestBackend.Cldr</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">canonical_locale_name</span><span class="p">:</span><span class="w"> </span><span class="s">"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="7961234225-28">[</span><span class="p" data-group-id="7961234225-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="7961234225-29">%{</span><span class="p" data-group-id="7961234225-29">}</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">language_subtags</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="5731352170-28">[</span><span class="p" data-group-id="5731352170-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="5731352170-29">%{</span><span class="p" data-group-id="5731352170-29">}</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">gettext_locale_name</span><span class="p">:</span><span class="w"> </span><span class="no">nil</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">language</span><span class="p">:</span><span class="w"> </span><span class="s">"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="7961234225-30">%{</span><span class="p" data-group-id="7961234225-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="7961234225-31">[</span><span class="p" data-group-id="7961234225-31">]</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">locale</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="5731352170-30">%{</span><span class="p" data-group-id="5731352170-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="5731352170-31">[</span><span class="p" data-group-id="5731352170-31">]</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">rbnf_locale_name</span><span class="p">:</span><span class="w"> </span><span class="ss">:da</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">requested_locale_name</span><span class="p">:</span><span class="w"> </span><span class="s">"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">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="7961234225-32">%{</span><span class="p" data-group-id="7961234225-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="7961234225-33">[</span><span class="p" data-group-id="7961234225-33">]</span><span class="w">
|
||||
</span><span class="p" data-group-id="7961234225-27">}</span><span class="p" data-group-id="7961234225-26">}</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="7961234225-34">{</span><span class="mf">0.3</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="7961234225-35">%</span><span class="nc" data-group-id="7961234225-35">Cldr.LanguageTag</span><span class="p" data-group-id="7961234225-35">{</span><span class="w">
|
||||
</span><span class="ss">transform</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="5731352170-32">%{</span><span class="p" data-group-id="5731352170-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="5731352170-33">[</span><span class="p" data-group-id="5731352170-33">]</span><span class="w">
|
||||
</span><span class="p" data-group-id="5731352170-27">}</span><span class="p" data-group-id="5731352170-26">}</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="5731352170-34">{</span><span class="mf">0.3</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="5731352170-35">%</span><span class="nc" data-group-id="5731352170-35">Cldr.LanguageTag</span><span class="p" data-group-id="5731352170-35">{</span><span class="w">
|
||||
</span><span class="ss">backend</span><span class="p">:</span><span class="w"> </span><span class="nc">TestBackend.Cldr</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">canonical_locale_name</span><span class="p">:</span><span class="w"> </span><span class="s">"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">language_subtags</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="7961234225-36">[</span><span class="p" data-group-id="7961234225-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="7961234225-37">%{</span><span class="p" data-group-id="7961234225-37">}</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">language_subtags</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="5731352170-36">[</span><span class="p" data-group-id="5731352170-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="5731352170-37">%{</span><span class="p" data-group-id="5731352170-37">}</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">gettext_locale_name</span><span class="p">:</span><span class="w"> </span><span class="no">nil</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">language</span><span class="p">:</span><span class="w"> </span><span class="s">"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="7961234225-38">%{</span><span class="p" data-group-id="7961234225-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="7961234225-39">[</span><span class="p" data-group-id="7961234225-39">]</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">locale</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="5731352170-38">%{</span><span class="p" data-group-id="5731352170-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="5731352170-39">[</span><span class="p" data-group-id="5731352170-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">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">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="7961234225-40">%{</span><span class="p" data-group-id="7961234225-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="7961234225-41">[</span><span class="p" data-group-id="7961234225-41">]</span><span class="w">
|
||||
</span><span class="p" data-group-id="7961234225-35">}</span><span class="p" data-group-id="7961234225-34">}</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="7961234225-42">{</span><span class="ss">:error</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="7961234225-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="7961234225-43">}</span><span class="p" data-group-id="7961234225-42">}</span><span class="w">
|
||||
</span><span class="p" data-group-id="7961234225-25">]</span><span class="p" data-group-id="7961234225-24">}</span></code></pre>
|
||||
</span><span class="ss">transform</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="5731352170-40">%{</span><span class="p" data-group-id="5731352170-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="5731352170-41">[</span><span class="p" data-group-id="5731352170-41">]</span><span class="w">
|
||||
</span><span class="p" data-group-id="5731352170-35">}</span><span class="p" data-group-id="5731352170-34">}</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="5731352170-42">{</span><span class="ss">:error</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="5731352170-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="5731352170-43">}</span><span class="p" data-group-id="5731352170-42">}</span><span class="w">
|
||||
</span><span class="p" data-group-id="5731352170-25">]</span><span class="p" data-group-id="5731352170-24">}</span></code></pre>
|
||||
</section>
|
||||
</section>
|
||||
<section class="detail" id="parse!/1">
|
||||
@ -502,92 +502,92 @@ with an error tuple for each invalid tag added at the end of the list.</p><h2 id
|
||||
</a>
|
||||
<span class="text">Example</span>
|
||||
</h2>
|
||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr.AcceptLanguage</span><span class="o">.</span><span class="n">parse!</span><span class="p" data-group-id="6736859894-1">(</span><span class="s">"da,zh-TW;q=0.3"</span><span class="p" data-group-id="6736859894-1">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="6736859894-2">[</span><span class="w">
|
||||
</span><span class="p" data-group-id="6736859894-3">{</span><span class="mf">1.0</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="6736859894-4">%</span><span class="nc" data-group-id="6736859894-4">Cldr.LanguageTag</span><span class="p" data-group-id="6736859894-4">{</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="7315638774-1">(</span><span class="s">"da,zh-TW;q=0.3"</span><span class="p" data-group-id="7315638774-1">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="7315638774-2">[</span><span class="w">
|
||||
</span><span class="p" data-group-id="7315638774-3">{</span><span class="mf">1.0</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="7315638774-4">%</span><span class="nc" data-group-id="7315638774-4">Cldr.LanguageTag</span><span class="p" data-group-id="7315638774-4">{</span><span class="w">
|
||||
</span><span class="ss">backend</span><span class="p">:</span><span class="w"> </span><span class="nc">TestBackend.Cldr</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">canonical_locale_name</span><span class="p">:</span><span class="w"> </span><span class="s">"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="6736859894-5">[</span><span class="p" data-group-id="6736859894-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="6736859894-6">%{</span><span class="p" data-group-id="6736859894-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="7315638774-5">[</span><span class="p" data-group-id="7315638774-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="7315638774-6">%{</span><span class="p" data-group-id="7315638774-6">}</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">gettext_locale_name</span><span class="p">:</span><span class="w"> </span><span class="no">nil</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">language</span><span class="p">:</span><span class="w"> </span><span class="s">"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="6736859894-7">%{</span><span class="p" data-group-id="6736859894-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="6736859894-8">[</span><span class="p" data-group-id="6736859894-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="7315638774-7">%{</span><span class="p" data-group-id="7315638774-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="7315638774-8">[</span><span class="p" data-group-id="7315638774-8">]</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">rbnf_locale_name</span><span class="p">:</span><span class="w"> </span><span class="ss">:da</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">requested_locale_name</span><span class="p">:</span><span class="w"> </span><span class="s">"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">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="6736859894-9">%{</span><span class="p" data-group-id="6736859894-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="6736859894-10">[</span><span class="p" data-group-id="6736859894-10">]</span><span class="w">
|
||||
</span><span class="p" data-group-id="6736859894-4">}</span><span class="p" data-group-id="6736859894-3">}</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="6736859894-11">{</span><span class="mf">0.3</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="6736859894-12">%</span><span class="nc" data-group-id="6736859894-12">Cldr.LanguageTag</span><span class="p" data-group-id="6736859894-12">{</span><span class="w">
|
||||
</span><span class="ss">transform</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="7315638774-9">%{</span><span class="p" data-group-id="7315638774-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="7315638774-10">[</span><span class="p" data-group-id="7315638774-10">]</span><span class="w">
|
||||
</span><span class="p" data-group-id="7315638774-4">}</span><span class="p" data-group-id="7315638774-3">}</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="7315638774-11">{</span><span class="mf">0.3</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="7315638774-12">%</span><span class="nc" data-group-id="7315638774-12">Cldr.LanguageTag</span><span class="p" data-group-id="7315638774-12">{</span><span class="w">
|
||||
</span><span class="ss">backend</span><span class="p">:</span><span class="w"> </span><span class="nc">TestBackend.Cldr</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">canonical_locale_name</span><span class="p">:</span><span class="w"> </span><span class="s">"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">language_subtags</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="6736859894-13">[</span><span class="p" data-group-id="6736859894-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="6736859894-14">%{</span><span class="p" data-group-id="6736859894-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="7315638774-13">[</span><span class="p" data-group-id="7315638774-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="7315638774-14">%{</span><span class="p" data-group-id="7315638774-14">}</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">gettext_locale_name</span><span class="p">:</span><span class="w"> </span><span class="no">nil</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">language</span><span class="p">:</span><span class="w"> </span><span class="s">"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="6736859894-15">%{</span><span class="p" data-group-id="6736859894-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="6736859894-16">[</span><span class="p" data-group-id="6736859894-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="7315638774-15">%{</span><span class="p" data-group-id="7315638774-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="7315638774-16">[</span><span class="p" data-group-id="7315638774-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">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">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="6736859894-17">%{</span><span class="p" data-group-id="6736859894-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="6736859894-18">[</span><span class="p" data-group-id="6736859894-18">]</span><span class="w">
|
||||
</span><span class="p" data-group-id="6736859894-12">}</span><span class="p" data-group-id="6736859894-11">}</span><span class="w">
|
||||
</span><span class="p" data-group-id="6736859894-2">]</span><span class="w">
|
||||
</span><span class="ss">transform</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="7315638774-17">%{</span><span class="p" data-group-id="7315638774-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="7315638774-18">[</span><span class="p" data-group-id="7315638774-18">]</span><span class="w">
|
||||
</span><span class="p" data-group-id="7315638774-12">}</span><span class="p" data-group-id="7315638774-11">}</span><span class="w">
|
||||
</span><span class="p" data-group-id="7315638774-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="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">
|
||||
|
||||
</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="6736859894-19">(</span><span class="s">"da,zh-TW;q=0.3,invalid_tag"</span><span class="p" data-group-id="6736859894-19">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="6736859894-20">[</span><span class="w">
|
||||
</span><span class="p" data-group-id="6736859894-21">{</span><span class="mf">1.0</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="6736859894-22">%</span><span class="nc" data-group-id="6736859894-22">Cldr.LanguageTag</span><span class="p" data-group-id="6736859894-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">parse!</span><span class="p" data-group-id="7315638774-19">(</span><span class="s">"da,zh-TW;q=0.3,invalid_tag"</span><span class="p" data-group-id="7315638774-19">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="7315638774-20">[</span><span class="w">
|
||||
</span><span class="p" data-group-id="7315638774-21">{</span><span class="mf">1.0</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="7315638774-22">%</span><span class="nc" data-group-id="7315638774-22">Cldr.LanguageTag</span><span class="p" data-group-id="7315638774-22">{</span><span class="w">
|
||||
</span><span class="ss">backend</span><span class="p">:</span><span class="w"> </span><span class="nc">TestBackend.Cldr</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">canonical_locale_name</span><span class="p">:</span><span class="w"> </span><span class="s">"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="6736859894-23">[</span><span class="p" data-group-id="6736859894-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="6736859894-24">%{</span><span class="p" data-group-id="6736859894-24">}</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">language_subtags</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="7315638774-23">[</span><span class="p" data-group-id="7315638774-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="7315638774-24">%{</span><span class="p" data-group-id="7315638774-24">}</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">gettext_locale_name</span><span class="p">:</span><span class="w"> </span><span class="no">nil</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">language</span><span class="p">:</span><span class="w"> </span><span class="s">"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="6736859894-25">%{</span><span class="p" data-group-id="6736859894-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="6736859894-26">[</span><span class="p" data-group-id="6736859894-26">]</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">locale</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="7315638774-25">%{</span><span class="p" data-group-id="7315638774-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="7315638774-26">[</span><span class="p" data-group-id="7315638774-26">]</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">rbnf_locale_name</span><span class="p">:</span><span class="w"> </span><span class="ss">:da</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">requested_locale_name</span><span class="p">:</span><span class="w"> </span><span class="s">"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">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="6736859894-27">%{</span><span class="p" data-group-id="6736859894-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="6736859894-28">[</span><span class="p" data-group-id="6736859894-28">]</span><span class="w">
|
||||
</span><span class="p" data-group-id="6736859894-22">}</span><span class="p" data-group-id="6736859894-21">}</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="6736859894-29">{</span><span class="mf">0.3</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="6736859894-30">%</span><span class="nc" data-group-id="6736859894-30">Cldr.LanguageTag</span><span class="p" data-group-id="6736859894-30">{</span><span class="w">
|
||||
</span><span class="ss">transform</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="7315638774-27">%{</span><span class="p" data-group-id="7315638774-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="7315638774-28">[</span><span class="p" data-group-id="7315638774-28">]</span><span class="w">
|
||||
</span><span class="p" data-group-id="7315638774-22">}</span><span class="p" data-group-id="7315638774-21">}</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="7315638774-29">{</span><span class="mf">0.3</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="7315638774-30">%</span><span class="nc" data-group-id="7315638774-30">Cldr.LanguageTag</span><span class="p" data-group-id="7315638774-30">{</span><span class="w">
|
||||
</span><span class="ss">backend</span><span class="p">:</span><span class="w"> </span><span class="nc">TestBackend.Cldr</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">canonical_locale_name</span><span class="p">:</span><span class="w"> </span><span class="s">"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">language_subtags</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="6736859894-31">[</span><span class="p" data-group-id="6736859894-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="6736859894-32">%{</span><span class="p" data-group-id="6736859894-32">}</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">language_subtags</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="7315638774-31">[</span><span class="p" data-group-id="7315638774-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="7315638774-32">%{</span><span class="p" data-group-id="7315638774-32">}</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">gettext_locale_name</span><span class="p">:</span><span class="w"> </span><span class="no">nil</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">language</span><span class="p">:</span><span class="w"> </span><span class="s">"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="6736859894-33">%{</span><span class="p" data-group-id="6736859894-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="6736859894-34">[</span><span class="p" data-group-id="6736859894-34">]</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">locale</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="7315638774-33">%{</span><span class="p" data-group-id="7315638774-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="7315638774-34">[</span><span class="p" data-group-id="7315638774-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">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">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="6736859894-35">%{</span><span class="p" data-group-id="6736859894-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="6736859894-36">[</span><span class="p" data-group-id="6736859894-36">]</span><span class="w">
|
||||
</span><span class="p" data-group-id="6736859894-30">}</span><span class="p" data-group-id="6736859894-29">}</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="6736859894-37">{</span><span class="ss">:error</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="6736859894-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="6736859894-38">}</span><span class="p" data-group-id="6736859894-37">}</span><span class="w">
|
||||
</span><span class="p" data-group-id="6736859894-20">]</span></code></pre>
|
||||
</span><span class="ss">transform</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="7315638774-35">%{</span><span class="p" data-group-id="7315638774-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="7315638774-36">[</span><span class="p" data-group-id="7315638774-36">]</span><span class="w">
|
||||
</span><span class="p" data-group-id="7315638774-30">}</span><span class="p" data-group-id="7315638774-29">}</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="7315638774-37">{</span><span class="ss">:error</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="7315638774-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="7315638774-38">}</span><span class="p" data-group-id="7315638774-37">}</span><span class="w">
|
||||
</span><span class="p" data-group-id="7315638774-20">]</span></code></pre>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
@ -419,11 +419,11 @@ The default is <code class="inline">:all</code>. See <a href="https://hexdocs.pm
|
||||
</h2>
|
||||
<p> MyApp.Cldr.Currency.currencies_for_locale("en")
|
||||
=> {: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="2104967500-1">%</span><span class="nc" data-group-id="2104967500-1">Cldr.Currency</span><span class="p" data-group-id="2104967500-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="2031222954-1">%</span><span class="nc" data-group-id="2031222954-1">Cldr.Currency</span><span class="p" data-group-id="2031222954-1">{</span><span class="w">
|
||||
</span><span class="ss">cash_digits</span><span class="p">:</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">cash_rounding</span><span class="p">:</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">code</span><span class="p">:</span><span class="w"> </span><span class="s">"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="2104967500-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="2104967500-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="2031222954-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="2031222954-2">}</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">digits</span><span class="p">:</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">from</span><span class="p">:</span><span class="w"> </span><span class="no">nil</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">iso_digits</span><span class="p">:</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="w">
|
||||
@ -433,12 +433,12 @@ The default is <code class="inline">:all</code>. See <a href="https://hexdocs.pm
|
||||
</span><span class="ss">symbol</span><span class="p">:</span><span class="w"> </span><span class="s">"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">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="2104967500-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="2104967500-3">%</span><span class="nc" data-group-id="2104967500-3">Cldr.Currency</span><span class="p" data-group-id="2104967500-3">{</span><span class="w">
|
||||
</span><span class="p" data-group-id="2031222954-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="2031222954-3">%</span><span class="nc" data-group-id="2031222954-3">Cldr.Currency</span><span class="p" data-group-id="2031222954-3">{</span><span class="w">
|
||||
</span><span class="ss">cash_digits</span><span class="p">:</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">cash_rounding</span><span class="p">:</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">code</span><span class="p">:</span><span class="w"> </span><span class="s">"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="2104967500-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="2104967500-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="2031222954-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="2031222954-4">}</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">digits</span><span class="p">:</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">from</span><span class="p">:</span><span class="w"> </span><span class="no">nil</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">iso_digits</span><span class="p">:</span><span class="w"> </span><span class="no">nil</span><span class="p">,</span><span class="w">
|
||||
@ -448,7 +448,7 @@ The default is <code class="inline">:all</code>. See <a href="https://hexdocs.pm
|
||||
</span><span class="ss">symbol</span><span class="p">:</span><span class="w"> </span><span class="s">"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">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="2104967500-3">}</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="2031222954-3">}</span><span class="p">,</span><span class="w">
|
||||
</span><span class="n">...</span><span class="w">
|
||||
</span><span class="err">}</span><span class="err">}</span></code></pre>
|
||||
</section>
|
||||
@ -499,11 +499,11 @@ The default is <code class="inline">:all</code>. See <a href="https://hexdocs.pm
|
||||
<span class="text">Example</span>
|
||||
</h2>
|
||||
<p> MyApp.Cldr.Currency.currencies_for_locale!("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="1976903157-1">%</span><span class="nc" data-group-id="1976903157-1">Cldr.Currency</span><span class="p" data-group-id="1976903157-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="6291527444-1">%</span><span class="nc" data-group-id="6291527444-1">Cldr.Currency</span><span class="p" data-group-id="6291527444-1">{</span><span class="w">
|
||||
</span><span class="ss">cash_digits</span><span class="p">:</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">cash_rounding</span><span class="p">:</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">code</span><span class="p">:</span><span class="w"> </span><span class="s">"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="1976903157-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="1976903157-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="6291527444-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="6291527444-2">}</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">digits</span><span class="p">:</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">from</span><span class="p">:</span><span class="w"> </span><span class="no">nil</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">iso_digits</span><span class="p">:</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="w">
|
||||
@ -513,12 +513,12 @@ The default is <code class="inline">:all</code>. See <a href="https://hexdocs.pm
|
||||
</span><span class="ss">symbol</span><span class="p">:</span><span class="w"> </span><span class="s">"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">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="1976903157-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="1976903157-3">%</span><span class="nc" data-group-id="1976903157-3">Cldr.Currency</span><span class="p" data-group-id="1976903157-3">{</span><span class="w">
|
||||
</span><span class="p" data-group-id="6291527444-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="6291527444-3">%</span><span class="nc" data-group-id="6291527444-3">Cldr.Currency</span><span class="p" data-group-id="6291527444-3">{</span><span class="w">
|
||||
</span><span class="ss">cash_digits</span><span class="p">:</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">cash_rounding</span><span class="p">:</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">code</span><span class="p">:</span><span class="w"> </span><span class="s">"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="1976903157-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="1976903157-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="6291527444-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="6291527444-4">}</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">digits</span><span class="p">:</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">from</span><span class="p">:</span><span class="w"> </span><span class="no">nil</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">iso_digits</span><span class="p">:</span><span class="w"> </span><span class="no">nil</span><span class="p">,</span><span class="w">
|
||||
@ -528,7 +528,7 @@ The default is <code class="inline">:all</code>. See <a href="https://hexdocs.pm
|
||||
</span><span class="ss">symbol</span><span class="p">:</span><span class="w"> </span><span class="s">"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">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="1976903157-3">}</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="6291527444-3">}</span><span class="p">,</span><span class="w">
|
||||
</span><span class="n">...</span></code></pre><p> }</p>
|
||||
</section>
|
||||
</section>
|
||||
@ -586,13 +586,13 @@ or a <a href="https://hexdocs.pm/ex_cldr/2.39.2/Cldr.LanguageTag.html"><code cla
|
||||
</a>
|
||||
<span class="text">Examples</span>
|
||||
</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="8339187517-1">(</span><span class="s">"AUD"</span><span class="p" data-group-id="8339187517-1">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="8339187517-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="8339187517-3">%</span><span class="nc" data-group-id="8339187517-3">Cldr.Currency</span><span class="p" data-group-id="8339187517-3">{</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="0558297730-1">(</span><span class="s">"AUD"</span><span class="p" data-group-id="0558297730-1">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="0558297730-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="0558297730-3">%</span><span class="nc" data-group-id="0558297730-3">Cldr.Currency</span><span class="p" data-group-id="0558297730-3">{</span><span class="w">
|
||||
</span><span class="ss">cash_digits</span><span class="p">:</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">cash_rounding</span><span class="p">:</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">code</span><span class="p">:</span><span class="w"> </span><span class="s">"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="8339187517-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="8339187517-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="0558297730-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="0558297730-4">}</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">digits</span><span class="p">:</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">iso_digits</span><span class="p">:</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">name</span><span class="p">:</span><span class="w"> </span><span class="s">"Australian Dollar"</span><span class="p">,</span><span class="w">
|
||||
@ -600,15 +600,15 @@ or a <a href="https://hexdocs.pm/ex_cldr/2.39.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">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="p" data-group-id="8339187517-3">}</span><span class="p" data-group-id="8339187517-2">}</span><span class="w">
|
||||
</span><span class="p" data-group-id="0558297730-3">}</span><span class="p" data-group-id="0558297730-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="8339187517-5">(</span><span class="s">"THB"</span><span class="p" data-group-id="8339187517-5">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="8339187517-6">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="8339187517-7">%</span><span class="nc" data-group-id="8339187517-7">Cldr.Currency</span><span class="p" data-group-id="8339187517-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">currency_for_code</span><span class="p" data-group-id="0558297730-5">(</span><span class="s">"THB"</span><span class="p" data-group-id="0558297730-5">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="0558297730-6">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="0558297730-7">%</span><span class="nc" data-group-id="0558297730-7">Cldr.Currency</span><span class="p" data-group-id="0558297730-7">{</span><span class="w">
|
||||
</span><span class="ss">cash_digits</span><span class="p">:</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">cash_rounding</span><span class="p">:</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">code</span><span class="p">:</span><span class="w"> </span><span class="s">"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="8339187517-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="8339187517-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="0558297730-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="0558297730-8">}</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">digits</span><span class="p">:</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">iso_digits</span><span class="p">:</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">name</span><span class="p">:</span><span class="w"> </span><span class="s">"Thai Baht"</span><span class="p">,</span><span class="w">
|
||||
@ -616,7 +616,7 @@ or a <a href="https://hexdocs.pm/ex_cldr/2.39.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">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="p" data-group-id="8339187517-7">}</span><span class="p" data-group-id="8339187517-6">}</span></code></pre>
|
||||
</span><span class="p" data-group-id="0558297730-7">}</span><span class="p" data-group-id="0558297730-6">}</span></code></pre>
|
||||
</section>
|
||||
</section>
|
||||
<section class="detail" id="currency_for_code!/2">
|
||||
@ -675,12 +675,12 @@ or a <a href="https://hexdocs.pm/ex_cldr/2.39.2/Cldr.LanguageTag.html"><code cla
|
||||
</a>
|
||||
<span class="text">Examples</span>
|
||||
</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="9598554112-1">(</span><span class="s">"AUD"</span><span class="p" data-group-id="9598554112-1">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="9598554112-2">%</span><span class="nc" data-group-id="9598554112-2">Cldr.Currency</span><span class="p" data-group-id="9598554112-2">{</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="0401657254-1">(</span><span class="s">"AUD"</span><span class="p" data-group-id="0401657254-1">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="0401657254-2">%</span><span class="nc" data-group-id="0401657254-2">Cldr.Currency</span><span class="p" data-group-id="0401657254-2">{</span><span class="w">
|
||||
</span><span class="ss">cash_digits</span><span class="p">:</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">cash_rounding</span><span class="p">:</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">code</span><span class="p">:</span><span class="w"> </span><span class="s">"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="9598554112-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="9598554112-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="0401657254-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="0401657254-3">}</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">digits</span><span class="p">:</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">iso_digits</span><span class="p">:</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">name</span><span class="p">:</span><span class="w"> </span><span class="s">"Australian Dollar"</span><span class="p">,</span><span class="w">
|
||||
@ -688,14 +688,14 @@ or a <a href="https://hexdocs.pm/ex_cldr/2.39.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">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="p" data-group-id="9598554112-2">}</span><span class="w">
|
||||
</span><span class="p" data-group-id="0401657254-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="9598554112-4">(</span><span class="s">"THB"</span><span class="p" data-group-id="9598554112-4">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="9598554112-5">%</span><span class="nc" data-group-id="9598554112-5">Cldr.Currency</span><span class="p" data-group-id="9598554112-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="0401657254-4">(</span><span class="s">"THB"</span><span class="p" data-group-id="0401657254-4">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="0401657254-5">%</span><span class="nc" data-group-id="0401657254-5">Cldr.Currency</span><span class="p" data-group-id="0401657254-5">{</span><span class="w">
|
||||
</span><span class="ss">cash_digits</span><span class="p">:</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">cash_rounding</span><span class="p">:</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">code</span><span class="p">:</span><span class="w"> </span><span class="s">"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="9598554112-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="9598554112-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="0401657254-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="0401657254-6">}</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">digits</span><span class="p">:</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">iso_digits</span><span class="p">:</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">name</span><span class="p">:</span><span class="w"> </span><span class="s">"Thai Baht"</span><span class="p">,</span><span class="w">
|
||||
@ -703,7 +703,7 @@ or a <a href="https://hexdocs.pm/ex_cldr/2.39.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">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="p" data-group-id="9598554112-5">}</span></code></pre>
|
||||
</span><span class="p" data-group-id="0401657254-5">}</span></code></pre>
|
||||
</section>
|
||||
</section>
|
||||
<section class="detail" id="currency_from_locale/1">
|
||||
@ -744,15 +744,15 @@ or a <a href="https://hexdocs.pm/ex_cldr/2.39.2/Cldr.LanguageTag.html"><code cla
|
||||
</a>
|
||||
<span class="text">Examples</span>
|
||||
</h2>
|
||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </span><span class="p" data-group-id="0153516457-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="0153516457-1">}</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">validate_locale</span><span class="p" data-group-id="0153516457-2">(</span><span class="s">"en"</span><span class="p" data-group-id="0153516457-2">)</span><span class="w">
|
||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </span><span class="p" data-group-id="5462882570-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="5462882570-1">}</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">validate_locale</span><span class="p" data-group-id="5462882570-2">(</span><span class="s">"en"</span><span class="p" data-group-id="5462882570-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_from_locale</span><span class="w"> </span><span class="n">locale</span><span class="w">
|
||||
</span><span class="ss">:USD</span><span class="w">
|
||||
|
||||
</span><span class="gp unselectable">iex> </span><span class="p" data-group-id="0153516457-3">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="n">locale</span><span class="p" data-group-id="0153516457-3">}</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">validate_locale</span><span class="p" data-group-id="0153516457-4">(</span><span class="s">"en-AU"</span><span class="p" data-group-id="0153516457-4">)</span><span class="w">
|
||||
</span><span class="gp unselectable">iex> </span><span class="p" data-group-id="5462882570-3">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="n">locale</span><span class="p" data-group-id="5462882570-3">}</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">validate_locale</span><span class="p" data-group-id="5462882570-4">(</span><span class="s">"en-AU"</span><span class="p" data-group-id="5462882570-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_from_locale</span><span class="w"> </span><span class="n">locale</span><span class="w">
|
||||
</span><span class="ss">:AUD</span><span class="w">
|
||||
|
||||
</span><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr.Currency</span><span class="o">.</span><span class="n">currency_from_locale</span><span class="p" data-group-id="0153516457-5">(</span><span class="s">"en-GB"</span><span class="p" data-group-id="0153516457-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_from_locale</span><span class="p" data-group-id="5462882570-5">(</span><span class="s">"en-GB"</span><span class="p" data-group-id="5462882570-5">)</span><span class="w">
|
||||
</span><span class="ss">:GBP</span></code></pre>
|
||||
</section>
|
||||
</section>
|
||||
@ -796,14 +796,14 @@ or a <a href="https://hexdocs.pm/ex_cldr/2.39.2/Cldr.LanguageTag.html"><code cla
|
||||
</a>
|
||||
<span class="text">Example</span>
|
||||
</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="p" data-group-id="4817449937-1">(</span><span class="s">"en"</span><span class="p" data-group-id="4817449937-1">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="4817449937-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="4817449937-3">%{</span><span class="w">
|
||||
</span><span class="ss">USD</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="4817449937-4">%{</span><span class="ss">from</span><span class="p">:</span><span class="w"> </span><span class="ld">~D[1792-01-01]</span><span class="p">,</span><span class="w"> </span><span class="ss">to</span><span class="p">:</span><span class="w"> </span><span class="no">nil</span><span class="p" data-group-id="4817449937-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="4817449937-5">%{</span><span class="ss">tender</span><span class="p">:</span><span class="w"> </span><span class="no">false</span><span class="p" data-group-id="4817449937-5">}</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">USS</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="4817449937-6">%{</span><span class="ss">from</span><span class="p">:</span><span class="w"> </span><span class="no">nil</span><span class="p">,</span><span class="w"> </span><span class="ss">tender</span><span class="p">:</span><span class="w"> </span><span class="no">false</span><span class="p">,</span><span class="w"> </span><span class="ss">to</span><span class="p">:</span><span class="w"> </span><span class="ld">~D[2014-03-01]</span><span class="p" data-group-id="4817449937-6">}</span><span class="w">
|
||||
</span><span class="p" data-group-id="4817449937-3">}</span><span class="w">
|
||||
</span><span class="p" data-group-id="4817449937-2">}</span></code></pre>
|
||||
<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="p" data-group-id="4517182472-1">(</span><span class="s">"en"</span><span class="p" data-group-id="4517182472-1">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="4517182472-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="4517182472-3">%{</span><span class="w">
|
||||
</span><span class="ss">USD</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="4517182472-4">%{</span><span class="ss">from</span><span class="p">:</span><span class="w"> </span><span class="ld">~D[1792-01-01]</span><span class="p">,</span><span class="w"> </span><span class="ss">to</span><span class="p">:</span><span class="w"> </span><span class="no">nil</span><span class="p" data-group-id="4517182472-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="4517182472-5">%{</span><span class="ss">tender</span><span class="p">:</span><span class="w"> </span><span class="no">false</span><span class="p" data-group-id="4517182472-5">}</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">USS</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="4517182472-6">%{</span><span class="ss">from</span><span class="p">:</span><span class="w"> </span><span class="no">nil</span><span class="p">,</span><span class="w"> </span><span class="ss">tender</span><span class="p">:</span><span class="w"> </span><span class="no">false</span><span class="p">,</span><span class="w"> </span><span class="ss">to</span><span class="p">:</span><span class="w"> </span><span class="ld">~D[2014-03-01]</span><span class="p" data-group-id="4517182472-6">}</span><span class="w">
|
||||
</span><span class="p" data-group-id="4517182472-3">}</span><span class="w">
|
||||
</span><span class="p" data-group-id="4517182472-2">}</span></code></pre>
|
||||
</section>
|
||||
</section>
|
||||
<section class="detail" id="currency_strings/3">
|
||||
@ -862,9 +862,9 @@ The default is <code class="inline">:all</code>. See <a href="https://hexdocs.pm
|
||||
</a>
|
||||
<span class="text">Example</span>
|
||||
</h2>
|
||||
<pre><code class="makeup elixir" translate="no"><span class="nc">MyApp.Cldr.Currency</span><span class="o">.</span><span class="n">currency_strings</span><span class="p" data-group-id="7941913947-1">(</span><span class="s">"en"</span><span class="p" data-group-id="7941913947-1">)</span><span class="w">
|
||||
</span><span class="p">=></span><span class="w"> </span><span class="p" data-group-id="7941913947-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="7941913947-3">%{</span><span class="w">
|
||||
<pre><code class="makeup elixir" translate="no"><span class="nc">MyApp.Cldr.Currency</span><span class="o">.</span><span class="n">currency_strings</span><span class="p" data-group-id="5077983028-1">(</span><span class="s">"en"</span><span class="p" data-group-id="5077983028-1">)</span><span class="w">
|
||||
</span><span class="p">=></span><span class="w"> </span><span class="p" data-group-id="5077983028-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="5077983028-3">%{</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">"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">
|
||||
@ -874,7 +874,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">"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="p" data-group-id="7941913947-3">}</span><span class="p" data-group-id="7941913947-2">}</span></code></pre>
|
||||
</span><span class="p" data-group-id="5077983028-3">}</span><span class="p" data-group-id="5077983028-2">}</span></code></pre>
|
||||
</section>
|
||||
</section>
|
||||
<section class="detail" id="currency_strings!/3">
|
||||
@ -933,8 +933,8 @@ The default is <code class="inline">:all</code>. See <a href="https://hexdocs.pm
|
||||
</a>
|
||||
<span class="text">Example</span>
|
||||
</h2>
|
||||
<pre><code class="makeup elixir" translate="no"><span class="nc">MyApp.Cldr.Currency</span><span class="o">.</span><span class="n">currency_strings!</span><span class="p" data-group-id="1830954561-1">(</span><span class="s">"en"</span><span class="p" data-group-id="1830954561-1">)</span><span class="w">
|
||||
</span><span class="p">=></span><span class="w"> </span><span class="p" data-group-id="1830954561-2">%{</span><span class="w">
|
||||
<pre><code class="makeup elixir" translate="no"><span class="nc">MyApp.Cldr.Currency</span><span class="o">.</span><span class="n">currency_strings!</span><span class="p" data-group-id="4905122818-1">(</span><span class="s">"en"</span><span class="p" data-group-id="4905122818-1">)</span><span class="w">
|
||||
</span><span class="p">=></span><span class="w"> </span><span class="p" data-group-id="4905122818-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">"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">
|
||||
@ -944,7 +944,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">"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="p" data-group-id="1830954561-2">}</span></code></pre>
|
||||
</span><span class="p" data-group-id="4905122818-2">}</span></code></pre>
|
||||
</section>
|
||||
</section>
|
||||
<section class="detail" id="current_currency_from_locale/1">
|
||||
@ -982,10 +982,10 @@ or a <a href="https://hexdocs.pm/ex_cldr/2.39.2/Cldr.LanguageTag.html"><code cla
|
||||
</a>
|
||||
<span class="text">Example</span>
|
||||
</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">current_currency_from_locale</span><span class="p" data-group-id="1036899995-1">(</span><span class="s">"en"</span><span class="p" data-group-id="1036899995-1">)</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">current_currency_from_locale</span><span class="p" data-group-id="5933244719-1">(</span><span class="s">"en"</span><span class="p" data-group-id="5933244719-1">)</span><span class="w">
|
||||
</span><span class="ss">:USD</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">current_currency_from_locale</span><span class="p" data-group-id="1036899995-2">(</span><span class="s">"en-AU"</span><span class="p" data-group-id="1036899995-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">current_currency_from_locale</span><span class="p" data-group-id="5933244719-2">(</span><span class="s">"en-AU"</span><span class="p" data-group-id="5933244719-2">)</span><span class="w">
|
||||
</span><span class="ss">:AUD</span></code></pre>
|
||||
</section>
|
||||
</section>
|
||||
@ -1033,7 +1033,7 @@ mapping is returned for that territory.</p><h2 id="current_territory_currencies/
|
||||
</a>
|
||||
<span class="text">Example</span>
|
||||
</h2>
|
||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </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="7311366418-1">(</span><span class="p" data-group-id="7311366418-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="9853366983-1">(</span><span class="p" data-group-id="9853366983-1">)</span></code></pre>
|
||||
</section>
|
||||
</section>
|
||||
<section class="detail" id="known_currencies/0">
|
||||
@ -1125,11 +1125,11 @@ currency code</li></ul><h2 id="known_currency_code/1-returns" class="section-hea
|
||||
</a>
|
||||
<span class="text">Examples</span>
|
||||
</h2>
|
||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr.Currency</span><span class="o">.</span><span class="n">known_currency_code</span><span class="p" data-group-id="1410357326-1">(</span><span class="s">"AUD"</span><span class="p" data-group-id="1410357326-1">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="1410357326-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="ss">:AUD</span><span class="p" data-group-id="1410357326-2">}</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="p" data-group-id="9462906178-1">(</span><span class="s">"AUD"</span><span class="p" data-group-id="9462906178-1">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="9462906178-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="ss">:AUD</span><span class="p" data-group-id="9462906178-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">known_currency_code</span><span class="p" data-group-id="1410357326-3">(</span><span class="s">"GGG"</span><span class="p" data-group-id="1410357326-3">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="1410357326-4">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1410357326-5">{</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="1410357326-5">}</span><span class="p" data-group-id="1410357326-4">}</span></code></pre>
|
||||
</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="p" data-group-id="9462906178-3">(</span><span class="s">"GGG"</span><span class="p" data-group-id="9462906178-3">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="9462906178-4">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="9462906178-5">{</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="9462906178-5">}</span><span class="p" data-group-id="9462906178-4">}</span></code></pre>
|
||||
</section>
|
||||
</section>
|
||||
<section class="detail" id="known_currency_code?/1">
|
||||
@ -1176,13 +1176,13 @@ currency code</li></ul><h2 id="known_currency_code?/1-returns" class="section-he
|
||||
</a>
|
||||
<span class="text">Examples</span>
|
||||
</h2>
|
||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr.Currency</span><span class="o">.</span><span class="n">known_currency_code?</span><span class="p" data-group-id="9364801163-1">(</span><span class="s">"AUD"</span><span class="p" data-group-id="9364801163-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">known_currency_code?</span><span class="p" data-group-id="5067155989-1">(</span><span class="s">"AUD"</span><span class="p" data-group-id="5067155989-1">)</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.Currency</span><span class="o">.</span><span class="n">known_currency_code?</span><span class="p" data-group-id="9364801163-2">(</span><span class="s">"GGG"</span><span class="p" data-group-id="9364801163-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">known_currency_code?</span><span class="p" data-group-id="5067155989-2">(</span><span class="s">"GGG"</span><span class="p" data-group-id="5067155989-2">)</span><span class="w">
|
||||
</span><span class="no">false</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="p" data-group-id="9364801163-3">(</span><span class="ss">:XCV</span><span class="p" data-group-id="9364801163-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">known_currency_code?</span><span class="p" data-group-id="5067155989-3">(</span><span class="ss">:XCV</span><span class="p" data-group-id="5067155989-3">)</span><span class="w">
|
||||
</span><span class="no">false</span></code></pre>
|
||||
</section>
|
||||
</section>
|
||||
@ -1217,7 +1217,7 @@ currency code</li></ul><h2 id="known_currency_code?/1-returns" class="section-he
|
||||
</a>
|
||||
<span class="text">Example</span>
|
||||
</h2>
|
||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr.Currency</span><span class="o">.</span><span class="n">known_currency_codes</span><span class="p" data-group-id="5547480495-1">(</span><span class="p" data-group-id="5547480495-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">known_currency_codes</span><span class="p" data-group-id="6595591221-1">(</span><span class="p" data-group-id="6595591221-1">)</span></code></pre>
|
||||
</section>
|
||||
</section>
|
||||
<section class="detail" id="new/2">
|
||||
@ -1276,14 +1276,14 @@ such as <code class="inline">0.05</code>. Optional.</li></ul><h2 id="new/2-retur
|
||||
</a>
|
||||
<span class="text">Example</span>
|
||||
</h2>
|
||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr.Currency</span><span class="o">.</span><span class="n">new</span><span class="p" data-group-id="5254892028-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="5254892028-1">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="5254892028-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="5254892028-3">%</span><span class="nc" data-group-id="5254892028-3">Cldr.Currency</span><span class="p" data-group-id="5254892028-3">{</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="8018747173-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="8018747173-1">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="8018747173-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="8018747173-3">%</span><span class="nc" data-group-id="8018747173-3">Cldr.Currency</span><span class="p" data-group-id="8018747173-3">{</span><span class="w">
|
||||
</span><span class="ss">alt_code</span><span class="p">:</span><span class="w"> </span><span class="ss">:XAE</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">cash_digits</span><span class="p">:</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">cash_rounding</span><span class="p">:</span><span class="w"> </span><span class="no">nil</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">code</span><span class="p">:</span><span class="w"> </span><span class="ss">:XAE</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">count</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="5254892028-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="5254892028-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="8018747173-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="8018747173-4">}</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">digits</span><span class="p">:</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">from</span><span class="p">:</span><span class="w"> </span><span class="no">nil</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">iso_digits</span><span class="p">:</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w">
|
||||
@ -1293,11 +1293,11 @@ such as <code class="inline">0.05</code>. Optional.</li></ul><h2 id="new/2-retur
|
||||
</span><span class="ss">symbol</span><span class="p">:</span><span class="w"> </span><span class="s">"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">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="5254892028-3">}</span><span class="p" data-group-id="5254892028-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="5254892028-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="5254892028-5">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="5254892028-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="5254892028-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="5254892028-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="5254892028-7">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="5254892028-8">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="5254892028-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="5254892028-9">}</span><span class="p" data-group-id="5254892028-8">}</span></code></pre>
|
||||
</span><span class="p" data-group-id="8018747173-3">}</span><span class="p" data-group-id="8018747173-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="8018747173-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="8018747173-5">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="8018747173-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="8018747173-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="8018747173-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="8018747173-7">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="8018747173-8">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="8018747173-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="8018747173-9">}</span><span class="p" data-group-id="8018747173-8">}</span></code></pre>
|
||||
</section>
|
||||
</section>
|
||||
<section class="detail" id="pluralize/3">
|
||||
@ -1355,20 +1355,20 @@ default is <a href="Plausible.Cldr.html#get_locale/0"><code class="inline">Plaus
|
||||
</a>
|
||||
<span class="text">Examples</span>
|
||||
</h2>
|
||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr.Currency</span><span class="o">.</span><span class="n">pluralize</span><span class="p" data-group-id="9795299947-1">(</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="ss">:USD</span><span class="p" data-group-id="9795299947-1">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="9795299947-2">{</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="9795299947-2">}</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="p" data-group-id="8270107878-1">(</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="ss">:USD</span><span class="p" data-group-id="8270107878-1">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="8270107878-2">{</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="8270107878-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="p" data-group-id="9795299947-3">(</span><span class="mi">3</span><span class="p">,</span><span class="w"> </span><span class="ss">:USD</span><span class="p" data-group-id="9795299947-3">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="9795299947-4">{</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="9795299947-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="p" data-group-id="8270107878-3">(</span><span class="mi">3</span><span class="p">,</span><span class="w"> </span><span class="ss">:USD</span><span class="p" data-group-id="8270107878-3">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="8270107878-4">{</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="8270107878-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="p" data-group-id="9795299947-5">(</span><span class="mi">12</span><span class="p">,</span><span class="w"> </span><span class="ss">:USD</span><span class="p">,</span><span class="w"> </span><span class="ss">locale</span><span class="p">:</span><span class="w"> </span><span class="s">"zh"</span><span class="p" data-group-id="9795299947-5">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="9795299947-6">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">"美元"</span><span class="p" data-group-id="9795299947-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">pluralize</span><span class="p" data-group-id="8270107878-5">(</span><span class="mi">12</span><span class="p">,</span><span class="w"> </span><span class="ss">:USD</span><span class="p">,</span><span class="w"> </span><span class="ss">locale</span><span class="p">:</span><span class="w"> </span><span class="s">"zh"</span><span class="p" data-group-id="8270107878-5">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="8270107878-6">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">"美元"</span><span class="p" data-group-id="8270107878-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">pluralize</span><span class="p" data-group-id="9795299947-7">(</span><span class="mi">12</span><span class="p">,</span><span class="w"> </span><span class="ss">:USD</span><span class="p">,</span><span class="w"> </span><span class="ss">locale</span><span class="p">:</span><span class="w"> </span><span class="s">"fr"</span><span class="p" data-group-id="9795299947-7">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="9795299947-8">{</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="9795299947-8">}</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="p" data-group-id="8270107878-7">(</span><span class="mi">12</span><span class="p">,</span><span class="w"> </span><span class="ss">:USD</span><span class="p">,</span><span class="w"> </span><span class="ss">locale</span><span class="p">:</span><span class="w"> </span><span class="s">"fr"</span><span class="p" data-group-id="8270107878-7">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="8270107878-8">{</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="8270107878-8">}</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="p" data-group-id="9795299947-9">(</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="ss">:USD</span><span class="p">,</span><span class="w"> </span><span class="ss">locale</span><span class="p">:</span><span class="w"> </span><span class="s">"fr"</span><span class="p" data-group-id="9795299947-9">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="9795299947-10">{</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="9795299947-10">}</span></code></pre>
|
||||
</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="p" data-group-id="8270107878-9">(</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="ss">:USD</span><span class="p">,</span><span class="w"> </span><span class="ss">locale</span><span class="p">:</span><span class="w"> </span><span class="s">"fr"</span><span class="p" data-group-id="8270107878-9">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="8270107878-10">{</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="8270107878-10">}</span></code></pre>
|
||||
</section>
|
||||
</section>
|
||||
<section class="detail" id="strings_for_currency/2">
|
||||
@ -1410,8 +1410,8 @@ or a <a href="https://hexdocs.pm/ex_cldr/2.39.2/Cldr.LanguageTag.html"><code cla
|
||||
</a>
|
||||
<span class="text">Example</span>
|
||||
</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="p" data-group-id="4227909658-1">(</span><span class="s">"en"</span><span class="p" data-group-id="4227909658-1">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="4227909658-2">[</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="4227909658-2">]</span></code></pre>
|
||||
<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="p" data-group-id="8595632277-1">(</span><span class="s">"en"</span><span class="p" data-group-id="8595632277-1">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="8595632277-2">[</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="8595632277-2">]</span></code></pre>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
@ -326,16 +326,16 @@ this specific locale..</p><h2 id="fallback_locale_names/1-arguments" class="sect
|
||||
</a>
|
||||
<span class="text">Examples</span>
|
||||
</h2>
|
||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </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="6031682158-1">(</span><span class="ss">:"fr-CA"</span><span class="p" data-group-id="6031682158-1">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="6031682158-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="6031682158-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="6031682158-3">]</span><span class="p" data-group-id="6031682158-2">}</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="1845667450-1">(</span><span class="ss">:"fr-CA"</span><span class="p" data-group-id="1845667450-1">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="1845667450-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1845667450-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="1845667450-3">]</span><span class="p" data-group-id="1845667450-2">}</span><span class="w">
|
||||
|
||||
</span><span class="c1"># Fallbacks are typically formed by progressively</span><span class="w">
|
||||
</span><span class="c1"># stripping variant, territory and script from the</span><span class="w">
|
||||
</span><span class="c1"># given locale name. But not always - there are</span><span class="w">
|
||||
</span><span class="c1"># certain fallbacks that take a different path.</span><span class="w">
|
||||
|
||||
</span><span class="gp unselectable">iex> </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="6031682158-4">(</span><span class="ss">:nb</span><span class="p" data-group-id="6031682158-4">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="6031682158-5">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="6031682158-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="6031682158-6">]</span><span class="p" data-group-id="6031682158-5">}</span></code></pre>
|
||||
</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="1845667450-4">(</span><span class="ss">:nb</span><span class="p" data-group-id="1845667450-4">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="1845667450-5">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1845667450-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="1845667450-6">]</span><span class="p" data-group-id="1845667450-5">}</span></code></pre>
|
||||
</section>
|
||||
</section>
|
||||
<section class="detail" id="fallback_locales/1">
|
||||
@ -389,20 +389,20 @@ this specific locale.</p><h2 id="fallback_locales/1-arguments" class="section-he
|
||||
</a>
|
||||
<span class="text">Examples</span>
|
||||
</h2>
|
||||
<pre><code class="makeup elixir" translate="no"><span class="nc">Plausible.Cldr.Locale</span><span class="o">.</span><span class="n">fallback_locales</span><span class="p" data-group-id="7642748727-1">(</span><span class="ss">:"fr-CA"</span><span class="p" data-group-id="7642748727-1">)</span><span class="w">
|
||||
</span><span class="p">=></span><span class="w"> </span><span class="p" data-group-id="7642748727-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="7642748727-3">[</span><span class="p" data-group-id="7642748727-4">#</span><span class="nc" data-group-id="7642748727-4">Cldr.LanguageTag</span><span class="p" data-group-id="7642748727-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="7642748727-5">[</span><span class="n">validated</span><span class="p" data-group-id="7642748727-5">]</span><span class="p" data-group-id="7642748727-4">></span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="7642748727-6">#</span><span class="nc" data-group-id="7642748727-6">Cldr.LanguageTag</span><span class="p" data-group-id="7642748727-6"><</span><span class="n">fr</span><span class="w"> </span><span class="p" data-group-id="7642748727-7">[</span><span class="n">validated</span><span class="p" data-group-id="7642748727-7">]</span><span class="p" data-group-id="7642748727-6">></span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="7642748727-8">#</span><span class="nc" data-group-id="7642748727-8">Cldr.LanguageTag</span><span class="p" data-group-id="7642748727-8"><</span><span class="n">und</span><span class="w"> </span><span class="p" data-group-id="7642748727-9">[</span><span class="n">validated</span><span class="p" data-group-id="7642748727-9">]</span><span class="p" data-group-id="7642748727-8">></span><span class="p" data-group-id="7642748727-3">]</span><span class="p" data-group-id="7642748727-2">}</span><span class="w">
|
||||
<pre><code class="makeup elixir" translate="no"><span class="nc">Plausible.Cldr.Locale</span><span class="o">.</span><span class="n">fallback_locales</span><span class="p" data-group-id="1213089127-1">(</span><span class="ss">:"fr-CA"</span><span class="p" data-group-id="1213089127-1">)</span><span class="w">
|
||||
</span><span class="p">=></span><span class="w"> </span><span class="p" data-group-id="1213089127-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="1213089127-3">[</span><span class="p" data-group-id="1213089127-4">#</span><span class="nc" data-group-id="1213089127-4">Cldr.LanguageTag</span><span class="p" data-group-id="1213089127-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="1213089127-5">[</span><span class="n">validated</span><span class="p" data-group-id="1213089127-5">]</span><span class="p" data-group-id="1213089127-4">></span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1213089127-6">#</span><span class="nc" data-group-id="1213089127-6">Cldr.LanguageTag</span><span class="p" data-group-id="1213089127-6"><</span><span class="n">fr</span><span class="w"> </span><span class="p" data-group-id="1213089127-7">[</span><span class="n">validated</span><span class="p" data-group-id="1213089127-7">]</span><span class="p" data-group-id="1213089127-6">></span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="1213089127-8">#</span><span class="nc" data-group-id="1213089127-8">Cldr.LanguageTag</span><span class="p" data-group-id="1213089127-8"><</span><span class="n">und</span><span class="w"> </span><span class="p" data-group-id="1213089127-9">[</span><span class="n">validated</span><span class="p" data-group-id="1213089127-9">]</span><span class="p" data-group-id="1213089127-8">></span><span class="p" data-group-id="1213089127-3">]</span><span class="p" data-group-id="1213089127-2">}</span><span class="w">
|
||||
|
||||
</span><span class="c1"># Fallbacks are typically formed by progressively</span><span class="w">
|
||||
</span><span class="c1"># stripping variant, territory and script from the</span><span class="w">
|
||||
</span><span class="c1"># given locale name. But not always - there are</span><span class="w">
|
||||
</span><span class="c1"># certain fallbacks that take a different path.</span><span class="w">
|
||||
|
||||
</span><span class="nc">Plausible.Cldr.Locale</span><span class="o">.</span><span class="n">fallback_locales</span><span class="p" data-group-id="7642748727-10">(</span><span class="ss">:nb</span><span class="p" data-group-id="7642748727-10">)</span><span class="p">)</span><span class="w">
|
||||
</span><span class="p">=></span><span class="w"> </span><span class="p" data-group-id="7642748727-11">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="7642748727-12">[</span><span class="p" data-group-id="7642748727-13">#</span><span class="nc" data-group-id="7642748727-13">Cldr.LanguageTag</span><span class="p" data-group-id="7642748727-13"><</span><span class="n">nb</span><span class="w"> </span><span class="p" data-group-id="7642748727-14">[</span><span class="n">validated</span><span class="p" data-group-id="7642748727-14">]</span><span class="p" data-group-id="7642748727-13">></span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="7642748727-15">#</span><span class="nc" data-group-id="7642748727-15">Cldr.LanguageTag</span><span class="p" data-group-id="7642748727-15"><</span><span class="n">no</span><span class="w"> </span><span class="p" data-group-id="7642748727-16">[</span><span class="n">validated</span><span class="p" data-group-id="7642748727-16">]</span><span class="p" data-group-id="7642748727-15">></span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="7642748727-17">#</span><span class="nc" data-group-id="7642748727-17">Cldr.LanguageTag</span><span class="p" data-group-id="7642748727-17"><</span><span class="n">und</span><span class="w"> </span><span class="p" data-group-id="7642748727-18">[</span><span class="n">validated</span><span class="p" data-group-id="7642748727-18">]</span><span class="p" data-group-id="7642748727-17">></span><span class="p" data-group-id="7642748727-12">]</span><span class="p" data-group-id="7642748727-11">}</span></code></pre>
|
||||
</span><span class="nc">Plausible.Cldr.Locale</span><span class="o">.</span><span class="n">fallback_locales</span><span class="p" data-group-id="1213089127-10">(</span><span class="ss">:nb</span><span class="p" data-group-id="1213089127-10">)</span><span class="p">)</span><span class="w">
|
||||
</span><span class="p">=></span><span class="w"> </span><span class="p" data-group-id="1213089127-11">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="1213089127-12">[</span><span class="p" data-group-id="1213089127-13">#</span><span class="nc" data-group-id="1213089127-13">Cldr.LanguageTag</span><span class="p" data-group-id="1213089127-13"><</span><span class="n">nb</span><span class="w"> </span><span class="p" data-group-id="1213089127-14">[</span><span class="n">validated</span><span class="p" data-group-id="1213089127-14">]</span><span class="p" data-group-id="1213089127-13">></span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1213089127-15">#</span><span class="nc" data-group-id="1213089127-15">Cldr.LanguageTag</span><span class="p" data-group-id="1213089127-15"><</span><span class="n">no</span><span class="w"> </span><span class="p" data-group-id="1213089127-16">[</span><span class="n">validated</span><span class="p" data-group-id="1213089127-16">]</span><span class="p" data-group-id="1213089127-15">></span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="1213089127-17">#</span><span class="nc" data-group-id="1213089127-17">Cldr.LanguageTag</span><span class="p" data-group-id="1213089127-17"><</span><span class="n">und</span><span class="w"> </span><span class="p" data-group-id="1213089127-18">[</span><span class="n">validated</span><span class="p" data-group-id="1213089127-18">]</span><span class="p" data-group-id="1213089127-17">></span><span class="p" data-group-id="1213089127-12">]</span><span class="p" data-group-id="1213089127-11">}</span></code></pre>
|
||||
</section>
|
||||
</section>
|
||||
<section class="detail" id="locale_for_territory/1">
|
||||
@ -533,15 +533,15 @@ generic top-level domain names.</p><h2 id="locale_from_host/2-examples" class="s
|
||||
<span class="text">Examples</span>
|
||||
</h2>
|
||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </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="8111855195-1">(</span><span class="ss">:"en-AU"</span><span class="p" data-group-id="8111855195-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="3226714082-1">(</span><span class="ss">:"en-AU"</span><span class="p" data-group-id="3226714082-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="8111855195-2">(</span><span class="s">"a.b.com.tv"</span><span class="p" data-group-id="8111855195-2">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="8111855195-3">{</span><span class="ss">:error</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="8111855195-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="8111855195-4">}</span><span class="p" data-group-id="8111855195-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="3226714082-2">(</span><span class="s">"a.b.com.tv"</span><span class="p" data-group-id="3226714082-2">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="3226714082-3">{</span><span class="ss">:error</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="3226714082-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="3226714082-4">}</span><span class="p" data-group-id="3226714082-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="8111855195-5">(</span><span class="s">"a.b.com"</span><span class="p" data-group-id="8111855195-5">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="8111855195-6">{</span><span class="ss">:error</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="8111855195-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="8111855195-7">}</span><span class="p" data-group-id="8111855195-6">}</span></code></pre>
|
||||
</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="3226714082-5">(</span><span class="s">"a.b.com"</span><span class="p" data-group-id="3226714082-5">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="3226714082-6">{</span><span class="ss">:error</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="3226714082-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="3226714082-7">}</span><span class="p" data-group-id="3226714082-6">}</span></code></pre>
|
||||
</section>
|
||||
</section>
|
||||
<section class="detail" id="new/1">
|
||||
@ -683,12 +683,12 @@ be a territory.</p><h2 id="territory_from_host/1-arguments" class="section-headi
|
||||
</a>
|
||||
<span class="text">Examples</span>
|
||||
</h2>
|
||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </span><span class="nc">Cldr.Locale</span><span class="o">.</span><span class="n">territory_from_host</span><span class="p" data-group-id="1011992086-1">(</span><span class="s">"a.b.com.au"</span><span class="p" data-group-id="1011992086-1">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="1011992086-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="1011992086-2">}</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="4697793221-1">(</span><span class="s">"a.b.com.au"</span><span class="p" data-group-id="4697793221-1">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="4697793221-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="4697793221-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="1011992086-3">(</span><span class="s">"a.b.com"</span><span class="p" data-group-id="1011992086-3">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="1011992086-4">{</span><span class="ss">:error</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="1011992086-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="1011992086-5">}</span><span class="p" data-group-id="1011992086-4">}</span></code></pre>
|
||||
</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="4697793221-3">(</span><span class="s">"a.b.com"</span><span class="p" data-group-id="4697793221-3">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="4697793221-4">{</span><span class="ss">:error</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="4697793221-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="4697793221-5">}</span><span class="p" data-group-id="4697793221-4">}</span></code></pre>
|
||||
</section>
|
||||
</section>
|
||||
<section class="detail" id="territory_from_locale/1">
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
@ -461,31 +461,31 @@ The valid substitution keys are <code class="inline">:zero</code>, <code class="
|
||||
</a>
|
||||
<span class="text">Examples</span>
|
||||
</h2>
|
||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </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="8913834075-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="8913834075-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="1471382641-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="1471382641-1">}</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="8913834075-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="8913834075-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="1471382641-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="1471382641-2">}</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="8913834075-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="8913834075-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="1471382641-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="1471382641-3">}</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="8913834075-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="8913834075-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="1471382641-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="1471382641-4">}</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="8913834075-5">(</span><span class="mi">1</span><span class="p" data-group-id="8913834075-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="8913834075-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="8913834075-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="1471382641-5">(</span><span class="mi">1</span><span class="p" data-group-id="1471382641-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="1471382641-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="1471382641-6">}</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="8913834075-7">(</span><span class="mi">2</span><span class="p" data-group-id="8913834075-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="8913834075-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="8913834075-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="1471382641-7">(</span><span class="mi">2</span><span class="p" data-group-id="1471382641-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="1471382641-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="1471382641-8">}</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="8913834075-9">(</span><span class="mi">2</span><span class="p" data-group-id="8913834075-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="8913834075-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="8913834075-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="1471382641-9">(</span><span class="mi">2</span><span class="p" data-group-id="1471382641-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="1471382641-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="1471382641-10">}</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="8913834075-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="8913834075-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="1471382641-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="1471382641-11">}</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="8913834075-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="8913834075-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="1471382641-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="1471382641-12">}</span><span class="w">
|
||||
</span><span class="s">"other"</span></code></pre>
|
||||
</section>
|
||||
</section>
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
@ -465,7 +465,7 @@ to precompile all the known formats at compile time.</p><h2 id="decimal_format_l
|
||||
<span class="text">Example</span>
|
||||
</h2>
|
||||
<pre><code class="makeup elixir" translate="no"><span class="c1">#=> Plausible.Cldr.Number.Format.Format.decimal_format_list</span><span class="w">
|
||||
</span><span class="p" data-group-id="6390118122-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="5816057081-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%"</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">
|
||||
@ -475,7 +475,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 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 Tr ¤"</span><span class="p">,</span><span class="w"> </span><span class="n">...</span><span class="p" data-group-id="6390118122-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="5816057081-1">]</span></code></pre>
|
||||
</section>
|
||||
</section>
|
||||
<section class="detail" id="decimal_format_list_for/1">
|
||||
@ -523,8 +523,8 @@ the known formats at compile time. Its use is not otherwise recommended.</p><h2
|
||||
</a>
|
||||
<span class="text">Example</span>
|
||||
</h2>
|
||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </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="5761625400-1">(</span><span class="ss">:en</span><span class="p" data-group-id="5761625400-1">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="5761625400-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="5761625400-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">
|
||||
<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="5037780375-1">(</span><span class="ss">:en</span><span class="p" data-group-id="5037780375-1">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="5037780375-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="5037780375-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 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">
|
||||
@ -532,7 +532,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">"¤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">"¤ 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="5761625400-3">]</span><span class="p" data-group-id="5761625400-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="5037780375-3">]</span><span class="p" data-group-id="5037780375-2">}</span></code></pre>
|
||||
</section>
|
||||
</section>
|
||||
<section class="detail" id="default_grouping_for/1">
|
||||
@ -585,8 +585,8 @@ is <a href="Plausible.Cldr.html#get_locale/0"><code class="inline">Plausible.Cld
|
||||
</a>
|
||||
<span class="text">Examples</span>
|
||||
</h2>
|
||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </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="6565509890-1">(</span><span class="ss">:en</span><span class="p" data-group-id="6565509890-1">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="6565509890-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="6565509890-3">%{</span><span class="ss">fraction</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="6565509890-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="6565509890-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="6565509890-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="6565509890-5">}</span><span class="p" data-group-id="6565509890-3">}</span><span class="p" data-group-id="6565509890-2">}</span></code></pre>
|
||||
<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="5239839175-1">(</span><span class="ss">:en</span><span class="p" data-group-id="5239839175-1">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="5239839175-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="5239839175-3">%{</span><span class="ss">fraction</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="5239839175-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="5239839175-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="5239839175-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="5239839175-5">}</span><span class="p" data-group-id="5239839175-3">}</span><span class="p" data-group-id="5239839175-2">}</span></code></pre>
|
||||
</section>
|
||||
</section>
|
||||
<section class="detail" id="default_grouping_for!/1">
|
||||
@ -642,8 +642,8 @@ is <a href="Plausible.Cldr.html#get_locale/0"><code class="inline">Plausible.Cld
|
||||
</a>
|
||||
<span class="text">Examples</span>
|
||||
</h2>
|
||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </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="3415904960-1">(</span><span class="ss">:en</span><span class="p" data-group-id="3415904960-1">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="3415904960-2">%{</span><span class="ss">fraction</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="3415904960-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="3415904960-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="3415904960-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="3415904960-4">}</span><span class="p" data-group-id="3415904960-2">}</span></code></pre>
|
||||
<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="9395769078-1">(</span><span class="ss">:en</span><span class="p" data-group-id="9395769078-1">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="9395769078-2">%{</span><span class="ss">fraction</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="9395769078-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="9395769078-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="9395769078-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="9395769078-4">}</span><span class="p" data-group-id="9395769078-2">}</span></code></pre>
|
||||
</section>
|
||||
</section>
|
||||
<section class="detail" id="formats_for/2">
|
||||
@ -700,18 +700,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">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">currency_short</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="9343258447-1">[</span><span class="p" data-group-id="9343258447-2">{</span><span class="s">"1000"</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="9343258447-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="9343258447-3">]</span><span class="p" data-group-id="9343258447-2">}</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="9343258447-4">{</span><span class="s">"10000"</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="9343258447-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="9343258447-5">]</span><span class="p" data-group-id="9343258447-4">}</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="9343258447-6">{</span><span class="s">"100000"</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="9343258447-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="9343258447-7">]</span><span class="p" data-group-id="9343258447-6">}</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="9343258447-8">{</span><span class="s">"1000000"</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="9343258447-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="9343258447-9">]</span><span class="p" data-group-id="9343258447-8">}</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="9343258447-10">{</span><span class="s">"10000000"</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="9343258447-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="9343258447-11">]</span><span class="p" data-group-id="9343258447-10">}</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="9343258447-12">{</span><span class="s">"100000000"</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="9343258447-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="9343258447-13">]</span><span class="p" data-group-id="9343258447-12">}</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="9343258447-14">{</span><span class="s">"1000000000"</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="9343258447-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="9343258447-15">]</span><span class="p" data-group-id="9343258447-14">}</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="9343258447-16">{</span><span class="s">"10000000000"</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="9343258447-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="9343258447-17">]</span><span class="p" data-group-id="9343258447-16">}</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="9343258447-18">{</span><span class="s">"100000000000"</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="9343258447-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="9343258447-19">]</span><span class="p" data-group-id="9343258447-18">}</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="9343258447-20">{</span><span class="s">"1000000000000"</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="9343258447-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="9343258447-21">]</span><span class="p" data-group-id="9343258447-20">}</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="9343258447-22">{</span><span class="s">"10000000000000"</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="9343258447-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="9343258447-23">]</span><span class="p" data-group-id="9343258447-22">}</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="9343258447-24">{</span><span class="s">"100000000000000"</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="9343258447-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="9343258447-25">]</span><span class="p" data-group-id="9343258447-24">}</span><span class="p" data-group-id="9343258447-1">]</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">currency_short</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="1636915263-1">[</span><span class="p" data-group-id="1636915263-2">{</span><span class="s">"1000"</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1636915263-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="1636915263-3">]</span><span class="p" data-group-id="1636915263-2">}</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="1636915263-4">{</span><span class="s">"10000"</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1636915263-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="1636915263-5">]</span><span class="p" data-group-id="1636915263-4">}</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="1636915263-6">{</span><span class="s">"100000"</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1636915263-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="1636915263-7">]</span><span class="p" data-group-id="1636915263-6">}</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="1636915263-8">{</span><span class="s">"1000000"</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1636915263-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="1636915263-9">]</span><span class="p" data-group-id="1636915263-8">}</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="1636915263-10">{</span><span class="s">"10000000"</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1636915263-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="1636915263-11">]</span><span class="p" data-group-id="1636915263-10">}</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="1636915263-12">{</span><span class="s">"100000000"</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1636915263-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="1636915263-13">]</span><span class="p" data-group-id="1636915263-12">}</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="1636915263-14">{</span><span class="s">"1000000000"</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1636915263-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="1636915263-15">]</span><span class="p" data-group-id="1636915263-14">}</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="1636915263-16">{</span><span class="s">"10000000000"</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1636915263-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="1636915263-17">]</span><span class="p" data-group-id="1636915263-16">}</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="1636915263-18">{</span><span class="s">"100000000000"</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1636915263-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="1636915263-19">]</span><span class="p" data-group-id="1636915263-18">}</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="1636915263-20">{</span><span class="s">"1000000000000"</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1636915263-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="1636915263-21">]</span><span class="p" data-group-id="1636915263-20">}</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="1636915263-22">{</span><span class="s">"10000000000000"</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1636915263-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="1636915263-23">]</span><span class="p" data-group-id="1636915263-22">}</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="1636915263-24">{</span><span class="s">"100000000000000"</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1636915263-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="1636915263-25">]</span><span class="p" data-group-id="1636915263-24">}</span><span class="p" data-group-id="1636915263-1">]</span><span class="p">,</span><span class="w">
|
||||
</span><span class="n">...</span><span class="w">
|
||||
</span><span class="err">}</span></code></pre>
|
||||
</section>
|
||||
@ -802,8 +802,8 @@ is <a href="Plausible.Cldr.html#get_locale/0"><code class="inline">Plausible.Cld
|
||||
</a>
|
||||
<span class="text">Examples</span>
|
||||
</h2>
|
||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </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="9606643179-1">(</span><span class="s">"en"</span><span class="p" data-group-id="9606643179-1">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="9606643179-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="9606643179-2">}</span></code></pre>
|
||||
<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="1046701995-1">(</span><span class="s">"en"</span><span class="p" data-group-id="1046701995-1">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="1046701995-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="1046701995-2">}</span></code></pre>
|
||||
</section>
|
||||
</section>
|
||||
<section class="detail" id="minimum_grouping_digits_for!/1">
|
||||
@ -855,7 +855,7 @@ is <a href="Plausible.Cldr.html#get_locale/0"><code class="inline">Plausible.Cld
|
||||
</a>
|
||||
<span class="text">Examples</span>
|
||||
</h2>
|
||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </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="5939195623-1">(</span><span class="s">"en"</span><span class="p" data-group-id="5939195623-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="8222180921-1">(</span><span class="s">"en"</span><span class="p" data-group-id="8222180921-1">)</span><span class="w">
|
||||
</span><span class="mi">1</span></code></pre>
|
||||
</section>
|
||||
</section>
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
@ -464,31 +464,31 @@ The valid substitution keys are <code class="inline">:zero</code>, <code class="
|
||||
</a>
|
||||
<span class="text">Examples</span>
|
||||
</h2>
|
||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </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="3486243937-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="3486243937-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="7889279806-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="7889279806-1">}</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="3486243937-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="3486243937-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="7889279806-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="7889279806-2">}</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="3486243937-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="3486243937-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="7889279806-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="7889279806-3">}</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="3486243937-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="3486243937-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="7889279806-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="7889279806-4">}</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="3486243937-5">(</span><span class="mi">1</span><span class="p" data-group-id="3486243937-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="3486243937-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="3486243937-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="7889279806-5">(</span><span class="mi">1</span><span class="p" data-group-id="7889279806-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="7889279806-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="7889279806-6">}</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="3486243937-7">(</span><span class="mi">2</span><span class="p" data-group-id="3486243937-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="3486243937-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="3486243937-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="7889279806-7">(</span><span class="mi">2</span><span class="p" data-group-id="7889279806-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="7889279806-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="7889279806-8">}</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="3486243937-9">(</span><span class="mi">2</span><span class="p" data-group-id="3486243937-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="3486243937-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="3486243937-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="7889279806-9">(</span><span class="mi">2</span><span class="p" data-group-id="7889279806-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="7889279806-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="7889279806-10">}</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="3486243937-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="3486243937-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="7889279806-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="7889279806-11">}</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="3486243937-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="3486243937-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="7889279806-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="7889279806-12">}</span><span class="w">
|
||||
</span><span class="s">"other"</span></code></pre>
|
||||
</section>
|
||||
</section>
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
@ -378,9 +378,9 @@ is <a href="Plausible.Cldr.html#get_locale/0"><code class="inline">Plausible.Cld
|
||||
</a>
|
||||
<span class="text">Example:</span>
|
||||
</h2>
|
||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </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="6632454438-1">(</span><span class="ss">:th</span><span class="p" data-group-id="6632454438-1">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="6632454438-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="6632454438-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="6632454438-4">%</span><span class="nc" data-group-id="6632454438-4">Cldr.Number.Symbol</span><span class="p" data-group-id="6632454438-4">{</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="4329115791-1">(</span><span class="ss">:th</span><span class="p" data-group-id="4329115791-1">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="4329115791-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="4329115791-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="4329115791-4">%</span><span class="nc" data-group-id="4329115791-4">Cldr.Number.Symbol</span><span class="p" data-group-id="4329115791-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">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">
|
||||
@ -393,8 +393,8 @@ is <a href="Plausible.Cldr.html#get_locale/0"><code class="inline">Plausible.Cld
|
||||
</span><span class="ss">plus_sign</span><span class="p">:</span><span class="w"> </span><span class="s">"+"</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="p" data-group-id="6632454438-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="6632454438-5">%</span><span class="nc" data-group-id="6632454438-5">Cldr.Number.Symbol</span><span class="p" data-group-id="6632454438-5">{</span><span class="w">
|
||||
</span><span class="p" data-group-id="4329115791-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="4329115791-5">%</span><span class="nc" data-group-id="4329115791-5">Cldr.Number.Symbol</span><span class="p" data-group-id="4329115791-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">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">
|
||||
@ -407,8 +407,8 @@ is <a href="Plausible.Cldr.html#get_locale/0"><code class="inline">Plausible.Cld
|
||||
</span><span class="ss">plus_sign</span><span class="p">:</span><span class="w"> </span><span class="s">"+"</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="p" data-group-id="6632454438-5">}</span><span class="w">
|
||||
</span><span class="p" data-group-id="6632454438-3">}</span><span class="p" data-group-id="6632454438-2">}</span></code></pre>
|
||||
</span><span class="p" data-group-id="4329115791-5">}</span><span class="w">
|
||||
</span><span class="p" data-group-id="4329115791-3">}</span><span class="p" data-group-id="4329115791-2">}</span></code></pre>
|
||||
</section>
|
||||
</section>
|
||||
<section class="detail" id="number_symbols_for/2">
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
@ -317,23 +317,23 @@ it is returned as is.</p><h2 id="number_system_for/2-examples" class="section-he
|
||||
<span class="text">Examples</span>
|
||||
</h2>
|
||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </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="0324376286-1">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="0324376286-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="0324376286-2">}</span><span class="p" data-group-id="0324376286-1">}</span><span class="w">
|
||||
</span><span class="p" data-group-id="7992999674-1">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="7992999674-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="7992999674-2">}</span><span class="p" data-group-id="7992999674-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="p" data-group-id="0324376286-3">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="0324376286-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="0324376286-4">}</span><span class="p" data-group-id="0324376286-3">}</span><span class="w">
|
||||
</span><span class="p" data-group-id="7992999674-3">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="7992999674-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="7992999674-4">}</span><span class="p" data-group-id="7992999674-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="p" data-group-id="0324376286-5">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="0324376286-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="0324376286-6">}</span><span class="p" data-group-id="0324376286-5">}</span><span class="w">
|
||||
</span><span class="p" data-group-id="7992999674-5">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="7992999674-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="7992999674-6">}</span><span class="p" data-group-id="7992999674-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="p" data-group-id="0324376286-7">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="0324376286-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="0324376286-8">}</span><span class="p" data-group-id="0324376286-7">}</span><span class="w">
|
||||
</span><span class="p" data-group-id="7992999674-7">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="7992999674-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="7992999674-8">}</span><span class="p" data-group-id="7992999674-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="p" data-group-id="0324376286-9">{</span><span class="w">
|
||||
</span><span class="p" data-group-id="7992999674-9">{</span><span class="w">
|
||||
</span><span class="ss">:error</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="0324376286-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="0324376286-10">}</span><span class="w">
|
||||
</span><span class="p" data-group-id="0324376286-9">}</span></code></pre>
|
||||
</span><span class="p" data-group-id="7992999674-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="7992999674-10">}</span><span class="w">
|
||||
</span><span class="p" data-group-id="7992999674-9">}</span></code></pre>
|
||||
</section>
|
||||
</section>
|
||||
<section class="detail" id="number_system_from_locale/1">
|
||||
@ -424,10 +424,10 @@ or a <a href="https://hexdocs.pm/ex_cldr/2.39.2/Cldr.LanguageTag.html"><code cla
|
||||
<span class="text">Examples</span>
|
||||
</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">
|
||||
</span><span class="p" data-group-id="0240305754-1">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="0240305754-2">[</span><span class="ss">:latn</span><span class="p" data-group-id="0240305754-2">]</span><span class="p" data-group-id="0240305754-1">}</span><span class="w">
|
||||
</span><span class="p" data-group-id="1302017016-1">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1302017016-2">[</span><span class="ss">:latn</span><span class="p" data-group-id="1302017016-2">]</span><span class="p" data-group-id="1302017016-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="p" data-group-id="0240305754-3">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="0240305754-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="0240305754-4">}</span><span class="p" data-group-id="0240305754-3">}</span></code></pre>
|
||||
</span><span class="p" data-group-id="1302017016-3">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1302017016-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="1302017016-4">}</span><span class="p" data-group-id="1302017016-3">}</span></code></pre>
|
||||
</section>
|
||||
</section>
|
||||
<section class="detail" id="number_system_names_for!/1">
|
||||
@ -509,13 +509,13 @@ or a <a href="https://hexdocs.pm/ex_cldr/2.39.2/Cldr.LanguageTag.html"><code cla
|
||||
<span class="text">Examples</span>
|
||||
</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">
|
||||
</span><span class="p" data-group-id="6471838413-1">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="6471838413-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="6471838413-2">}</span><span class="p" data-group-id="6471838413-1">}</span><span class="w">
|
||||
</span><span class="p" data-group-id="7102948283-1">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="7102948283-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="7102948283-2">}</span><span class="p" data-group-id="7102948283-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="p" data-group-id="6471838413-3">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="6471838413-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="6471838413-4">}</span><span class="p" data-group-id="6471838413-3">}</span><span class="w">
|
||||
</span><span class="p" data-group-id="7102948283-3">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="7102948283-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="7102948283-4">}</span><span class="p" data-group-id="7102948283-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="p" data-group-id="6471838413-5">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="6471838413-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="6471838413-6">}</span><span class="p" data-group-id="6471838413-5">}</span></code></pre>
|
||||
</span><span class="p" data-group-id="7102948283-5">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="7102948283-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="7102948283-6">}</span><span class="p" data-group-id="7102948283-5">}</span></code></pre>
|
||||
</section>
|
||||
</section>
|
||||
<section class="detail" id="number_systems_for!/1">
|
||||
@ -614,20 +614,20 @@ actual system name.</p><h2 id="system_name_from/2-examples" class="section-headi
|
||||
</a>
|
||||
<span class="text">Examples</span>
|
||||
</h2>
|
||||
<pre><code class="makeup elixir" translate="no"><span class="n">ex</span><span class="o">></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="9069755856-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="9069755856-1">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="9069755856-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="9069755856-2">}</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="9792321132-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="9792321132-1">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="9792321132-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="9792321132-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="9069755856-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="9069755856-3">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="9069755856-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="9069755856-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="9792321132-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="9792321132-3">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="9792321132-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="9792321132-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="9069755856-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="9069755856-5">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="9069755856-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="9069755856-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="9792321132-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="9792321132-5">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="9792321132-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="9792321132-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="9069755856-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="9069755856-7">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="9069755856-8">{</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="9792321132-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="9792321132-7">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="9792321132-8">{</span><span class="w">
|
||||
</span><span class="ss">:error</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="9069755856-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="9069755856-9">}</span><span class="w">
|
||||
</span><span class="p" data-group-id="9069755856-8">}</span></code></pre><p>Note that return value is not guaranteed to be a valid
|
||||
</span><span class="p" data-group-id="9792321132-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="9792321132-9">}</span><span class="w">
|
||||
</span><span class="p" data-group-id="9792321132-8">}</span></code></pre><p>Note that return value is not guaranteed to be a valid
|
||||
number system for the given locale as demonstrated in the third example.</p>
|
||||
</section>
|
||||
</section>
|
||||
@ -674,16 +674,16 @@ is recommended.</p></li></ul><h2 id="to_system/2-examples" class="section-headin
|
||||
<span class="text">Examples</span>
|
||||
</h2>
|
||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </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="7419033732-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="7419033732-1">}</span><span class="w">
|
||||
</span><span class="p" data-group-id="9855605884-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="9855605884-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="p" data-group-id="7419033732-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="7419033732-2">}</span><span class="w">
|
||||
</span><span class="p" data-group-id="9855605884-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="9855605884-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="p" data-group-id="7419033732-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="7419033732-3">}</span><span class="w">
|
||||
</span><span class="p" data-group-id="9855605884-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="9855605884-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="p" data-group-id="7419033732-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="7419033732-4">}</span></code></pre>
|
||||
</span><span class="p" data-group-id="9855605884-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="9855605884-4">}</span></code></pre>
|
||||
</section>
|
||||
</section>
|
||||
<section class="detail" id="to_system!/2">
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
@ -162,12 +162,12 @@ digits between number systems. For example from :arabic to :latn. Since genera
|
||||
transliteration map is slow, pairs of transliterations can be configured so that the
|
||||
transliteration map is created at compile time and therefore speeding up transliteration at
|
||||
run time.</p><p>To configure these transliteration pairs, add the to the <code class="inline">use Cldr</code> configuration
|
||||
in a backend module:</p><pre><code class="makeup elixir" translate="no"><span class="kd">defmodule</span><span class="w"> </span><span class="nc">MyApp.Cldr</span><span class="w"> </span><span class="k" data-group-id="6530650673-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="6834862310-1">do</span><span class="w">
|
||||
</span><span class="kn">use</span><span class="w"> </span><span class="nc">Cldr</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">locale</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="6530650673-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="6530650673-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="6834862310-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="6834862310-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">precompile_transliterations</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="6530650673-3">[</span><span class="p" data-group-id="6530650673-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="6530650673-4">}</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="6530650673-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="6530650673-5">}</span><span class="p" data-group-id="6530650673-3">]</span><span class="w">
|
||||
</span><span class="k" data-group-id="6530650673-1">end</span></code></pre><p>Where each tuple in the list configures one transliteration map. In this example, two maps are
|
||||
</span><span class="ss">precompile_transliterations</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="6834862310-3">[</span><span class="p" data-group-id="6834862310-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="6834862310-4">}</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="6834862310-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="6834862310-5">}</span><span class="p" data-group-id="6834862310-3">]</span><span class="w">
|
||||
</span><span class="k" data-group-id="6834862310-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.33.1/Cldr.Number.System.html#numeric_systems/0"><code class="inline">Cldr.Number.System.numeric_systems/0</code></a>.</p><p>If a transliteration is requested between two number pairs that have not been configured for
|
||||
precompilation, a warning is logged.</p>
|
||||
</section>
|
||||
@ -281,22 +281,22 @@ and <a href="Plausible.Cldr.Number.System.html#number_systems_for/1"><code class
|
||||
</a>
|
||||
<span class="text">Examples</span>
|
||||
</h2>
|
||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr.Number.Transliterate</span><span class="o">.</span><span class="n">transliterate</span><span class="p" data-group-id="0367091047-1">(</span><span class="s">"123556"</span><span class="p" data-group-id="0367091047-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="4529860111-1">(</span><span class="s">"123556"</span><span class="p" data-group-id="4529860111-1">)</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="0367091047-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="0367091047-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="4529860111-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="4529860111-2">)</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="0367091047-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="0367091047-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="4529860111-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="4529860111-3">)</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="0367091047-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="0367091047-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="4529860111-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="4529860111-4">)</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="0367091047-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="0367091047-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="4529860111-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="4529860111-5">)</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="0367091047-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="0367091047-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="4529860111-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="4529860111-6">)</span><span class="w">
|
||||
</span><span class="s">"Some number is: ๑๒๓๕๕๖"</span></code></pre>
|
||||
</section>
|
||||
</section>
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
@ -441,19 +441,19 @@ using the Elixir standard library functions.</p><h2 id="parse/2-examples" class=
|
||||
</a>
|
||||
<span class="text">Examples</span>
|
||||
</h2>
|
||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">parse</span><span class="p" data-group-id="3179535176-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="3179535176-1">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="3179535176-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="3179535176-2">}</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="0941872970-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="0941872970-1">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="0941872970-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="0941872970-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="3179535176-3">(</span><span class="s">"-1_000_000.34"</span><span class="p" data-group-id="3179535176-3">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="3179535176-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="3179535176-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="0941872970-3">(</span><span class="s">"-1_000_000.34"</span><span class="p" data-group-id="0941872970-3">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="0941872970-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="0941872970-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="3179535176-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="3179535176-5">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="3179535176-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="3179535176-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="0941872970-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="0941872970-5">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="0941872970-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="0941872970-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="3179535176-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="3179535176-7">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="3179535176-8">{</span><span class="ss">:error</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="3179535176-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="3179535176-9">}</span><span class="p" data-group-id="3179535176-8">}</span></code></pre>
|
||||
</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="0941872970-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="0941872970-7">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="0941872970-8">{</span><span class="ss">:error</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="0941872970-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="0941872970-9">}</span><span class="p" data-group-id="0941872970-8">}</span></code></pre>
|
||||
</section>
|
||||
</section>
|
||||
<section class="detail" id="resolve_currencies/2">
|
||||
@ -525,17 +525,17 @@ financial instruments.</p></li></ul><h2 id="resolve_currencies/2-examples" class
|
||||
</a>
|
||||
<span class="text">Examples</span>
|
||||
</h2>
|
||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">scan</span><span class="p" data-group-id="2422226348-1">(</span><span class="s">"100 US dollars"</span><span class="p" data-group-id="2422226348-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="5938503670-1">(</span><span class="s">"100 US dollars"</span><span class="p" data-group-id="5938503670-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="p" data-group-id="2422226348-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="2422226348-2">]</span><span class="w">
|
||||
</span><span class="p" data-group-id="5938503670-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="5938503670-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="2422226348-3">(</span><span class="s">"100 eurosports"</span><span class="p" data-group-id="2422226348-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="2422226348-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="2422226348-4">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="2422226348-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="2422226348-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="5938503670-3">(</span><span class="s">"100 eurosports"</span><span class="p" data-group-id="5938503670-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="5938503670-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="5938503670-4">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="5938503670-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="5938503670-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="2422226348-6">(</span><span class="s">"100 dollars des États-Unis"</span><span class="p" data-group-id="2422226348-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="2422226348-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="2422226348-7">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="2422226348-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="2422226348-8">]</span></code></pre>
|
||||
</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="5938503670-6">(</span><span class="s">"100 dollars des États-Unis"</span><span class="p" data-group-id="5938503670-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="5938503670-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="5938503670-7">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="5938503670-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="5938503670-8">]</span></code></pre>
|
||||
</section>
|
||||
</section>
|
||||
<section class="detail" id="resolve_currency/2">
|
||||
@ -612,19 +612,19 @@ financial instruments.</p></li></ul><h2 id="resolve_currency/2-examples" class="
|
||||
</a>
|
||||
<span class="text">Examples</span>
|
||||
</h2>
|
||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">resolve_currency</span><span class="p" data-group-id="3759261580-1">(</span><span class="s">"US dollars"</span><span class="p" data-group-id="3759261580-1">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="3759261580-2">[</span><span class="ss">:USD</span><span class="p" data-group-id="3759261580-2">]</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="9973441360-1">(</span><span class="s">"US dollars"</span><span class="p" data-group-id="9973441360-1">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="9973441360-2">[</span><span class="ss">:USD</span><span class="p" data-group-id="9973441360-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="3759261580-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="3759261580-3">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="3759261580-4">[</span><span class="ss">:EUR</span><span class="p" data-group-id="3759261580-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="9973441360-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="9973441360-3">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="9973441360-4">[</span><span class="ss">:EUR</span><span class="p" data-group-id="9973441360-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="3759261580-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="3759261580-5">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="3759261580-6">[</span><span class="ss">:USD</span><span class="p" data-group-id="3759261580-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="9973441360-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="9973441360-5">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="9973441360-6">[</span><span class="ss">:USD</span><span class="p" data-group-id="9973441360-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="3759261580-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="3759261580-7">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="3759261580-8">{</span><span class="ss">:error</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="3759261580-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="3759261580-9">}</span><span class="p" data-group-id="3759261580-8">}</span></code></pre>
|
||||
</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="9973441360-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="9973441360-7">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="9973441360-8">{</span><span class="ss">:error</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="9973441360-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="9973441360-9">}</span><span class="p" data-group-id="9973441360-8">}</span></code></pre>
|
||||
</section>
|
||||
</section>
|
||||
<section class="detail" id="resolve_per/2">
|
||||
@ -688,13 +688,13 @@ The default is <code class="inline">options[:backend].get_locale()</code></li></
|
||||
<span class="text">Examples</span>
|
||||
</h2>
|
||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </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="9976521805-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="9976521805-1">]</span><span class="w">
|
||||
</span><span class="p" data-group-id="8281669870-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="8281669870-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="p" data-group-id="9976521805-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="9976521805-2">]</span><span class="w">
|
||||
</span><span class="p" data-group-id="8281669870-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="8281669870-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="p" data-group-id="9976521805-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="9976521805-3">]</span></code></pre>
|
||||
</span><span class="p" data-group-id="8281669870-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="8281669870-3">]</span></code></pre>
|
||||
</section>
|
||||
</section>
|
||||
<section class="detail" id="resolve_pers/2">
|
||||
@ -751,9 +751,9 @@ The default is <code class="inline">options[:backend].get_locale()</code></li></
|
||||
</a>
|
||||
<span class="text">Examples</span>
|
||||
</h2>
|
||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">scan</span><span class="p" data-group-id="4266938196-1">(</span><span class="s">"100%"</span><span class="p" data-group-id="4266938196-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="4266938196-2">(</span><span class="p" data-group-id="4266938196-2">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="4266938196-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="4266938196-3">]</span></code></pre>
|
||||
<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="7376627420-1">(</span><span class="s">"100%"</span><span class="p" data-group-id="7376627420-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="7376627420-2">(</span><span class="p" data-group-id="7376627420-2">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="7376627420-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="7376627420-3">]</span></code></pre>
|
||||
</section>
|
||||
</section>
|
||||
<section class="detail" id="scan/2">
|
||||
@ -813,20 +813,20 @@ and any options provided are passed to that function.</p><h2 id="scan/2-examples
|
||||
</a>
|
||||
<span class="text">Examples</span>
|
||||
</h2>
|
||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">scan</span><span class="p" data-group-id="4221700255-1">(</span><span class="s">"£1_000_000.34"</span><span class="p" data-group-id="4221700255-1">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="4221700255-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="4221700255-2">]</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="3983684787-1">(</span><span class="s">"£1_000_000.34"</span><span class="p" data-group-id="3983684787-1">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="3983684787-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="3983684787-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="4221700255-3">(</span><span class="s">"I want £1_000_000 dollars"</span><span class="p" data-group-id="4221700255-3">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="4221700255-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="4221700255-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="3983684787-3">(</span><span class="s">"I want £1_000_000 dollars"</span><span class="p" data-group-id="3983684787-3">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="3983684787-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="3983684787-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="4221700255-5">(</span><span class="s">"The prize is 23"</span><span class="p" data-group-id="4221700255-5">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="4221700255-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="4221700255-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="3983684787-5">(</span><span class="s">"The prize is 23"</span><span class="p" data-group-id="3983684787-5">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="3983684787-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="3983684787-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="4221700255-7">(</span><span class="s">"The lottery number is 23 for the next draw"</span><span class="p" data-group-id="4221700255-7">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="4221700255-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="4221700255-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="3983684787-7">(</span><span class="s">"The lottery number is 23 for the next draw"</span><span class="p" data-group-id="3983684787-7">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="3983684787-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="3983684787-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="4221700255-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="4221700255-9">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="4221700255-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="4221700255-10">]</span></code></pre>
|
||||
</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="3983684787-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="3983684787-9">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="3983684787-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="3983684787-10">]</span></code></pre>
|
||||
</section>
|
||||
</section>
|
||||
<section class="detail" id="to_approx_string/2">
|
||||
@ -873,7 +873,7 @@ options.</p></li></ul><h2 id="to_approx_string/2-example" class="section-heading
|
||||
<span class="text">Example</span>
|
||||
</h2>
|
||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </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="0886883118-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="0886883118-1">}</span></code></pre>
|
||||
</span><span class="p" data-group-id="9664512237-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="9664512237-1">}</span></code></pre>
|
||||
</section>
|
||||
</section>
|
||||
<section class="detail" id="to_at_least_string/2">
|
||||
@ -920,7 +920,7 @@ options.</p></li></ul><h2 id="to_at_least_string/2-example" class="section-headi
|
||||
<span class="text">Example</span>
|
||||
</h2>
|
||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </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="9851256293-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="9851256293-1">}</span></code></pre>
|
||||
</span><span class="p" data-group-id="0404322938-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="0404322938-1">}</span></code></pre>
|
||||
</section>
|
||||
</section>
|
||||
<section class="detail" id="to_at_most_string/2">
|
||||
@ -967,7 +967,7 @@ options.</p></li></ul><h2 id="to_at_most_string/2-example" class="section-headin
|
||||
<span class="text">Example</span>
|
||||
</h2>
|
||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </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="8983264608-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="8983264608-1">}</span></code></pre>
|
||||
</span><span class="p" data-group-id="5389364055-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="5389364055-1">}</span></code></pre>
|
||||
</section>
|
||||
</section>
|
||||
<section class="detail" id="to_range_string/2">
|
||||
@ -1014,7 +1014,7 @@ options.</p></li></ul><h2 id="to_range_string/2-example" class="section-heading"
|
||||
<span class="text">Example</span>
|
||||
</h2>
|
||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </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="0038658558-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="0038658558-1">}</span></code></pre>
|
||||
</span><span class="p" data-group-id="6226065197-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="6226065197-1">}</span></code></pre>
|
||||
</section>
|
||||
</section>
|
||||
<section class="detail" id="to_string/2">
|
||||
@ -1133,21 +1133,21 @@ extensions.</p><h2 id="to_string/2-wrapping-format-elements" class="section-head
|
||||
</h2>
|
||||
<p>Wrapping elements is particularly useful when formatting a number with a
|
||||
currency symbol and the requirement is to have different HTML formatting
|
||||
applied to the symbol than the number. For example:</p><pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </span><span class="nc">Cldr.Number</span><span class="o">.</span><span class="n">to_string</span><span class="p" data-group-id="8609932453-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="8609932453-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="9220353786-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="9220353786-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">: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="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="8609932453-2">end</span><span class="p" data-group-id="8609932453-1">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="8609932453-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="8609932453-3">}</span></code></pre><p>It is also possible and recommended to use the <a href="https://hexdocs.pm/phoenix_html/3.3.4/Phoenix.HTML.Tag.html#content_tag/3"><code class="inline">Phoenix.HTML.Tag.content_tag/3</code></a>
|
||||
</span><span class="gp unselectable">...> </span><span class="k" data-group-id="9220353786-2">end</span><span class="p" data-group-id="9220353786-1">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="9220353786-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="9220353786-3">}</span></code></pre><p>It is also possible and recommended to use the <a href="https://hexdocs.pm/phoenix_html/3.3.4/Phoenix.HTML.Tag.html#content_tag/3"><code class="inline">Phoenix.HTML.Tag.content_tag/3</code></a>
|
||||
function if wrapping HTML tags since these will ensure HTML entities are
|
||||
correctly encoded. For example:</p><pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </span><span class="nc">Cldr.Number</span><span class="o">.</span><span class="n">to_string</span><span class="p" data-group-id="5654372559-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="5654372559-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="5654372559-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="5654372559-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="5654372559-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="5654372559-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="5654372559-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="5654372559-5">)</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="8638652590-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="8638652590-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="8638652590-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="8638652590-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="8638652590-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="8638652590-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="8638652590-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="8638652590-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="k" data-group-id="5654372559-2">end</span><span class="p" data-group-id="5654372559-1">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="5654372559-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="5654372559-6">}</span></code></pre><p>When formatting a number the format is parsed into format elements that might include
|
||||
</span><span class="gp unselectable">...> </span><span class="k" data-group-id="8638652590-2">end</span><span class="p" data-group-id="8638652590-1">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="8638652590-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="8638652590-6">}</span></code></pre><p>When formatting a number the format is parsed into format elements that might include
|
||||
a currency symbol, a literal string, inserted text between a currency symbol and the
|
||||
currency amount, a percent sign, the number itself and several other elements. In
|
||||
some cases it is helpful to be apply specific formatting to each element.
|
||||
@ -1168,80 +1168,80 @@ inserted in the final formatted number.</p><h2 id="to_string/2-returns" class="s
|
||||
<span class="text">Examples</span>
|
||||
</h2>
|
||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </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="1504245387-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="1504245387-1">}</span><span class="w">
|
||||
</span><span class="p" data-group-id="0726292760-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="0726292760-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="p" data-group-id="1504245387-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="1504245387-2">}</span><span class="w">
|
||||
</span><span class="p" data-group-id="0726292760-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="0726292760-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="p" data-group-id="1504245387-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="1504245387-3">}</span><span class="w">
|
||||
</span><span class="p" data-group-id="0726292760-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="0726292760-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="p" data-group-id="1504245387-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="1504245387-4">}</span><span class="w">
|
||||
</span><span class="p" data-group-id="0726292760-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="0726292760-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="p" data-group-id="1504245387-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="1504245387-5">}</span><span class="w">
|
||||
</span><span class="p" data-group-id="0726292760-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="0726292760-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="p" data-group-id="1504245387-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="1504245387-6">}</span><span class="w">
|
||||
</span><span class="p" data-group-id="0726292760-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="0726292760-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="p" data-group-id="1504245387-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="1504245387-7">}</span><span class="w">
|
||||
</span><span class="p" data-group-id="0726292760-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="0726292760-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="p" data-group-id="1504245387-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="1504245387-8">}</span><span class="w">
|
||||
</span><span class="p" data-group-id="0726292760-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="0726292760-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">...> </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="1504245387-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="1504245387-9">}</span><span class="w">
|
||||
</span><span class="p" data-group-id="0726292760-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="0726292760-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">...> </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="1504245387-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="1504245387-10">}</span><span class="w">
|
||||
</span><span class="p" data-group-id="0726292760-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="0726292760-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="p" data-group-id="1504245387-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="1504245387-11">}</span><span class="w">
|
||||
</span><span class="p" data-group-id="0726292760-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="0726292760-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="p" data-group-id="1504245387-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="1504245387-12">}</span><span class="w">
|
||||
</span><span class="p" data-group-id="0726292760-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="0726292760-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="p" data-group-id="1504245387-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="1504245387-13">}</span><span class="w">
|
||||
</span><span class="p" data-group-id="0726292760-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="0726292760-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="p" data-group-id="1504245387-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="1504245387-14">}</span><span class="w">
|
||||
</span><span class="p" data-group-id="0726292760-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="0726292760-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="p" data-group-id="1504245387-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="1504245387-15">}</span><span class="w">
|
||||
</span><span class="p" data-group-id="0726292760-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="0726292760-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="p" data-group-id="1504245387-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="1504245387-16">}</span><span class="w">
|
||||
</span><span class="p" data-group-id="0726292760-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="0726292760-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="p" data-group-id="1504245387-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="1504245387-17">}</span><span class="w">
|
||||
</span><span class="p" data-group-id="0726292760-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="0726292760-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="p" data-group-id="1504245387-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="1504245387-18">}</span><span class="w">
|
||||
</span><span class="p" data-group-id="0726292760-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="0726292760-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="p" data-group-id="1504245387-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="1504245387-19">}</span><span class="w">
|
||||
</span><span class="p" data-group-id="0726292760-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="0726292760-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="p" data-group-id="1504245387-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="1504245387-20">}</span></code></pre><h2 id="to_string/2-errors" class="section-heading">
|
||||
</span><span class="p" data-group-id="0726292760-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="0726292760-20">}</span></code></pre><h2 id="to_string/2-errors" class="section-heading">
|
||||
<a href="#to_string/2-errors" class="hover-link">
|
||||
<i class="ri-link-m" aria-hidden="true"></i>
|
||||
</a>
|
||||
<span class="text">Errors</span>
|
||||
</h2>
|
||||
<p>An error tuple <code class="inline">{:error, reason}</code> will be returned if an error is detected.
|
||||
The two most likely causes of an error return are:</p><ul><li>A format cannot be compiled. In this case the error tuple will look like:</li></ul><pre><code class="makeup elixir" translate="no"><span class="w"> </span><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">to_string</span><span class="p" data-group-id="3108110729-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="3108110729-1">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="3108110729-2">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="3108110729-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="3108110729-3">}</span><span class="p" data-group-id="3108110729-2">}</span></code></pre><ul><li>The format style requested is not defined for the <code class="inline">locale</code> and
|
||||
The two most likely causes of an error return are:</p><ul><li>A format cannot be compiled. In this case the error tuple will look like:</li></ul><pre><code class="makeup elixir" translate="no"><span class="w"> </span><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">to_string</span><span class="p" data-group-id="6309763369-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="6309763369-1">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="6309763369-2">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="6309763369-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="6309763369-3">}</span><span class="p" data-group-id="6309763369-2">}</span></code></pre><ul><li>The format style requested is not defined for the <code class="inline">locale</code> and
|
||||
<code class="inline">number_system</code>. This happens typically when the number system is
|
||||
<code class="inline">:algorithmic</code> rather than the more common <code class="inline">:numeric</code>. In this case the error
|
||||
return looks like:</li></ul><pre><code class="makeup elixir" translate="no"><span class="w"> </span><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">to_string</span><span class="p" data-group-id="0557750213-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">,</span><span class="w"> </span><span class="ss">format</span><span class="p">:</span><span class="w"> </span><span class="ss">:percent</span><span class="p" data-group-id="0557750213-1">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="0557750213-2">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="0557750213-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 :percent"</span><span class="p" data-group-id="0557750213-3">}</span><span class="p" data-group-id="0557750213-2">}</span></code></pre>
|
||||
return looks like:</li></ul><pre><code class="makeup elixir" translate="no"><span class="w"> </span><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr.Number</span><span class="o">.</span><span class="n">to_string</span><span class="p" data-group-id="3170209327-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">,</span><span class="w"> </span><span class="ss">format</span><span class="p">:</span><span class="w"> </span><span class="ss">:percent</span><span class="p" data-group-id="3170209327-1">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="3170209327-2">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="3170209327-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 :percent"</span><span class="p" data-group-id="3170209327-3">}</span><span class="p" data-group-id="3170209327-2">}</span></code></pre>
|
||||
</section>
|
||||
</section>
|
||||
<section class="detail" id="to_string!/2">
|
||||
@ -1346,17 +1346,17 @@ returned by <a href="https://hexdocs.pm/ex_cldr/2.39.2/Cldr.html#known_number_sy
|
||||
<span class="text">Examples</span>
|
||||
</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">
|
||||
</span><span class="p" data-group-id="6922254485-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="6922254485-1">}</span><span class="w">
|
||||
</span><span class="p" data-group-id="5892302128-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="5892302128-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="p" data-group-id="6922254485-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="6922254485-2">}</span><span class="w">
|
||||
</span><span class="p" data-group-id="5892302128-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="5892302128-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="p" data-group-id="6922254485-3">{</span><span class="ss">:error</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="6922254485-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="6922254485-4">}</span><span class="p" data-group-id="6922254485-3">}</span><span class="w">
|
||||
</span><span class="p" data-group-id="5892302128-3">{</span><span class="ss">:error</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="5892302128-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="5892302128-4">}</span><span class="p" data-group-id="5892302128-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="p" data-group-id="6922254485-5">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="6922254485-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="6922254485-6">}</span><span class="p" data-group-id="6922254485-5">}</span></code></pre>
|
||||
</span><span class="p" data-group-id="5892302128-5">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="5892302128-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="5892302128-6">}</span><span class="p" data-group-id="5892302128-5">}</span></code></pre>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
@ -145,9 +145,9 @@ Pages
|
||||
<section id="moduledoc">
|
||||
<p>Functions to implement the number system rule-based-number-format rules of CLDR.</p><p>These rules are defined only on the "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.33.1/Cldr.Number.html#to_string/2"><code class="inline">Cldr.Number.to_string/2</code></a> function.</p><p>The functions on this module are defined at compile time based upon the RBNF rules
|
||||
defined in the Unicode CLDR data repository. Available rules are identified by:</p><pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </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="8047457357-1">(</span><span class="ss">:und</span><span class="p" data-group-id="8047457357-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="8047457357-2">(</span><span class="p" data-group-id="8047457357-2">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="8047457357-3">[</span><span class="w">
|
||||
defined in the Unicode CLDR data repository. Available rules are identified by:</p><pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </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="0089712095-1">(</span><span class="ss">:und</span><span class="p" data-group-id="0089712095-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="0089712095-2">(</span><span class="p" data-group-id="0089712095-2">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="0089712095-3">[</span><span class="w">
|
||||
</span><span class="ss">:armenian_lower</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">:armenian_upper</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">:cyrillic_lower</span><span class="p">,</span><span class="w">
|
||||
@ -161,9 +161,9 @@ defined in the Unicode CLDR data repository. Available rules are identified by:
|
||||
</span><span class="ss">:roman_upper</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">:tamil</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">:zz_default</span><span class="w">
|
||||
</span><span class="p" data-group-id="8047457357-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="8746477006-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="8746477006-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="7947384521-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="7947384521-1">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="7947384521-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="7947384521-2">}</span></code></pre>
|
||||
</span><span class="p" data-group-id="0089712095-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="2959291486-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="2959291486-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="8141976311-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="8141976311-1">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="8141976311-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="8141976311-2">}</span></code></pre>
|
||||
</section>
|
||||
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
@ -145,20 +145,20 @@ Pages
|
||||
<section id="moduledoc">
|
||||
<p>Functions to implement the ordinal rule-based-number-format rules of CLDR.</p><p>As CLDR notes, the data is incomplete or non-existent for many languages. It
|
||||
is considered complete for English however.</p><p>The standard public API for RBNF is via the <a href="https://hexdocs.pm/ex_cldr_numbers/2.33.1/Cldr.Number.html#to_string/2"><code class="inline">Cldr.Number.to_string/2</code></a> function.</p><p>The functions on this module are defined at compile time based upon the RBNF rules
|
||||
defined in the Unicode CLDR data repository. Available rules are identified by:</p><pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </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="7617621509-1">(</span><span class="ss">:en</span><span class="p" data-group-id="7617621509-1">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="7617621509-2">[</span><span class="ss">:digits_ordinal</span><span class="p" data-group-id="7617621509-2">]</span><span class="w">
|
||||
defined in the Unicode CLDR data repository. Available rules are identified by:</p><pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </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="2337162182-1">(</span><span class="ss">:en</span><span class="p" data-group-id="2337162182-1">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="2337162182-2">[</span><span class="ss">:digits_ordinal</span><span class="p" data-group-id="2337162182-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="7617621509-3">(</span><span class="s">"fr"</span><span class="p" data-group-id="7617621509-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="7617621509-4">(</span><span class="p" data-group-id="7617621509-4">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="7617621509-5">[</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="2337162182-3">(</span><span class="s">"fr"</span><span class="p" data-group-id="2337162182-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="2337162182-4">(</span><span class="p" data-group-id="2337162182-4">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="2337162182-5">[</span><span class="w">
|
||||
</span><span class="ss">:digits_ordinal</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">:digits_ordinal_feminine</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">:digits_ordinal_feminine_plural</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">:digits_ordinal_masculine</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">:digits_ordinal_masculine_plural</span><span class="w">
|
||||
</span><span class="p" data-group-id="7617621509-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="8474744210-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="8474744210-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="1019733521-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="1019733521-1">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="1019733521-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="1019733521-2">}</span></code></pre>
|
||||
</span><span class="p" data-group-id="2337162182-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="3237158310-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="3237158310-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="1585831896-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="1585831896-1">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="1585831896-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="1585831896-2">}</span></code></pre>
|
||||
</section>
|
||||
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
@ -145,9 +145,9 @@ Pages
|
||||
<section id="moduledoc">
|
||||
<p>Functions to implement the spellout rule-based-number-format rules of CLDR.</p><p>As CLDR notes, the data is incomplete or non-existent for many languages. It
|
||||
is considered complete for English however.</p><p>The standard public API for RBNF is via the <a href="https://hexdocs.pm/ex_cldr_numbers/2.33.1/Cldr.Number.html#to_string/2"><code class="inline">Cldr.Number.to_string/2</code></a> function.</p><p>The functions on this module are defined at compile time based upon the RBNF rules
|
||||
defined in the Unicode CLDR data repository. Available rules are identified by:</p><pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </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="3497687913-1">(</span><span class="s">"en"</span><span class="p" data-group-id="3497687913-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="3497687913-2">(</span><span class="p" data-group-id="3497687913-2">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="3497687913-3">[</span><span class="w">
|
||||
defined in the Unicode CLDR data repository. Available rules are identified by:</p><pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </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="9287634076-1">(</span><span class="s">"en"</span><span class="p" data-group-id="9287634076-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="9287634076-2">(</span><span class="p" data-group-id="9287634076-2">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="9287634076-3">[</span><span class="w">
|
||||
</span><span class="ss">:spellout_cardinal</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">:spellout_cardinal_verbose</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">:spellout_numbering</span><span class="p">,</span><span class="w">
|
||||
@ -155,9 +155,9 @@ defined in the Unicode CLDR data repository. Available rules are identified by:
|
||||
</span><span class="ss">:spellout_numbering_year</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">:spellout_ordinal</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">:spellout_ordinal_verbose</span><span class="w">
|
||||
</span><span class="p" data-group-id="3497687913-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="5824065366-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="5824065366-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="5605223928-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="5605223928-1">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="5605223928-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="5605223928-2">}</span></code></pre>
|
||||
</span><span class="p" data-group-id="9287634076-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="1913381054-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="1913381054-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="0073333255-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="0073333255-1">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="0073333255-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="0073333255-2">}</span></code></pre>
|
||||
</section>
|
||||
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
@ -558,24 +558,24 @@ current locale is restored after the function.</p></div>
|
||||
</a>
|
||||
<span class="text">Example</span>
|
||||
</h2>
|
||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">default_locale</span><span class="p" data-group-id="6811245371-1">(</span><span class="p" data-group-id="6811245371-1">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="6811245371-2">%</span><span class="nc" data-group-id="6811245371-2">Cldr.LanguageTag</span><span class="p" data-group-id="6811245371-2">{</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="2376562405-1">(</span><span class="p" data-group-id="2376562405-1">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="2376562405-2">%</span><span class="nc" data-group-id="2376562405-2">Cldr.LanguageTag</span><span class="p" data-group-id="2376562405-2">{</span><span class="w">
|
||||
</span><span class="ss">backend</span><span class="p">:</span><span class="w"> </span><span class="nc">Plausible.Cldr</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">canonical_locale_name</span><span class="p">:</span><span class="w"> </span><span class="s">"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="6811245371-3">[</span><span class="p" data-group-id="6811245371-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="6811245371-4">%{</span><span class="p" data-group-id="6811245371-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="2376562405-3">[</span><span class="p" data-group-id="2376562405-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="2376562405-4">%{</span><span class="p" data-group-id="2376562405-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">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="6811245371-5">%{</span><span class="p" data-group-id="6811245371-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="6811245371-6">[</span><span class="p" data-group-id="6811245371-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="2376562405-5">%{</span><span class="p" data-group-id="2376562405-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="2376562405-6">[</span><span class="p" data-group-id="2376562405-6">]</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">rbnf_locale_name</span><span class="p">:</span><span class="w"> </span><span class="ss">:en</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">requested_locale_name</span><span class="p">:</span><span class="w"> </span><span class="s">"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">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="6811245371-7">%{</span><span class="p" data-group-id="6811245371-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="6811245371-8">[</span><span class="p" data-group-id="6811245371-8">]</span><span class="w">
|
||||
</span><span class="p" data-group-id="6811245371-2">}</span></code></pre>
|
||||
</span><span class="ss">transform</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="2376562405-7">%{</span><span class="p" data-group-id="2376562405-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="2376562405-8">[</span><span class="p" data-group-id="2376562405-8">]</span><span class="w">
|
||||
</span><span class="p" data-group-id="2376562405-2">}</span></code></pre>
|
||||
</section>
|
||||
</section>
|
||||
<section class="detail" id="default_territory/0">
|
||||
@ -610,7 +610,7 @@ does not specify one and none can be inferred.</p><h2 id="default_territory/0-ex
|
||||
</a>
|
||||
<span class="text">Example</span>
|
||||
</h2>
|
||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">default_territory</span><span class="p" data-group-id="4368727013-1">(</span><span class="p" data-group-id="4368727013-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="1148160900-1">(</span><span class="p" data-group-id="1148160900-1">)</span><span class="w">
|
||||
</span><span class="ss">:"001"</span></code></pre>
|
||||
</section>
|
||||
</section>
|
||||
@ -670,16 +670,16 @@ is inserted between words or sentences. The valid options are
|
||||
</a>
|
||||
<span class="text">Examples</span>
|
||||
</h2>
|
||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">ellipsis</span><span class="p" data-group-id="8812446709-1">(</span><span class="s">"And furthermore"</span><span class="p" data-group-id="8812446709-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">ellipsis</span><span class="p" data-group-id="0890171910-1">(</span><span class="s">"And furthermore"</span><span class="p" data-group-id="0890171910-1">)</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="p" data-group-id="8812446709-2">(</span><span class="p" data-group-id="8812446709-3">[</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="8812446709-3">]</span><span class="p">,</span><span class="w"> </span><span class="ss">locale</span><span class="p">:</span><span class="w"> </span><span class="ss">:ja</span><span class="p" data-group-id="8812446709-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">ellipsis</span><span class="p" data-group-id="0890171910-2">(</span><span class="p" data-group-id="0890171910-3">[</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="0890171910-3">]</span><span class="p">,</span><span class="w"> </span><span class="ss">locale</span><span class="p">:</span><span class="w"> </span><span class="ss">:ja</span><span class="p" data-group-id="0890171910-2">)</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="p" data-group-id="8812446709-4">(</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="p" data-group-id="8812446709-4">)</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="p" data-group-id="0890171910-4">(</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="p" data-group-id="0890171910-4">)</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="p" data-group-id="8812446709-5">(</span><span class="p" data-group-id="8812446709-6">[</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="8812446709-6">]</span><span class="p">,</span><span class="w"> </span><span class="ss">locale</span><span class="p">:</span><span class="w"> </span><span class="ss">:ja</span><span class="p">,</span><span class="w"> </span><span class="ss">format</span><span class="p">:</span><span class="w"> </span><span class="ss">:word</span><span class="p" data-group-id="8812446709-5">)</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="p" data-group-id="0890171910-5">(</span><span class="p" data-group-id="0890171910-6">[</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="0890171910-6">]</span><span class="p">,</span><span class="w"> </span><span class="ss">locale</span><span class="p">:</span><span class="w"> </span><span class="ss">:ja</span><span class="p">,</span><span class="w"> </span><span class="ss">format</span><span class="p">:</span><span class="w"> </span><span class="ss">:word</span><span class="p" data-group-id="0890171910-5">)</span><span class="w">
|
||||
</span><span class="s">"And furthermore … there is much to be done"</span></code></pre>
|
||||
</section>
|
||||
</section>
|
||||
@ -715,23 +715,23 @@ take an optional locale parameter for which a locale is not supplied.</p><h2 id=
|
||||
</a>
|
||||
<span class="text">Example</span>
|
||||
</h2>
|
||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">put_locale</span><span class="p" data-group-id="7417863113-1">(</span><span class="s">"pl"</span><span class="p" data-group-id="7417863113-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="p" data-group-id="7417863113-2">(</span><span class="p" data-group-id="7417863113-2">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="7417863113-3">%</span><span class="nc" data-group-id="7417863113-3">Cldr.LanguageTag</span><span class="p" data-group-id="7417863113-3">{</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="5896659523-1">(</span><span class="s">"pl"</span><span class="p" data-group-id="5896659523-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="p" data-group-id="5896659523-2">(</span><span class="p" data-group-id="5896659523-2">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="5896659523-3">%</span><span class="nc" data-group-id="5896659523-3">Cldr.LanguageTag</span><span class="p" data-group-id="5896659523-3">{</span><span class="w">
|
||||
</span><span class="ss">backend</span><span class="p">:</span><span class="w"> </span><span class="nc">Elixir.Plausible.Cldr</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">canonical_locale_name</span><span class="p">:</span><span class="w"> </span><span class="s">"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="7417863113-4">%{</span><span class="p" data-group-id="7417863113-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="5896659523-4">%{</span><span class="p" data-group-id="5896659523-4">}</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">language</span><span class="p">:</span><span class="w"> </span><span class="s">"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="7417863113-5">%{</span><span class="p" data-group-id="7417863113-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="7417863113-6">[</span><span class="p" data-group-id="7417863113-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="5896659523-5">%{</span><span class="p" data-group-id="5896659523-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="5896659523-6">[</span><span class="p" data-group-id="5896659523-6">]</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">rbnf_locale_name</span><span class="p">:</span><span class="w"> </span><span class="ss">:pl</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">territory</span><span class="p">:</span><span class="w"> </span><span class="ss">:PL</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">requested_locale_name</span><span class="p">:</span><span class="w"> </span><span class="s">"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">transform</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="7417863113-7">%{</span><span class="p" data-group-id="7417863113-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="7417863113-8">[</span><span class="p" data-group-id="7417863113-8">]</span><span class="w">
|
||||
</span><span class="p" data-group-id="7417863113-3">}</span></code></pre>
|
||||
</span><span class="ss">transform</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="5896659523-7">%{</span><span class="p" data-group-id="5896659523-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="5896659523-8">[</span><span class="p" data-group-id="5896659523-8">]</span><span class="w">
|
||||
</span><span class="p" data-group-id="5896659523-3">}</span></code></pre>
|
||||
</section>
|
||||
</section>
|
||||
<section class="detail" id="known_calendars/0">
|
||||
@ -818,10 +818,10 @@ take an optional locale parameter for which a locale is not supplied.</p><h2 id=
|
||||
</a>
|
||||
<span class="text">Examples</span>
|
||||
</h2>
|
||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </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="1877157294-1">(</span><span class="s">"en"</span><span class="p" data-group-id="1877157294-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="4845421495-1">(</span><span class="s">"en"</span><span class="p" data-group-id="4845421495-1">)</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</span><span class="o">.</span><span class="n">known_gettext_locale_name</span><span class="p" data-group-id="1877157294-2">(</span><span class="s">"en-SA"</span><span class="p" data-group-id="1877157294-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="4845421495-2">(</span><span class="s">"en-SA"</span><span class="p" data-group-id="4845421495-2">)</span><span class="w">
|
||||
</span><span class="no">false</span></code></pre>
|
||||
</section>
|
||||
</section>
|
||||
@ -864,10 +864,10 @@ name is configured and available in Gettext.</p><h2 id="known_gettext_locale_nam
|
||||
</a>
|
||||
<span class="text">Examples</span>
|
||||
</h2>
|
||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </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="3660358233-1">(</span><span class="s">"en"</span><span class="p" data-group-id="3660358233-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="5156082047-1">(</span><span class="s">"en"</span><span class="p" data-group-id="5156082047-1">)</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="3660358233-2">(</span><span class="s">"!!"</span><span class="p" data-group-id="3660358233-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="5156082047-2">(</span><span class="s">"!!"</span><span class="p" data-group-id="5156082047-2">)</span><span class="w">
|
||||
</span><span class="no">false</span></code></pre>
|
||||
</section>
|
||||
</section>
|
||||
@ -941,10 +941,10 @@ to return the first known locale name from a list.</p><h2 id="known_locale_name/
|
||||
</a>
|
||||
<span class="text">Examples</span>
|
||||
</h2>
|
||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">known_locale_name</span><span class="p" data-group-id="1312072700-1">(</span><span class="ss">:"en-AU"</span><span class="p" data-group-id="1312072700-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="9141755932-1">(</span><span class="ss">:"en-AU"</span><span class="p" data-group-id="9141755932-1">)</span><span class="w">
|
||||
</span><span class="ss">:"en-AU"</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="1312072700-2">(</span><span class="ss">:"en-SA"</span><span class="p" data-group-id="1312072700-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="9141755932-2">(</span><span class="ss">:"en-SA"</span><span class="p" data-group-id="9141755932-2">)</span><span class="w">
|
||||
</span><span class="no">false</span></code></pre>
|
||||
</section>
|
||||
</section>
|
||||
@ -986,10 +986,10 @@ name is configured and available in Cldr.</p><h2 id="known_locale_name?/1-argume
|
||||
</a>
|
||||
<span class="text">Examples</span>
|
||||
</h2>
|
||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">known_locale_name?</span><span class="p" data-group-id="2962230658-1">(</span><span class="ss">:en</span><span class="p" data-group-id="2962230658-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="0003563340-1">(</span><span class="ss">:en</span><span class="p" data-group-id="0003563340-1">)</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="2962230658-2">(</span><span class="ss">:"!!"</span><span class="p" data-group-id="2962230658-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="0003563340-2">(</span><span class="ss">:"!!"</span><span class="p" data-group-id="0003563340-2">)</span><span class="w">
|
||||
</span><span class="no">false</span></code></pre>
|
||||
</section>
|
||||
</section>
|
||||
@ -1043,8 +1043,8 @@ in this module or in <a href="https://hexdocs.pm/gettext/0.24.0/Gettext.html"><c
|
||||
</a>
|
||||
<span class="text">Example</span>
|
||||
</h2>
|
||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">known_number_system_types</span><span class="p" data-group-id="8639657059-1">(</span><span class="p" data-group-id="8639657059-1">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="8639657059-2">[</span><span class="ss">:default</span><span class="p">,</span><span class="w"> </span><span class="ss">:finance</span><span class="p">,</span><span class="w"> </span><span class="ss">:native</span><span class="p">,</span><span class="w"> </span><span class="ss">:traditional</span><span class="p" data-group-id="8639657059-2">]</span></code></pre>
|
||||
<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="p" data-group-id="8061754510-1">(</span><span class="p" data-group-id="8061754510-1">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="8061754510-2">[</span><span class="ss">:default</span><span class="p">,</span><span class="w"> </span><span class="ss">:finance</span><span class="p">,</span><span class="w"> </span><span class="ss">:native</span><span class="p">,</span><span class="w"> </span><span class="ss">:traditional</span><span class="p" data-group-id="8061754510-2">]</span></code></pre>
|
||||
</section>
|
||||
</section>
|
||||
<section class="detail" id="known_number_systems/0">
|
||||
@ -1109,10 +1109,10 @@ and has RBNF rules defined.</p><h2 id="known_rbnf_locale_name/1-arguments" class
|
||||
</a>
|
||||
<span class="text">Examples</span>
|
||||
</h2>
|
||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </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="0345601330-1">(</span><span class="ss">:en</span><span class="p" data-group-id="0345601330-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="5223157000-1">(</span><span class="ss">:en</span><span class="p" data-group-id="5223157000-1">)</span><span class="w">
|
||||
</span><span class="ss">:en</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="0345601330-2">(</span><span class="ss">:"en-SA"</span><span class="p" data-group-id="0345601330-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="5223157000-2">(</span><span class="ss">:"en-SA"</span><span class="p" data-group-id="5223157000-2">)</span><span class="w">
|
||||
</span><span class="no">false</span></code></pre>
|
||||
</section>
|
||||
</section>
|
||||
@ -1155,10 +1155,10 @@ rules based number formats (RBNF).</p><h2 id="known_rbnf_locale_name?/1-argument
|
||||
</a>
|
||||
<span class="text">Examples</span>
|
||||
</h2>
|
||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </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="9000906226-1">(</span><span class="ss">:en</span><span class="p" data-group-id="9000906226-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="4405096551-1">(</span><span class="ss">:en</span><span class="p" data-group-id="4405096551-1">)</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="9000906226-2">(</span><span class="ss">:"!!"</span><span class="p" data-group-id="9000906226-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="4405096551-2">(</span><span class="ss">:"!!"</span><span class="p" data-group-id="4405096551-2">)</span><span class="w">
|
||||
</span><span class="no">false</span></code></pre>
|
||||
</section>
|
||||
</section>
|
||||
@ -1294,18 +1294,18 @@ CLDR backend defined by the <code class="inline">t:Cldr.LanguageTag</code> is se
|
||||
<span class="text">Examples</span>
|
||||
</h2>
|
||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </span><span class="kn">import</span><span class="w"> </span><span class="nc">Cldr.LanguageTag.Sigil</span><span class="w">
|
||||
</span><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">put_gettext_locale</span><span class="p" data-group-id="4670673684-1">(</span><span class="sx">~l"en"</span><span class="p" data-group-id="4670673684-1">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="4670673684-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">"en"</span><span class="p" data-group-id="4670673684-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_gettext_locale</span><span class="p" data-group-id="6101666116-1">(</span><span class="sx">~l"en"</span><span class="p" data-group-id="6101666116-1">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="6101666116-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="s">"en"</span><span class="p" data-group-id="6101666116-2">}</span><span class="w">
|
||||
|
||||
</span><span class="gp unselectable">iex> </span><span class="kn">import</span><span class="w"> </span><span class="nc">Cldr.LanguageTag.Sigil</span><span class="w">
|
||||
</span><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">put_gettext_locale</span><span class="p" data-group-id="4670673684-3">(</span><span class="sx">~l"de"</span><span class="p" data-group-id="4670673684-3">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="4670673684-4">{</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_gettext_locale</span><span class="p" data-group-id="6101666116-3">(</span><span class="sx">~l"de"</span><span class="p" data-group-id="6101666116-3">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="6101666116-4">{</span><span class="w">
|
||||
</span><span class="ss">:error</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="4670673684-5">{</span><span class="w">
|
||||
</span><span class="p" data-group-id="6101666116-5">{</span><span class="w">
|
||||
</span><span class="nc">Cldr.UnknownLocaleError</span><span class="p">,</span><span class="w">
|
||||
</span><span class="s">"Locale TestBackend.Cldr.Locale.new!(</span><span class="se">\"</span><span class="s">de-DE</span><span class="se">\"</span><span class="s">) does not map to a known gettext locale name"</span><span class="w">
|
||||
</span><span class="p" data-group-id="4670673684-5">}</span><span class="w">
|
||||
</span><span class="p" data-group-id="4670673684-4">}</span></code></pre>
|
||||
</span><span class="p" data-group-id="6101666116-5">}</span><span class="w">
|
||||
</span><span class="p" data-group-id="6101666116-4">}</span></code></pre>
|
||||
</section>
|
||||
</section>
|
||||
<section class="detail" id="put_locale/1">
|
||||
@ -1349,29 +1349,29 @@ of a language tag.</p><h2 id="put_locale/1-examples" class="section-heading">
|
||||
</a>
|
||||
<span class="text">Examples</span>
|
||||
</h2>
|
||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">put_locale</span><span class="p" data-group-id="1949098390-1">(</span><span class="s">"en"</span><span class="p" data-group-id="1949098390-1">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="1949098390-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="1949098390-3">%</span><span class="nc" data-group-id="1949098390-3">Cldr.LanguageTag</span><span class="p" data-group-id="1949098390-3">{</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="4314635461-1">(</span><span class="s">"en"</span><span class="p" data-group-id="4314635461-1">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="4314635461-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="4314635461-3">%</span><span class="nc" data-group-id="4314635461-3">Cldr.LanguageTag</span><span class="p" data-group-id="4314635461-3">{</span><span class="w">
|
||||
</span><span class="ss">backend</span><span class="p">:</span><span class="w"> </span><span class="nc">Plausible.Cldr</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">canonical_locale_name</span><span class="p">:</span><span class="w"> </span><span class="s">"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="1949098390-4">[</span><span class="p" data-group-id="1949098390-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="1949098390-5">%{</span><span class="p" data-group-id="1949098390-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="4314635461-4">[</span><span class="p" data-group-id="4314635461-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="4314635461-5">%{</span><span class="p" data-group-id="4314635461-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">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="1949098390-6">%{</span><span class="p" data-group-id="1949098390-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="1949098390-7">[</span><span class="p" data-group-id="1949098390-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="4314635461-6">%{</span><span class="p" data-group-id="4314635461-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="4314635461-7">[</span><span class="p" data-group-id="4314635461-7">]</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">rbnf_locale_name</span><span class="p">:</span><span class="w"> </span><span class="ss">:en</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">requested_locale_name</span><span class="p">:</span><span class="w"> </span><span class="s">"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">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="1949098390-8">%{</span><span class="p" data-group-id="1949098390-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="1949098390-9">[</span><span class="p" data-group-id="1949098390-9">]</span><span class="w">
|
||||
</span><span class="p" data-group-id="1949098390-3">}</span><span class="p" data-group-id="1949098390-2">}</span><span class="w">
|
||||
</span><span class="ss">transform</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="4314635461-8">%{</span><span class="p" data-group-id="4314635461-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="4314635461-9">[</span><span class="p" data-group-id="4314635461-9">]</span><span class="w">
|
||||
</span><span class="p" data-group-id="4314635461-3">}</span><span class="p" data-group-id="4314635461-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="1949098390-10">(</span><span class="s">"invalid-locale!"</span><span class="p" data-group-id="1949098390-10">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="1949098390-11">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1949098390-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="1949098390-12">}</span><span class="p" data-group-id="1949098390-11">}</span></code></pre>
|
||||
</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="4314635461-10">(</span><span class="s">"invalid-locale!"</span><span class="p" data-group-id="4314635461-10">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="4314635461-11">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="4314635461-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="4314635461-12">}</span><span class="p" data-group-id="4314635461-11">}</span></code></pre>
|
||||
</section>
|
||||
</section>
|
||||
<section class="detail" id="quote/2">
|
||||
@ -1420,10 +1420,10 @@ The default is <a href="https://hexdocs.pm/ex_cldr/2.39.2/Cldr.html#get_locale/0
|
||||
</a>
|
||||
<span class="text">Examples</span>
|
||||
</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="k">quote</span><span class="p" data-group-id="6352124367-1">(</span><span class="s">"Quoted String"</span><span class="p" data-group-id="6352124367-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="k">quote</span><span class="p" data-group-id="9223556455-1">(</span><span class="s">"Quoted String"</span><span class="p" data-group-id="9223556455-1">)</span><span class="w">
|
||||
</span><span class="s">"“Quoted String”"</span><span class="w">
|
||||
|
||||
</span><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="k">quote</span><span class="p" data-group-id="6352124367-2">(</span><span class="s">"Quoted String"</span><span class="p">,</span><span class="w"> </span><span class="ss">locale</span><span class="p">:</span><span class="w"> </span><span class="ss">:ja</span><span class="p" data-group-id="6352124367-2">)</span><span class="w">
|
||||
</span><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="k">quote</span><span class="p" data-group-id="9223556455-2">(</span><span class="s">"Quoted String"</span><span class="p">,</span><span class="w"> </span><span class="ss">locale</span><span class="p">:</span><span class="w"> </span><span class="ss">:ja</span><span class="p" data-group-id="9223556455-2">)</span><span class="w">
|
||||
</span><span class="s">"「Quoted String」"</span></code></pre>
|
||||
</section>
|
||||
</section>
|
||||
@ -1554,47 +1554,47 @@ of a language tag.</p><h2 id="validate_locale/1-examples" class="section-heading
|
||||
</a>
|
||||
<span class="text">Examples</span>
|
||||
</h2>
|
||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">validate_locale</span><span class="p" data-group-id="7425453464-1">(</span><span class="ss">:en</span><span class="p" data-group-id="7425453464-1">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="7425453464-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="7425453464-3">%</span><span class="nc" data-group-id="7425453464-3">Cldr.LanguageTag</span><span class="p" data-group-id="7425453464-3">{</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="1046661553-1">(</span><span class="ss">:en</span><span class="p" data-group-id="1046661553-1">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="1046661553-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="1046661553-3">%</span><span class="nc" data-group-id="1046661553-3">Cldr.LanguageTag</span><span class="p" data-group-id="1046661553-3">{</span><span class="w">
|
||||
</span><span class="ss">backend</span><span class="p">:</span><span class="w"> </span><span class="nc">Plausible.Cldr</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">canonical_locale_name</span><span class="p">:</span><span class="w"> </span><span class="s">"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="7425453464-4">%{</span><span class="p" data-group-id="7425453464-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="1046661553-4">%{</span><span class="p" data-group-id="1046661553-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">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="7425453464-5">%{</span><span class="p" data-group-id="7425453464-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="7425453464-6">[</span><span class="p" data-group-id="7425453464-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="1046661553-5">%{</span><span class="p" data-group-id="1046661553-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="1046661553-6">[</span><span class="p" data-group-id="1046661553-6">]</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">rbnf_locale_name</span><span class="p">:</span><span class="w"> </span><span class="ss">:en</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">requested_locale_name</span><span class="p">:</span><span class="w"> </span><span class="s">"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">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="7425453464-7">%{</span><span class="p" data-group-id="7425453464-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="7425453464-8">[</span><span class="p" data-group-id="7425453464-8">]</span><span class="w">
|
||||
</span><span class="p" data-group-id="7425453464-3">}</span><span class="p" data-group-id="7425453464-2">}</span><span class="w">
|
||||
</span><span class="ss">transform</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="1046661553-7">%{</span><span class="p" data-group-id="1046661553-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="1046661553-8">[</span><span class="p" data-group-id="1046661553-8">]</span><span class="w">
|
||||
</span><span class="p" data-group-id="1046661553-3">}</span><span class="p" data-group-id="1046661553-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="7425453464-9">(</span><span class="p" data-group-id="7425453464-9">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="7425453464-10">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="7425453464-11">%</span><span class="nc" data-group-id="7425453464-11">Cldr.LanguageTag</span><span class="p" data-group-id="7425453464-11">{</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="1046661553-9">(</span><span class="p" data-group-id="1046661553-9">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="1046661553-10">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="1046661553-11">%</span><span class="nc" data-group-id="1046661553-11">Cldr.LanguageTag</span><span class="p" data-group-id="1046661553-11">{</span><span class="w">
|
||||
</span><span class="ss">backend</span><span class="p">:</span><span class="w"> </span><span class="nc">Plausible.Cldr</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">canonical_locale_name</span><span class="p">:</span><span class="w"> </span><span class="s">"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="7425453464-12">%{</span><span class="p" data-group-id="7425453464-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="1046661553-12">%{</span><span class="p" data-group-id="1046661553-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">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="7425453464-13">%{</span><span class="p" data-group-id="7425453464-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="7425453464-14">[</span><span class="p" data-group-id="7425453464-14">]</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">locale</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="1046661553-13">%{</span><span class="p" data-group-id="1046661553-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="1046661553-14">[</span><span class="p" data-group-id="1046661553-14">]</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">rbnf_locale_name</span><span class="p">:</span><span class="w"> </span><span class="ss">:en</span><span class="p">,</span><span class="w">
|
||||
</span><span class="ss">requested_locale_name</span><span class="p">:</span><span class="w"> </span><span class="s">"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">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="7425453464-15">%{</span><span class="p" data-group-id="7425453464-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="7425453464-16">[</span><span class="p" data-group-id="7425453464-16">]</span><span class="w">
|
||||
</span><span class="p" data-group-id="7425453464-11">}</span><span class="p" data-group-id="7425453464-10">}</span><span class="w">
|
||||
</span><span class="ss">transform</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="1046661553-15">%{</span><span class="p" data-group-id="1046661553-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="1046661553-16">[</span><span class="p" data-group-id="1046661553-16">]</span><span class="w">
|
||||
</span><span class="p" data-group-id="1046661553-11">}</span><span class="p" data-group-id="1046661553-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="7425453464-17">(</span><span class="s">"zzz"</span><span class="p" data-group-id="7425453464-17">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="7425453464-18">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="7425453464-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="7425453464-19">}</span><span class="p" data-group-id="7425453464-18">}</span></code></pre>
|
||||
</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="1046661553-17">(</span><span class="s">"zzz"</span><span class="p" data-group-id="1046661553-17">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="1046661553-18">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="p" data-group-id="1046661553-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="1046661553-19">}</span><span class="p" data-group-id="1046661553-18">}</span></code></pre>
|
||||
</section>
|
||||
</section>
|
||||
<section class="detail" id="validate_number_system/1">
|
||||
@ -1664,23 +1664,23 @@ of a language tag.</p><h2 id="validate_locale/1-examples" class="section-heading
|
||||
</a>
|
||||
<span class="text">Examples</span>
|
||||
</h2>
|
||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </span><span class="nc">Plausible.Cldr</span><span class="o">.</span><span class="n">validate_number_system_type</span><span class="p" data-group-id="8843261073-1">(</span><span class="ss">:default</span><span class="p" data-group-id="8843261073-1">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="8843261073-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="ss">:default</span><span class="p" data-group-id="8843261073-2">}</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="p" data-group-id="4516500698-1">(</span><span class="ss">:default</span><span class="p" data-group-id="4516500698-1">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="4516500698-2">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="ss">:default</span><span class="p" data-group-id="4516500698-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="p" data-group-id="8843261073-3">(</span><span class="ss">:traditional</span><span class="p" data-group-id="8843261073-3">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="8843261073-4">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="ss">:traditional</span><span class="p" data-group-id="8843261073-4">}</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="p" data-group-id="4516500698-3">(</span><span class="ss">:traditional</span><span class="p" data-group-id="4516500698-3">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="4516500698-4">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="ss">:traditional</span><span class="p" data-group-id="4516500698-4">}</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="p" data-group-id="8843261073-5">(</span><span class="ss">:latn</span><span class="p" data-group-id="8843261073-5">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="8843261073-6">{</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="p" data-group-id="4516500698-5">(</span><span class="ss">:latn</span><span class="p" data-group-id="4516500698-5">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="4516500698-6">{</span><span class="w">
|
||||
</span><span class="ss">:error</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="8843261073-7">{</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="8843261073-7">}</span><span class="w">
|
||||
</span><span class="p" data-group-id="8843261073-6">}</span><span class="w">
|
||||
</span><span class="p" data-group-id="4516500698-7">{</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="4516500698-7">}</span><span class="w">
|
||||
</span><span class="p" data-group-id="4516500698-6">}</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="p" data-group-id="8843261073-8">(</span><span class="s">"bork"</span><span class="p" data-group-id="8843261073-8">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="8843261073-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_number_system_type</span><span class="p" data-group-id="4516500698-8">(</span><span class="s">"bork"</span><span class="p" data-group-id="4516500698-8">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="4516500698-9">{</span><span class="w">
|
||||
</span><span class="ss">:error</span><span class="p">,</span><span class="w">
|
||||
</span><span class="p" data-group-id="8843261073-10">{</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="8843261073-10">}</span><span class="w">
|
||||
</span><span class="p" data-group-id="8843261073-9">}</span></code></pre>
|
||||
</span><span class="p" data-group-id="4516500698-10">{</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="4516500698-10">}</span><span class="w">
|
||||
</span><span class="p" data-group-id="4516500698-9">}</span></code></pre>
|
||||
</section>
|
||||
</section>
|
||||
<section class="detail" id="validate_territory/1">
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
@ -855,23 +855,23 @@ pool to disconnect within the given interval.</p><p>See <a href="https://hexdocs
|
||||
|
||||
<section class="docstring">
|
||||
|
||||
<p>Similar to <code class="inline">insert_all/2</code> but with the following differences:</p><ul><li>accepts rows as streams or lists</li><li>sends rows as a chunked request</li><li>doesn't autogenerate ids or does any other preprocessing</li></ul><p>Example:</p><pre><code class="makeup elixir" translate="no"><span class="nc">Repo</span><span class="o">.</span><span class="n">query!</span><span class="p" data-group-id="2392485721-1">(</span><span class="s">"create table ecto_ch_demo(a UInt64, b String) engine Null"</span><span class="p" data-group-id="2392485721-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="8807953961-1">(</span><span class="s">"create table ecto_ch_demo(a UInt64, b String) engine Null"</span><span class="p" data-group-id="8807953961-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="2392485721-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="8807953961-2">do</span><span class="w">
|
||||
</span><span class="kn">use</span><span class="w"> </span><span class="nc">Ecto.Schema</span><span class="w">
|
||||
|
||||
</span><span class="na">@primary_key</span><span class="w"> </span><span class="no">false</span><span class="w">
|
||||
</span><span class="n">schema</span><span class="w"> </span><span class="s">"ecto_ch_demo"</span><span class="w"> </span><span class="k" data-group-id="2392485721-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="8807953961-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">: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="2392485721-3">end</span><span class="w">
|
||||
</span><span class="k" data-group-id="2392485721-2">end</span><span class="w">
|
||||
</span><span class="k" data-group-id="8807953961-3">end</span><span class="w">
|
||||
</span><span class="k" data-group-id="8807953961-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="2392485721-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="2392485721-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="2392485721-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="2392485721-7">(</span><span class="n">i</span><span class="p" data-group-id="2392485721-7">)</span><span class="p" data-group-id="2392485721-6">}</span><span class="w"> </span><span class="k" data-group-id="2392485721-5">end</span><span class="p" data-group-id="2392485721-4">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="2392485721-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="2392485721-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="2392485721-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="2392485721-9">)</span><span class="w">
|
||||
</span><span class="n">rows</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nc">Stream</span><span class="o">.</span><span class="n">map</span><span class="p" data-group-id="8807953961-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="8807953961-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="8807953961-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="8807953961-7">(</span><span class="n">i</span><span class="p" data-group-id="8807953961-7">)</span><span class="p" data-group-id="8807953961-6">}</span><span class="w"> </span><span class="k" data-group-id="8807953961-5">end</span><span class="p" data-group-id="8807953961-4">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="8807953961-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="8807953961-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="8807953961-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="8807953961-9">)</span><span class="w">
|
||||
|
||||
</span><span class="c1"># schemaless</span><span class="w">
|
||||
</span><span class="p" data-group-id="2392485721-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="2392485721-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="2392485721-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="2392485721-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="2392485721-13">(</span><span class="p" data-group-id="2392485721-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="2392485721-12">]</span><span class="p" data-group-id="2392485721-11">)</span></code></pre>
|
||||
</span><span class="p" data-group-id="8807953961-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="8807953961-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="8807953961-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="8807953961-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="8807953961-13">(</span><span class="p" data-group-id="8807953961-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="8807953961-12">]</span><span class="p" data-group-id="8807953961-11">)</span></code></pre>
|
||||
</section>
|
||||
</section>
|
||||
<section class="detail" id="load/2">
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
@ -1162,23 +1162,23 @@ pool to disconnect within the given interval.</p><p>See <a href="https://hexdocs
|
||||
|
||||
<section class="docstring">
|
||||
|
||||
<p>Similar to <a href="#insert_all/2"><code class="inline">insert_all/2</code></a> but with the following differences:</p><ul><li>accepts rows as streams or lists</li><li>sends rows as a chunked request</li><li>doesn't autogenerate ids or does any other preprocessing</li></ul><p>Example:</p><pre><code class="makeup elixir" translate="no"><span class="nc">Repo</span><span class="o">.</span><span class="n">query!</span><span class="p" data-group-id="7786623730-1">(</span><span class="s">"create table ecto_ch_demo(a UInt64, b String) engine Null"</span><span class="p" data-group-id="7786623730-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="6865334133-1">(</span><span class="s">"create table ecto_ch_demo(a UInt64, b String) engine Null"</span><span class="p" data-group-id="6865334133-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="7786623730-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="6865334133-2">do</span><span class="w">
|
||||
</span><span class="kn">use</span><span class="w"> </span><span class="nc">Ecto.Schema</span><span class="w">
|
||||
|
||||
</span><span class="na">@primary_key</span><span class="w"> </span><span class="no">false</span><span class="w">
|
||||
</span><span class="n">schema</span><span class="w"> </span><span class="s">"ecto_ch_demo"</span><span class="w"> </span><span class="k" data-group-id="7786623730-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="6865334133-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">: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="7786623730-3">end</span><span class="w">
|
||||
</span><span class="k" data-group-id="7786623730-2">end</span><span class="w">
|
||||
</span><span class="k" data-group-id="6865334133-3">end</span><span class="w">
|
||||
</span><span class="k" data-group-id="6865334133-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="7786623730-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="7786623730-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="7786623730-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="7786623730-7">(</span><span class="n">i</span><span class="p" data-group-id="7786623730-7">)</span><span class="p" data-group-id="7786623730-6">}</span><span class="w"> </span><span class="k" data-group-id="7786623730-5">end</span><span class="p" data-group-id="7786623730-4">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="7786623730-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="7786623730-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="7786623730-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="7786623730-9">)</span><span class="w">
|
||||
</span><span class="n">rows</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nc">Stream</span><span class="o">.</span><span class="n">map</span><span class="p" data-group-id="6865334133-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="6865334133-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="6865334133-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="6865334133-7">(</span><span class="n">i</span><span class="p" data-group-id="6865334133-7">)</span><span class="p" data-group-id="6865334133-6">}</span><span class="w"> </span><span class="k" data-group-id="6865334133-5">end</span><span class="p" data-group-id="6865334133-4">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="6865334133-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="6865334133-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="6865334133-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="6865334133-9">)</span><span class="w">
|
||||
|
||||
</span><span class="c1"># schemaless</span><span class="w">
|
||||
</span><span class="p" data-group-id="7786623730-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="7786623730-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="7786623730-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="7786623730-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="7786623730-13">(</span><span class="p" data-group-id="7786623730-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="7786623730-12">]</span><span class="p" data-group-id="7786623730-11">)</span></code></pre>
|
||||
</span><span class="p" data-group-id="6865334133-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="6865334133-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="6865334133-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="6865334133-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="6865334133-13">(</span><span class="p" data-group-id="6865334133-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="6865334133-12">]</span><span class="p" data-group-id="6865334133-11">)</span></code></pre>
|
||||
</section>
|
||||
</section>
|
||||
<section class="detail" id="load/2">
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
@ -381,7 +381,7 @@ tables into the format of <code class="inline">imported_*</code> tables for a we
|
||||
|
||||
<section class="docstring">
|
||||
|
||||
<p>Renders export archive filename.</p><p>Examples:</p><pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </span><span class="n">archive_filename</span><span class="p" data-group-id="3014992691-1">(</span><span class="s">"plausible.io"</span><span class="p">,</span><span class="w"> </span><span class="c">_created_on</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="ld">~D[2024-12-31]</span><span class="p" data-group-id="3014992691-1">)</span><span class="w">
|
||||
<p>Renders export archive filename.</p><p>Examples:</p><pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </span><span class="n">archive_filename</span><span class="p" data-group-id="9043036474-1">(</span><span class="s">"plausible.io"</span><span class="p">,</span><span class="w"> </span><span class="c">_created_on</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="ld">~D[2024-12-31]</span><span class="p" data-group-id="9043036474-1">)</span><span class="w">
|
||||
</span><span class="s">"plausible_io_20241231.zip"</span></code></pre>
|
||||
</section>
|
||||
</section>
|
||||
@ -404,10 +404,10 @@ tables into the format of <code class="inline">imported_*</code> tables for a we
|
||||
|
||||
<section class="docstring">
|
||||
|
||||
<p>Safely renders content disposition for an arbitrary export filename.</p><p>Examples:</p><pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </span><span class="n">content_disposition</span><span class="p" data-group-id="0688312876-1">(</span><span class="s">"plausible_io_20241231.zip"</span><span class="p" data-group-id="0688312876-1">)</span><span class="w">
|
||||
<p>Safely renders content disposition for an arbitrary export filename.</p><p>Examples:</p><pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </span><span class="n">content_disposition</span><span class="p" data-group-id="3765681084-1">(</span><span class="s">"plausible_io_20241231.zip"</span><span class="p" data-group-id="3765681084-1">)</span><span class="w">
|
||||
</span><span class="s">"attachment; filename=</span><span class="se">\"</span><span class="s">plausible_io_20241231.zip</span><span class="se">\"</span><span class="s">"</span><span class="w">
|
||||
|
||||
</span><span class="gp unselectable">iex> </span><span class="n">content_disposition</span><span class="p" data-group-id="0688312876-2">(</span><span class="s">"📊.zip"</span><span class="p" data-group-id="0688312876-2">)</span><span class="w">
|
||||
</span><span class="gp unselectable">iex> </span><span class="n">content_disposition</span><span class="p" data-group-id="3765681084-2">(</span><span class="s">"📊.zip"</span><span class="p" data-group-id="3765681084-2">)</span><span class="w">
|
||||
</span><span class="s">"attachment; filename=</span><span class="se">\"</span><span class="s">plausible-export.zip</span><span class="se">\"</span><span class="s">; filename*=utf-8''%F0%9F%93%8A.zip"</span></code></pre>
|
||||
</section>
|
||||
</section>
|
||||
@ -726,14 +726,14 @@ tables into the format of <code class="inline">imported_*</code> tables for a we
|
||||
|
||||
</div>
|
||||
|
||||
<p>Creates a streamable Zip archive from the provided (named) Ecto queries.</p><p>Example usage:</p><pre><code class="makeup elixir" translate="no"><span class="p" data-group-id="7347002015-1">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="n">pool</span><span class="p" data-group-id="7347002015-1">}</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nc">Ch</span><span class="o">.</span><span class="n">start_link</span><span class="p" data-group-id="7347002015-2">(</span><span class="ss">pool_size</span><span class="p">:</span><span class="w"> </span><span class="mi">1</span><span class="p" data-group-id="7347002015-2">)</span><span class="w">
|
||||
<p>Creates a streamable Zip archive from the provided (named) Ecto queries.</p><p>Example usage:</p><pre><code class="makeup elixir" translate="no"><span class="p" data-group-id="6731044926-1">{</span><span class="ss">:ok</span><span class="p">,</span><span class="w"> </span><span class="n">pool</span><span class="p" data-group-id="6731044926-1">}</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nc">Ch</span><span class="o">.</span><span class="n">start_link</span><span class="p" data-group-id="6731044926-2">(</span><span class="ss">pool_size</span><span class="p">:</span><span class="w"> </span><span class="mi">1</span><span class="p" data-group-id="6731044926-2">)</span><span class="w">
|
||||
|
||||
</span><span class="nc">DBConnection</span><span class="o">.</span><span class="n">run</span><span class="p" data-group-id="7347002015-3">(</span><span class="n">pool</span><span class="p">,</span><span class="w"> </span><span class="k" data-group-id="7347002015-4">fn</span><span class="w"> </span><span class="n">conn</span><span class="w"> </span><span class="o">-></span><span class="w">
|
||||
</span><span class="nc">DBConnection</span><span class="o">.</span><span class="n">run</span><span class="p" data-group-id="6731044926-3">(</span><span class="n">pool</span><span class="p">,</span><span class="w"> </span><span class="k" data-group-id="6731044926-4">fn</span><span class="w"> </span><span class="n">conn</span><span class="w"> </span><span class="o">-></span><span class="w">
|
||||
</span><span class="n">conn</span><span class="w">
|
||||
</span><span class="o">|></span><span class="w"> </span><span class="n">stream_archive</span><span class="p" data-group-id="7347002015-5">(</span><span class="n">export_queries</span><span class="p" data-group-id="7347002015-6">(</span><span class="c">_site_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">1</span><span class="p" data-group-id="7347002015-6">)</span><span class="p">,</span><span class="w"> </span><span class="ss">format</span><span class="p">:</span><span class="w"> </span><span class="s">"CSVWithNames"</span><span class="p" data-group-id="7347002015-5">)</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">into</span><span class="p" data-group-id="7347002015-7">(</span><span class="nc">File</span><span class="o">.</span><span class="n">stream!</span><span class="p" data-group-id="7347002015-8">(</span><span class="s">"export.zip"</span><span class="p" data-group-id="7347002015-8">)</span><span class="p" data-group-id="7347002015-7">)</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">run</span><span class="p" data-group-id="7347002015-9">(</span><span class="p" data-group-id="7347002015-9">)</span><span class="w">
|
||||
</span><span class="k" data-group-id="7347002015-4">end</span><span class="p" data-group-id="7347002015-3">)</span></code></pre>
|
||||
</span><span class="o">|></span><span class="w"> </span><span class="n">stream_archive</span><span class="p" data-group-id="6731044926-5">(</span><span class="n">export_queries</span><span class="p" data-group-id="6731044926-6">(</span><span class="c">_site_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">1</span><span class="p" data-group-id="6731044926-6">)</span><span class="p">,</span><span class="w"> </span><span class="ss">format</span><span class="p">:</span><span class="w"> </span><span class="s">"CSVWithNames"</span><span class="p" data-group-id="6731044926-5">)</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">into</span><span class="p" data-group-id="6731044926-7">(</span><span class="nc">File</span><span class="o">.</span><span class="n">stream!</span><span class="p" data-group-id="6731044926-8">(</span><span class="s">"export.zip"</span><span class="p" data-group-id="6731044926-8">)</span><span class="p" data-group-id="6731044926-7">)</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">run</span><span class="p" data-group-id="6731044926-9">(</span><span class="p" data-group-id="6731044926-9">)</span><span class="w">
|
||||
</span><span class="k" data-group-id="6731044926-4">end</span><span class="p" data-group-id="6731044926-3">)</span></code></pre>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
@ -260,8 +260,8 @@ and MaxMind license key.</p></div>
|
||||
</a>
|
||||
<span class="text">Examples</span>
|
||||
</h2>
|
||||
<p> In the case of a DB-IP database:</p><pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </span><span class="n">database_type</span><span class="p" data-group-id="2544535186-1">(</span><span class="p" data-group-id="2544535186-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="7922521811-1">(</span><span class="p" data-group-id="7922521811-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="5618445338-1">(</span><span class="p" data-group-id="5618445338-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="0773960058-1">(</span><span class="p" data-group-id="0773960058-1">)</span><span class="w">
|
||||
</span><span class="s">"GeoLite2-City"</span></code></pre>
|
||||
</section>
|
||||
</section>
|
||||
@ -302,8 +302,8 @@ asynchronously.</p></li></ul><h2 id="load_db/1-examples" class="section-heading"
|
||||
</a>
|
||||
<span class="text">Examples</span>
|
||||
</h2>
|
||||
<p> Loading from a local file:</p><pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </span><span class="n">load_db</span><span class="p" data-group-id="6902422963-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="6902422963-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="5485544999-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="5485544999-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="6251240567-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="6251240567-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="4536050493-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="4536050493-1">)</span><span class="w">
|
||||
</span><span class="ss">:ok</span></code></pre>
|
||||
</section>
|
||||
</section>
|
||||
@ -332,21 +332,21 @@ asynchronously.</p></li></ul><h2 id="load_db/1-examples" class="section-heading"
|
||||
</a>
|
||||
<span class="text">Examples</span>
|
||||
</h2>
|
||||
<pre><code class="makeup elixir" translate="no"><span class="gp unselectable">iex> </span><span class="n">lookup</span><span class="p" data-group-id="3484527145-1">(</span><span class="s">"8.7.6.5"</span><span class="p" data-group-id="3484527145-1">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="3484527145-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="3484527145-3">%{</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="3800150093-1">(</span><span class="s">"8.7.6.5"</span><span class="p" data-group-id="3800150093-1">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="3800150093-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="3800150093-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">"names"</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="p" data-group-id="3484527145-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="3800150093-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">"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">"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="3484527145-4">}</span><span class="w">
|
||||
</span><span class="p" data-group-id="3484527145-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="3484527145-5">%{</span><span class="w">
|
||||
</span><span class="p" data-group-id="3800150093-4">}</span><span class="w">
|
||||
</span><span class="p" data-group-id="3800150093-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="3800150093-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">"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="3484527145-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="3800150093-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">"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">
|
||||
@ -355,12 +355,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">"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="p" data-group-id="3484527145-6">}</span><span class="w">
|
||||
</span><span class="p" data-group-id="3484527145-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="3484527145-7">%{</span><span class="w">
|
||||
</span><span class="p" data-group-id="3800150093-6">}</span><span class="w">
|
||||
</span><span class="p" data-group-id="3800150093-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="3800150093-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">"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="3484527145-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="3800150093-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">"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">
|
||||
@ -369,20 +369,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">"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="p" data-group-id="3484527145-8">}</span><span class="w">
|
||||
</span><span class="p" data-group-id="3484527145-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="3484527145-9">%{</span><span class="w">
|
||||
</span><span class="p" data-group-id="3800150093-8">}</span><span class="w">
|
||||
</span><span class="p" data-group-id="3800150093-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="3800150093-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">"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">"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="p" data-group-id="3484527145-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="3484527145-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="3484527145-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="3484527145-11">%{</span><span class="w">
|
||||
</span><span class="p" data-group-id="3800150093-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="3800150093-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="3800150093-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="3800150093-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">"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="3484527145-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="3800150093-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">"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">
|
||||
@ -391,13 +391,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">"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="p" data-group-id="3484527145-12">}</span><span class="w">
|
||||
</span><span class="p" data-group-id="3484527145-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="3484527145-13">[</span><span class="w">
|
||||
</span><span class="p" data-group-id="3484527145-14">%{</span><span class="w">
|
||||
</span><span class="p" data-group-id="3800150093-12">}</span><span class="w">
|
||||
</span><span class="p" data-group-id="3800150093-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="3800150093-13">[</span><span class="w">
|
||||
</span><span class="p" data-group-id="3800150093-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">"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="3484527145-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="3800150093-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">"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">
|
||||
@ -406,10 +406,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">"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="p" data-group-id="3484527145-15">}</span><span class="w">
|
||||
</span><span class="p" data-group-id="3484527145-14">}</span><span class="w">
|
||||
</span><span class="p" data-group-id="3484527145-13">]</span><span class="w">
|
||||
</span><span class="p" data-group-id="3484527145-2">}</span></code></pre>
|
||||
</span><span class="p" data-group-id="3800150093-15">}</span><span class="w">
|
||||
</span><span class="p" data-group-id="3800150093-14">}</span><span class="w">
|
||||
</span><span class="p" data-group-id="3800150093-13">]</span><span class="w">
|
||||
</span><span class="p" data-group-id="3800150093-2">}</span></code></pre>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
@ -1153,23 +1153,23 @@ pool to disconnect within the given interval.</p><p>See <a href="https://hexdocs
|
||||
|
||||
<section class="docstring">
|
||||
|
||||
<p>Similar to <a href="#insert_all/2"><code class="inline">insert_all/2</code></a> but with the following differences:</p><ul><li>accepts rows as streams or lists</li><li>sends rows as a chunked request</li><li>doesn't autogenerate ids or does any other preprocessing</li></ul><p>Example:</p><pre><code class="makeup elixir" translate="no"><span class="nc">Repo</span><span class="o">.</span><span class="n">query!</span><span class="p" data-group-id="8560634444-1">(</span><span class="s">"create table ecto_ch_demo(a UInt64, b String) engine Null"</span><span class="p" data-group-id="8560634444-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="7096686983-1">(</span><span class="s">"create table ecto_ch_demo(a UInt64, b String) engine Null"</span><span class="p" data-group-id="7096686983-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="8560634444-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="7096686983-2">do</span><span class="w">
|
||||
</span><span class="kn">use</span><span class="w"> </span><span class="nc">Ecto.Schema</span><span class="w">
|
||||
|
||||
</span><span class="na">@primary_key</span><span class="w"> </span><span class="no">false</span><span class="w">
|
||||
</span><span class="n">schema</span><span class="w"> </span><span class="s">"ecto_ch_demo"</span><span class="w"> </span><span class="k" data-group-id="8560634444-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="7096686983-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">: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="8560634444-3">end</span><span class="w">
|
||||
</span><span class="k" data-group-id="8560634444-2">end</span><span class="w">
|
||||
</span><span class="k" data-group-id="7096686983-3">end</span><span class="w">
|
||||
</span><span class="k" data-group-id="7096686983-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="8560634444-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="8560634444-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="8560634444-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="8560634444-7">(</span><span class="n">i</span><span class="p" data-group-id="8560634444-7">)</span><span class="p" data-group-id="8560634444-6">}</span><span class="w"> </span><span class="k" data-group-id="8560634444-5">end</span><span class="p" data-group-id="8560634444-4">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="8560634444-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="8560634444-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="8560634444-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="8560634444-9">)</span><span class="w">
|
||||
</span><span class="n">rows</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nc">Stream</span><span class="o">.</span><span class="n">map</span><span class="p" data-group-id="7096686983-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="7096686983-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="7096686983-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="7096686983-7">(</span><span class="n">i</span><span class="p" data-group-id="7096686983-7">)</span><span class="p" data-group-id="7096686983-6">}</span><span class="w"> </span><span class="k" data-group-id="7096686983-5">end</span><span class="p" data-group-id="7096686983-4">)</span><span class="w">
|
||||
</span><span class="p" data-group-id="7096686983-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="7096686983-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="7096686983-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="7096686983-9">)</span><span class="w">
|
||||
|
||||
</span><span class="c1"># schemaless</span><span class="w">
|
||||
</span><span class="p" data-group-id="8560634444-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="8560634444-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="8560634444-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="8560634444-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="8560634444-13">(</span><span class="p" data-group-id="8560634444-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="8560634444-12">]</span><span class="p" data-group-id="8560634444-11">)</span></code></pre>
|
||||
</span><span class="p" data-group-id="7096686983-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="7096686983-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="7096686983-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="7096686983-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="7096686983-13">(</span><span class="p" data-group-id="7096686983-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="7096686983-12">]</span><span class="p" data-group-id="7096686983-11">)</span></code></pre>
|
||||
</section>
|
||||
</section>
|
||||
<section class="detail" id="load/2">
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
|
||||
<script src="dist/handlebars.templates-43PMFBC7.js"></script>
|
||||
<script src="dist/sidebar_items-BFDCF64D.js"></script>
|
||||
<script src="dist/sidebar_items-58316C0C.js"></script>
|
||||
|
||||
<script src="docs_config.js"></script>
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user