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
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
Hello,
I know there is an approach for handling lists that allows for optimized traversal, but I can’t recall the specific method (somet...
New
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New
So my question is quite simple and i have found no conclusive answer on forum, google or AI.
Should we use :erlang.float for Integer to ...
New
Documentation
While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New
If a change or preparation module uses Ash.Changeset.get_argument/2 or Ash.Query.get_argument/2 (or any of the other get_argument functio...
New
Other Trending Topics
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
Hi there! We created Gust: A task orchestrator inspired by Airflow.
For those who have never heard about Aiflow, it’s a Python-based wor...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
With AI doing more of the implementation work, I’ve been wondering how much coding I should deliberately keep doing myself.
My main conc...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixirconf-us
- #ai
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming











Showing Posts 1 to 7- Show Best Posts
- Show All (oldest first)
- Show All (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.