-
Notifications
You must be signed in to change notification settings - Fork 218
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
initial internationalization commit with jquery.i18n plugin #46
initial internationalization commit with jquery.i18n plugin #46
Conversation
Could you explain what this plugin does and how it does it please :)? |
The plugin replaces strings (well, a little HTML too) within your HTML templates based on a "dictionary" file that corresponds to a user's language as reported by the browser, or the "lng" parameter in the url. The idea being that you can have many different dictionary files for many different languages and the site will automatically be translated into those languages, but only be required to have one HTML file. If the user's language is not found, then it will default back into English. https://github.com/wikimedia/jquery.i18n I exclusively used the data-i18n tag as described in the Data API above. To make changes to the site, you would need to edit the HTML file as you normally do, and then add/remove/update any of the translations in the default English translation file, en.json. Adding phrases simply requires that you make a new entry in the en.json file that exactly matches the fallback that you put into the HTML file itself. Then translators would come behind you and translate any changes you made into their respective languages. Or ideally, you would hold back any changes for a couple days and give translators a chance to make the translations into their respective languages before pushing any changes live. |
Wouldn't this make changes to the homepage harder in the future? What if the design is changed completely, for example? |
@felixvd I reviewed the markup, and it looks like it shouldn't be a problem. It looks like jquery.i89n is easy to implement. If - for say - the design is changed completely, there will be no problem since it's just a JS file. @dhpollack If you can get your pull request to automatically merge, I'll merge the pull request :) |
@PowerLemons I'll work on it and try to get something out today. |
Great. The only reason why this PR is conflicting is because of PR #47, which simply changed a link on line 189 of /index.html. It should be an easy fix. |
@PowerLemons I noticed that. I'm not a git expert, but I think that I got it. However, related to that Block.io issue, the getting started page has an entire modal that needs to be changed from DogeAPI to Block.io. It's not within the scope of this PR so I decided to leave it alone. |
I'll update the DogeAPI page on the Getting Started to be Block.io instead later when I have the time. Thank you for making this pull request. Pull request merged. |
initial internationalization commit with jquery.i18n plugin
@PowerLemons ach! For some reason it didn't add the internationalization JS to the main page. Something must have happened when I used the merge tool. Let me quickly try to fix this. Fortunately, this doesn't "break" anything, but internationalization won't work on the main page until it's added. |
I'll commit the fix when you're done :) |
No description provided.