Questions tagged [ember-i18n]

Question regarding Internationalization for Ember

Internationalization for Ember.

Github page

44 questions
14
votes
3 answers

Where do I put the translations for Ember-I18n in Ember-CLI?

I am new to ember, and ember-cli and I'm still learning where everything goes. I'm trying to add multilingual support with the ember-i18n module. I have the dependencies installed with bower bower install cldr ember-i18n --save And I've got my…
Weston
  • 2,732
  • 1
  • 28
  • 34
4
votes
0 answers

Use link-to in subexpression

I use the ember-i18n library a lot and sometimes I want to output a link in a translation. Given this example: {{ t readmore link=(link-to 'top posts' 'posts') }} my translation is Read more on the {{ link }} page. But the output is not as I…
Willem de Wit
  • 8,604
  • 9
  • 57
  • 90
4
votes
2 answers

ember-i18n precompiled translations with Handlebars Runtime

ember-i18n readme file says: if you haven't precompiled your translations, you'll need to include the full Handlebars, not just handlebars-runtime.js in your application. Problem is that even using precompiled templates, once we use function…
Marinho Brandão
  • 637
  • 1
  • 9
  • 30
3
votes
3 answers

Handlebars helper i18n

If I'm using an Ember.js built in helper input {{input value=query class="form-input" placeholder="Search"}} I want to replace the placeholder string "Search" with a translated version of that string. Normally, if I wasn't already using the input…
dylanjha
  • 2,303
  • 4
  • 28
  • 47
2
votes
1 answer

Modify how ember-i18n localizations are loaded, split localization strings from main app.js

I am trying to modify the way ember-i18n localizations are loaded. What I want to do is have the localizations in a separate file from the main app javascript file. Ideally, the structure would remain the same as now. So I would have…
tehmaestro
  • 1,010
  • 2
  • 11
  • 21
2
votes
1 answer

Dynamically render components in Ember for ember-i18n

First of all, ember's component helper doesn't help in this case. That would only help if I knew how many components I needed to render, and in what order. I need to be able to render components based on a string like: {{user}} has made a bid of…
JeremyTM
  • 593
  • 6
  • 17
2
votes
1 answer

How to translate controller member arrays in Ember-i18n?

In my customer controller I have defined some constant arrays that are used for populating select input (dropdown) options. import Ember from 'ember'; export default Ember.Controller.extend({ occupations: [ {code: 'student', name:…
jaaksarv
  • 1,440
  • 1
  • 11
  • 16
2
votes
2 answers

Ember i18n dynamic link inside of translation

I was wondering how I could pass a link into to {{t}} helper. I am using v3.0.1 of Ember i18n at the moment. Obviously you cannot pass a link helper into a t helper (something like {{ t "some-translation-string" link={{#link-to 'page'…
Jacob van Lingen
  • 8,989
  • 7
  • 48
  • 78
2
votes
0 answers

Recommended way to rerender page in Ember after language switch

I need to rerender whole page application after language has switched. I don't like to use observers for it because of performance issues. Language switch is done by a Ember.View. I tried to rerender parentView after changing Ember.I18n.translations…
jelhan
  • 6,149
  • 1
  • 19
  • 35
2
votes
5 answers

Ember: Passing localisation key to component template

I have a modal-dialog component template, which contains the following
{{t title}}
So, I am using the ember-i18n [1] library to add localisation to ember. Now I am calling that component template from the actual…
st-h
  • 2,444
  • 6
  • 37
  • 60
1
vote
1 answer

How do I keep website content translated even after navigating to another page? (ember.js ember-i18n)

I'm currently implementing multiple languages into a web app using ember-i18n and am looking for a way in which visitors and users can choose which language they want at any time. I'm following a tutorial found here, creating a drop down menu which…
user98826
  • 37
  • 4
1
vote
1 answer

Error: Attempting to inject an unknown injection: 'service:i18n'

i have the following Problem with ember-i18n: Error: Attempting to inject an unknown injection: 'service:i18n' at Registry.validateInjections (ember.debug.js:2303) at ember.debug.js:1538 at runInDebug (ember.debug.js:5813) at Object.runInDebug…
Daniel
  • 126
  • 2
  • 5
1
vote
1 answer

Using i18n in Mixin?

Is there a way to use i18n in Mixin. I'd like to create Mixins as configurations for my fields, and I need to translate labels, but as far as I've read https://github.com/jamesarosen/ember-i18n/wiki/Doc:-i18n-Service I don't see an opportunity to…
1
vote
0 answers

Configure ember i18n

I'm trying to use the ember addon ember-i18n, i already read all the documentation, but i just can't figure out why is not working. I have already installed the addon and generated three locations: en-us, pt-BR and es and configure following the…
user5543517
1
vote
2 answers

how to remember ember-i18n language choice on browser refresh

I tried first something like this in my application controller: init123: function() { var locale; if (this.session.get('lang') === null || this.session.get('lang') === undefined) locale = ENV.i18n.defaultLocale; else locale =…
PowPi
  • 164
  • 1
  • 1
  • 10
1
2 3