Skip to content

Allow locale switching via URL param#978

Merged
monfresh merged 1 commit intomasterfrom
mb-allow-locale-switching
Jan 24, 2017
Merged

Allow locale switching via URL param#978
monfresh merged 1 commit intomasterfrom
mb-allow-locale-switching

Conversation

@monfresh
Copy link
Contributor

Why: To make it easier to switch between English and Spanish, and
to see what has and has not yet been translated.

How: Add a before action in ApplicationController to set the locale
based on the URL param if it is present, or fall back to the default.

Note that eventually, we might implement something more user friendly,
such as fetching the locale from the domain name, such as login.gov.es
or es.login.gov, or perhaps in the path, like login.gov/es/profile.

Copy link
Contributor

@jessieay jessieay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Perhaps add a note about this in the readme or something so we have somewhere to point people when they ask about switching locales?

@monfresh
Copy link
Contributor Author

Good idea. Will add to readme.

**Why**: To make it easier to switch between English and Spanish, and
to see what has and has not yet been translated.

**How**: Add a before action in ApplicationController to set the locale
based on the URL param if it is present, or fall back to the default.

Note that eventually, we might implement something more user friendly,
such as fetching the locale from the domain name, such as login.gov.es
or es.login.gov, or perhaps in the path, like login.gov/es/profile.
@monfresh monfresh force-pushed the mb-allow-locale-switching branch from dd26ee2 to ead38f8 Compare January 23, 2017 22:47
@monfresh
Copy link
Contributor Author

Readme updated. PTAL.

@jessieay
Copy link
Contributor

Looks good! Merge away

@monfresh monfresh merged commit 229165f into master Jan 24, 2017
@monfresh monfresh deleted the mb-allow-locale-switching branch January 24, 2017 00:26
amoose pushed a commit that referenced this pull request Feb 7, 2017
**Why**: To make it easier to switch between English and Spanish, and
to see what has and has not yet been translated.

**How**: Add a before action in ApplicationController to set the locale
based on the URL param if it is present, or fall back to the default.

Note that eventually, we might implement something more user friendly,
such as fetching the locale from the domain name, such as login.gov.es
or es.login.gov, or perhaps in the path, like login.gov/es/profile.
amoose pushed a commit that referenced this pull request Feb 24, 2017
**Why**: To make it easier to switch between English and Spanish, and
to see what has and has not yet been translated.

**How**: Add a before action in ApplicationController to set the locale
based on the URL param if it is present, or fall back to the default.

Note that eventually, we might implement something more user friendly,
such as fetching the locale from the domain name, such as login.gov.es
or es.login.gov, or perhaps in the path, like login.gov/es/profile.
amoose pushed a commit that referenced this pull request Feb 28, 2017
**Why**: To make it easier to switch between English and Spanish, and
to see what has and has not yet been translated.

**How**: Add a before action in ApplicationController to set the locale
based on the URL param if it is present, or fall back to the default.

Note that eventually, we might implement something more user friendly,
such as fetching the locale from the domain name, such as login.gov.es
or es.login.gov, or perhaps in the path, like login.gov/es/profile.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants