Addon Localization?

Hey @alienspaces - yes - I’m really happy w/ what we’ve put together. Essentially, there are two pieces to it:

  1. inside your addon, we’ve created an en.js file here: app/locales/ember-cli-your-addon-name/en.js. You place all your translations inside there.

  2. also inside the addon, we’ve created an initializer that looks like this:

import Ember from 'ember';
import translations from '../locales/ember-cli-your-addon-name/en';

export function initialize() {
  if(!Ember.I18n.translations){
    Ember.I18n.translations = {};
  }
  Ember.I18n.translations['ember-cli-your-addon-name'] = translations;
  Ember.I18n.locale = 'en';
};

export default {
  name: 'ember-cli-your-addon-name-localizations',
  initialize: initialize
};

Note, with this approach, your translations are available at t 'ember-cli-your-addon-name.foo'

This is obviously a little rough, but hoping it can get you on the right path.