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

Using additional root urls for localization purposes #115

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

golopupinsky
Copy link
Contributor

@golopupinsky golopupinsky commented Jan 15, 2017

Proposed change allows specifying multiple root urls for easy app localization.
Additional root urls keys in settings.plist should specify language two-letter code capitalized as following "urlEN", "urlFR", "urlNL".
Upon launch app will iterate over preferred device localizations and will try to find and assign a corresponding localized root url. If no corresponding localized urls found it will use the default "url" key value.
Addresses issue #73

@gliechtenstein
Copy link
Contributor

Thanks for the pull request and the idea. This inspired me to think about the problem a bit more, and I think we need to approach this from a deeper level, otherwise we will have to come up with ad hoc approaches every time we come across obstacles like this.

So my idea is two parts:

  1. instead of having multiple urls, support an href attribute on the settings.plist file, which is a dictionary, and is the same href object we use all across the app. In fact we use this scheme for opening the app via url scheme support url scheme #10

  2. set $env.locale global variable with the current device's locale.

When we compose these two together, we can open a home href which is relevant to the current user. The resulting settings.plist may look like this:

screen shot 2017-01-16 at 4 12 36 pm

Let me know what you think, thanks!

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

Successfully merging this pull request may close these issues.

2 participants