shahryarjb

shahryarjb

Hello, I have a project which is umbrella, and every elixir project under it has 3 languages. those are elixir project and I have 3 Phoenix project too.
then I want you to suggest me how to prepare these project like what language my client wants.

it should be noted every project has custom error message and lines explain what to do.

I saw the Gettext, but it targets a Phoenix project but in my project I have many languages files in every project which are different.

I’m very confused, how can handle it , there are 25000 words that we should translate to 3 different languages



For more details:

my client sends a request to my phoenix project and it sends 3 request to 3 elixir project under umbrella and my phoenix doesnt know what error they may get back to phoenix because they have custom error message for themselves

Thanks

Showing Posts 1 to 1

Kurisu

Kurisu

I am also insterrested in how experienced Elixir developpers handle translations in umbrella project, but here is my thought.

I think once you get used to Gettext usage in a single Phoenix app, in a umbrella project it will be basically the same thing.

For general messages translation, we use gettext, and for domain specific messages we have dgettext. It is very well explained in the docs.

  • So you can have all your translations in a single non Phoenix app (let’s name it core), and import its Gettext backend (Core.Gettext) in the other apps.
    So what you call custom custom error message for themselves, I understand specific to a single Phoenix app in your umbrella project, is a good candidate for its own domain (for example the otp_name of this phoenix app).
    Then all common messages to the whole project will fall into the default translations.

  • But you can also have a Gettext backend per app. Here I’m not sure how easy it would be… But my idea is to create a domain for the shared translations, I mean those who will be used in multiple apps. Once you’ll have translations done in a given app, you’ll just copy the shared domain transtions files in its priv/gettext folder and paste it in all other apps that need it, private folder.

I Hope this will be helpfull for you. ^^

— All posts loaded —

Where Next? Top

Trending in Questions Top

RSP87
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
nseaSeb
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
RemyXRenard
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
velrest
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
brecabral
Documentation While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
samoloth
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
FlyingNoodle
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 Top

mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
marciok
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
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Dmk
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
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
webofbits
With AI doing more of the implementation work, I’ve been wondering how much coding I should deliberately keep doing myself. My main conc...
#ai
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews