You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 20, 2018. It is now read-only.
I have an application that requires localization. I'd like to be able to deliver a manifest that changes based on user locale. There's a minimal amount of content in the manifest itself that would require translation (name, short_name, description, maybe icons), but what would be nice is if that content could live in my existing translation workflow and I could populate the manifest at build time.
use the addon to lookup a translation, something like const name = get(this, 'intl').t('ember-web-app.name');
update the manifest values with translations
user receives the manifest for their specific locale
What I'm not sure of, if this is something this addon should have as a feature or if there's another addon here that extends this one? I'm open to suggestions or ideas. I also have some cycles coming up that I could work on one or the other.
The text was updated successfully, but these errors were encountered:
@jonpitch this is a great idea! I think this would be a really great feature to have. If you want to start working on it, that would be awesome, let me know if I can be of any help.
Thanks @san650, I spent a little time gathering my thoughts and I have an alternate approach that I wouldn't mind your input on.
ember-i18n and ember-intl are pretty flexible in that you can use various translation file formats, specify different locations within the tree for content, that seems like overkill for ember-web-app. Instead, what I'd like to propose is perhaps ember-web-app knows about a build config, something like:
'ember-web-app': {enabled: true,locales: [{code: 'en-us',name: 'English name',short_name: 'English short name'},{code: 'it-it',name: 'Italian Name',short_name: 'Italian short name'}]}
ember-web-app would just be responsible for generating a set of manifest files. I think this is the most flexible, so the consumer could add something like this to their ember-cli-build.js:
The only thing I'm not sure on is the consumer might need the ability to swap out these files in the <head>, using something like ember-cli-ifa or ember-cli-head. As the consuming app, I don't want to have to know about all the meta tags ember-web-app knows about, but I don't want ember-web-app to have to know about how I want to localize my application. What do you think?
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I have an application that requires localization. I'd like to be able to deliver a manifest that changes based on user locale. There's a minimal amount of content in the manifest itself that would require translation (
name
,short_name
,description
, maybeicons
), but what would be nice is if that content could live in my existing translation workflow and I could populate the manifest at build time.I think an approach could be something like:
const name = get(this, 'intl').t('ember-web-app.name');
What I'm not sure of, if this is something this addon should have as a feature or if there's another addon here that extends this one? I'm open to suggestions or ideas. I also have some cycles coming up that I could work on one or the other.
The text was updated successfully, but these errors were encountered: