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 translation support #3

Open
forevermatt opened this issue Jul 7, 2017 · 1 comment
Open

Add translation support #3

forevermatt opened this issue Jul 7, 2017 · 1 comment

Comments

@forevermatt
Copy link
Contributor

Update the view templates, etc. so that the page can be displayed in the main languages we support.

@forevermatt forevermatt mentioned this issue Jul 7, 2017
@forevermatt
Copy link
Contributor Author

One useful tool for formatting messages (especially dates) is the msgfmt_format_message (or MessageFormatter) feature in PHP.

For reference (since it wasn't immediately apparent for me), if you scroll down this page to the table, you will see several codes available to use in your messages.

Example:

echo msgfmt_format_message(
    'en',
    'Today is {0,date,long}',
    [time()]
);

That will output the following:

Today is July 12, 2017

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

No branches or pull requests

1 participant