romenigld

romenigld

It is possible to use gettext internationalization for select different types of OS or versions of the lib Phoenix?

Hello guys I have some questions about the Gettext for internationalization for a two different types of use cases I was thinking.
It is not for create different idioms like is the purpose of the lib.
But to show and hide the code of different type of commands accordingly the Operational System (OS).

I will try to explain better, for example:

  • I was thinking about to use the gettext for change the code by selecting the options if the user uses the OS: macos or windows or linux. And using the internationalization rather than using the country like(es, PT) for Spanish and Portuguese. Put the OS you want to show the commands. Like win_os, mac_os, lin_os.
  • Other ideia i was thinking is using this for example I write some tutorial or book code or even in the documentation. I have that version of the code with Phoenix 1.4 and you can select like for other version 1.6 for watching the updated code for other versions.

Like you select the version of the Phoenix and you see tutorial accordingly the version you selected.

Anyone can clear my mind if this is possible to do it with this way?
Or anyone have tried this?
Or suggests other way to do that?

Most Liked

LostKobrakai

LostKobrakai

Internationalization is already complex enough I wouldn’t overload it with even more possible axis to maintain permutations for. I’d rather look into more purpose built options for the features you think of rather than (ab)using gettext, which is just “bare strings”.

E.g. take a look at Message Format (v1 or v2) and tell me that’s not a lot to work around the constraint that you deal only with strings in internationalization.

Where Next?

Popular in Questions Top

chokchit
** (DBConnection.ConnectionError) connection not available and request was dropped from queue after 2733ms. You can configure how long re...
New
vertexbuffer
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
New
Harrisonl
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service. Currently when I de...
New
fireproofsocks
I’m working on defining a simple Ecto schema for a table (in PostGres), but I don’t see where I can define a column as NOT NULL. Conside...
New
ovidiubadita
Hey all, I discovered Elixir and I love it. I always wanted to learn a functional programming and I intended to go for Haskell, but afte...
New
itssasanka
Hi all, Trying to get some more clarity over utc_datetime and naive_datetime for Ecto: The documentation above suggests that while ...
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New
lucidguppy
I have a super simple question about elixir - how would I take a file like this foo bar baz and output a new file that enumerates th...
New
earth10
Hi, I’m just starting to build a side-project with Elixir and Phoenix and doing some basic test with Elixir alone. What strikes me is th...
New

Other popular topics Top

siddhant3030
Hi, I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New
stefanluptak
Hello everybody, usually, I use a 29" ultra-wide monitor for VSCode which can easily accomodate explorer (files panel) + file with code ...
New
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New
fayddelight
I tried installing elixir 1.11.2 erlang 23.3.4 via asdf in my zsh shell. Enabled the versions locally and globally. When I list them ...
New
romenigld
I am trying to run a deploy with docker and I successfully runned with this command: docker build -t romenigld/blog-prod . but when I t...
New
hariharasudhan94
Lets say I have map like this fetching from my database %{"_id" => #BSON.ObjectId<58eb1a7a9ad169198c3dXXXX>, "email" => ...
New
vegabook
I’m brand new to Phoenix and I have stripped one of the demo applications to the bone. I just want to get an svg up on the screen. Here i...
New
jononomo
For some reason my phoenix channels are working for me in my local dev environment, but as soon as I deploy via Docker, I get a 403 error...
New
svb
Hi! Currently I want to submit a form by pressing the Enter key. However, since my input field is of type “textarea” this is just adds a...
New

Latest on Elixir Forum

Elixir Forum

We're in Beta

About us Mission Statement