Leoruwer
How to properly name i18n msgid
Hi all,
I’ve recently started to internacionalize a website which currently is localized as pt_BR (Brazilian portuguese) and I’m confused how I should organized the Gettext msgid’s.
For example, I currenlty have this piece of text “Mais visitadas” which means “Most visited” in English.
So, in other words, I’m replacing <p>Mais visitadas</p> to something like <p><%= gettext("Mais visitadas") %></p>.
My question is: does it make sense to use the pt_BR locale as the msgid or should I do something like <p><%= gettext("Most visited") %></p> and then set the pt_BR in the PO file?
I’m asking because, even being a portuguese site, we usually write all the code/docs/etc in English. But does this same idea worth for the Gettext msgid? Or would it be just a matter of taste?
Trending in Questions
Other Trending 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
- #elixirconf-us
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #performance
- #security











Most Liked
hauleth
I would use English
msgidbecause IMHO it can help with translating to others languages in future.kokolegorille
The only time I use local msg_id is when I am told NOT to support multi languages… because it’s painful when You have to support them after all.