Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add const file for string #11

Open
codeithuman opened this issue Jul 6, 2017 · 4 comments
Open

Add const file for string #11

codeithuman opened this issue Jul 6, 2017 · 4 comments

Comments

@codeithuman
Copy link

How should we manage strings within our phoenix applications? Flash messages, error messages, validation messages, etc.

@ryanlntn
Copy link
Member

ryanlntn commented Jul 6, 2017

If these are user facing strings then I think we should go with some type of internationalization. https://hexdocs.pm/gettext/Gettext.html Seems to be what Phoenix includes by default.

More info: https://medium.com/@erichkist/using-gettext-to-internationalize-a-phoenix-application-ceb410407ea5

@silasjmatson
Copy link

silasjmatson commented Jul 6, 2017

@codeithuman Jumping on to what @ryanlntn said, I think I18n is the route we should go.

linguist is also an option if we want something a bit simpler than gettext.

@ryanlntn
Copy link
Member

ryanlntn commented Jul 6, 2017

Totally down with linguist too. I'd prefer to work in plain elixir code. There are some advantages to Gettext though like the mix gettext.extract --merge task to automatically sync all existing entries to .pot template files and merge them into locale-specific .po files. As far as I know linguist doesn't support this.

@silasjmatson
Copy link

Yeah, linguist is more of a key-value store than a full-on I18n solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants