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
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.
Popular in Questions
Other popular topics
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
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance









