-
Notifications
You must be signed in to change notification settings - Fork 21
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
My try to extend the concept #14
Comments
looks very good, it could help a lot |
Till @ebidel finds time to look into this, meanwhile I created a separate repository with a more refined version. I did this, because I need the element in my project and the changes are quite massive. |
Still on my todo list :) On Thu, Aug 6, 2015 at 12:52 AM Peter Kaske [email protected]
|
just a quick question, if im using the polymer-starter-kit, where would the locales folder need to be? Thanks |
The locales folder is expected to be top-level, alongside your site's code. On Thu, Aug 6, 2015 at 12:15 PM mandaman2k [email protected] wrote:
|
This looks great and really useful for Projects where i am using Polymer. I have some remarks, and would like your feedback.
3.Async loading: In terms of loading the locales, it seems that it should be behind a async loading pattern, and so only load the files needed for their locales. @ebidel , the work you did on AppShell seems relevant, and so maybe a 2nd demo with at least AppShell and delayed loading of the correct locale is a good idea. |
1-2. For auto detection, you could try Generally, I wouldn't use this element as-is in production. For Santa Tracker, we had a build gulp script that replaces all the occurrences of https://github.com/google/santa-tracker-web/blob/master/gulp_scripts/i18n_replace/index.js |
@ebidel Thanks for the feedback, and advice. For me its:
I will see what patterns exist for a Polymer Service component. |
Update
As mentioned further down the thread, I created a new project called i18-n because I work with it in a quite big project and changes are also quite massive.
Just updating this first message to redirect you right away so you don't accidentally waste time on old stuff (aka the branch in my i18n-msg fork).
Cheers
Maybe you're interested in giving this a look and providing some feedback.
Kinda forward of me, sooo... sorry.
I have a new branch in my fork of your project called i18n-msg-domain
I tried to expand the hole
i18n-msg
stuff and created an additionali18n-msg-domain
component.It make it possible to declaratively define the location of the locale files, what language to use and additionally the ability to define language domains. The part of loading the locale files is moved over to the new component.
So now we can throw multiple
i18n-msg-domain
elements on the page, for different languages and even to target different sets ofi18n-msg
elements (by using the languagedomain
).i18n-msg
was also modified big time by me to make it work together with the newi18n-msg-domain
.I also added HTML sanitizing (I created an element/behavior called dom-purify for this).
A demo is in the component page under the demo area so you can try it out quickly.
So if you have to time to look into this, I would be more than thankfull.
The text was updated successfully, but these errors were encountered: