benkeil
As a followup from How does it work? · Issue #152 · elixir-cldr/cldr · GitHub
The repo has files like de_DE, de_IT, de_AT. Why these are not valid during configuration? If the goal of all that sub packages is, to save space, then it should also be possible to just download e.g. de_AT.
defmodule WidgetWeb.Cldr do
use Cldr,
default_locale: "en-GB",
locales: ["en-GB", "de-DE", "th"],
add_fallback_locales: false,
otp_app: :widget_web,
providers: [Cldr.Number, Cldr.Message],
precompile_number_formats: ["¤¤#,##0.##"],
precompile_transliterations: [{:latn, :arab}, {:thai, :latn}],
generate_docs: true,
force_locale_download: false
end
== Compilation error in file lib/widget_web/services/cldr.ex ==
** (Cldr.UnknownLocaleError) Failed to install the locale named "de_DE". The locale name is not known.
(ex_cldr 2.23.0) lib/cldr/install.ex:84: Cldr.Install.do_install_locale_name/3
(elixir 1.12.2) lib/enum.ex:930: Enum."-each/2-lists^foreach/1-0-"/2
(ex_cldr 2.23.0) lib/cldr/install.ex:28: Cldr.Install.install_known_locale_names/1
(ex_cldr 2.23.0) lib/cldr.ex:81: Cldr.install_locales/1
(ex_cldr 2.23.0) expanding macro: Cldr.Backend.Compiler.__before_compile__/1
lib/widget_web/services/cldr.ex:1: WidgetWeb.Cldr (module)
(elixir 1.12.2) lib/kernel/parallel_compiler.ex:319: anonymous fn/4 in Kernel.ParallelCompiler.spawn_workers/7
Trending in Questions
Hello!
Suppose you are building workflow (order / task / payment) processing system with the following requirements:
Each workflow con...
New
I’m in search of an Elixir library that offers PDF generation capabilities similar to Ruby’s Prawn. While there have been discussions abo...
New
I’m looking to build a personal workflow to quickly deploy web applications written in elixir/phoenix, for local consumption (ie not on t...
New
Before I dive in myself, did anyone successfully sprinkle Hologram into their existing LiveView app?
Looking for hints regarding:
Addi...
New
Kia ora,
We have been using elixir-google-api to connect to Google Drive. However, with the updates to Tesla due to CVEs this is now bro...
New
Hi all, I wanted to ask how the community is dealing with post-release steps.
Today we have Ecto migrations, which make sure that the db...
New
Hello,
I have an Elixir backend that implements a custom protocol over TCP. I want to load test the backend and assess the performance o...
New
Other Trending Topics
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve.
They are GUI (Emerge) and State management (S...
New
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
Emily is an Elixir library that runs Nx computations on Apple’s MLX. Install it as the default Nx backend and Nx, defn, Axon, Nx.Serving,...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #blog-post
- #phoenix_html
- #iex
- #graphql
- #ai
- #genstage
- #elixirconf-us
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #security
- #hex











Showing Posts 1 to 7- Show Best Posts
- Show All Posts (oldest first)
- Show All Posts (newest first)
kip
As the message says:
There is no CLDR locale “de-DE” so an exception is raised during compilation. Replace “de-DE” with “de” and you should be good to go. In fact a backend configuration can be reduced to the following given the various defaults:
benkeil
I still don’t get it, in this repo: cldr/common/main at main · unicode-org/cldr · GitHub is a file
de_DE, which is a CLDR locale, or not?kip
The locales available to
ex_cldrare those in the available_locales.json file in the ex_cldr repository. Or you can see the local files in json format in the priv/cldr/locales directory.You can also see the available locales as follows:
If you look inside the CLDR repo in common/main/de_DE.xml file you’ll see it actually has no locale content and therefore not an available locale. As noted in the issue you raised, the locale
deis already “German as spoke in Germany” and thereforede-DEisn’t populated. The same is true foren-US- in CLDR its an empty locale file becauseenis already “English as spoken in the US”.benkeil
Jesus, now I got you. But I still belief it would be nice to allow
de-DE. I guess a lot of people fall about this and the locale for Germany is willde-DE. It clearer.Like cldr/common/main/de_DE.xml at main · unicode-org/cldr · GitHub is an alias to cldr/common/main/de.xml at main · unicode-org/cldr · GitHub it should be allowed in the code to use it.
kip
A user can still specify
de-DEif they want,ex_cldrwill resolve to the nearest available locale which will bedeif it is configured.benkeil
The thing is nobody understand that you should use
deforde-DEbutde-ATfor Austrian.kip
You can also use
de-DEfrom a user experience point of view. It is only configuration of a backend that has this consideration.