Questions tagged [angular-translate]

Angular-translate is an AngularJS module including lazy loading and pluralization.

angular-translate is an AngularJS module that makes your life much easier when it comes to i18n and l10n including lazy loading and pluralization.

See,

725 questions
8
votes
1 answer

Angular-Translate Variable Replacement in Title Attribute

I'm working on an AngularJS application with Angular-Translate 2.6.1. I have a span with a title attribute that will be translated, but it needs to display a variable as well.
Tirenoth
  • 83
  • 1
  • 6
8
votes
1 answer

AngularJS translate: Format dynamic dates

Using AngularJS and angular-translate I am trying to insert a date as parameter in a translated text. The basic task is documented by the translate package:

{{ 'MyText' | translate:{myDate:someControllerDate} }}

with this in a localized…
Thomas Jørgensen
  • 1,092
  • 2
  • 12
  • 19
8
votes
2 answers

Angular-Translate: Specify language per translated element

I am using angular-translate to translate my Angular app. This is working well so far. Now I have the requirement to translate some parts of the page in another language than the rest of the page. Specifically: The shell of the page (navigation,…
jbandi
  • 17,499
  • 9
  • 69
  • 81
8
votes
3 answers

Using AngularJS and Angular Translate how do you check if a string has been translated?

How do you check if a string has a translated value? I'm using AngularJS and AngularTranslate. I only want to display a value if it has a been translated. Angular Translate will show the untranslated string if no translation is available. I started…
Neil
  • 8,925
  • 10
  • 44
  • 49
7
votes
2 answers

Angular Translate not translating sometimes with one-time binding

I am using Angular 1.x and it's Angular Translate module. Recently, I switched all my translation bindings from two-way to one-time. Everything worked fine, until one day, however, I noticed that sometimes if I started refreshing the page, the…
Yulian
  • 6,262
  • 10
  • 65
  • 92
7
votes
2 answers

Angular translate directive vs filter: is XSS possible?

I have a translation key which is actually a HTML code, both encoded as well as unencoded. $scope.translations = { "html_code" : "<script>alert('Alert!');</script>", "html_code_full" : "", …
Aniket Sinha
  • 6,001
  • 6
  • 37
  • 50
7
votes
2 answers

Angular-translate and date formatter: how to translate month name?

In my app i'm using angular-translate https://github.com/angular-translate/angular-translate for translating my content. And also in my view i have such date formatter: {{article.CreatedAt | date:'dd MMM yyyy':'UTC'}} but when i set polish,…
brabertaser19
  • 5,678
  • 16
  • 78
  • 184
7
votes
1 answer

What is the purpose of interpolationId in angular $translate

From Angular translate documentation: $translate(translationId[, interpolateParams], interpolationId); What is the purpose of interpolationId parameter, can you also give an example?
Thịnh Phạm
  • 2,528
  • 5
  • 26
  • 39
7
votes
2 answers

angular translate sanitize / escape

I got a strange or maybe intended behavior with angular translate. Our value strategie is $translateProvider.useSanitizeValueStrategy('sanitize'); We use mostly the translate filter in our application, but when it comes to special characters we…
Anditthas
  • 531
  • 1
  • 3
  • 11
7
votes
0 answers

Getting all translations in a specific namespace from angular-translate

In order to populate a service with data, I would like to get all translations beneath a specific namespace from angular-translate's $translate service. Basically what I am looking for is something like this (which is not…
Claus Conrad
  • 512
  • 7
  • 14
7
votes
1 answer

Angular-Translations: display translation for dynamically found translation key

My angular controller may generate the messages, that I intent to translate using angular-translations. In controller I currently assign a variable to translation key, such as: $scope.info = "core.projectconfig.created"; where that key has its…
onkami
  • 8,791
  • 17
  • 90
  • 176
6
votes
1 answer

Is there a way to translate css selectors(::after, ::before) content using ngx-translate?

Is there a way to translate css selectors(::after, ::before) content using ngx-translate ? .custom-file-label::after { content: "Browse" }
6
votes
1 answer

AngularJS: How to translate a md-placeholder?

I have a very simple datepicker using AngularJS and I want to give it a placeholder to translate it using AngularJS translate (like I do usually in my project). Here's my HTML code:
Orsu
  • 405
  • 6
  • 19
6
votes
5 answers

angularjs ng-repeat the dropdown values from different i18n files

Here is an example json i18n language file for English: { "project": { "SPONSORINFO": { "MAIN" : "Select the Sponsor Name", "SPONSORLIST": [ {"spons" :"SponsorName 1" }, {"spons" :"SponsorName 2" } ] } …
cplus
  • 1,115
  • 4
  • 22
  • 55
6
votes
1 answer

How to translate the input text (datepicker) value dynamically using angular-translate?

I am using angular-translate to provide i18n to my application, I am able to translate labels, button-text etc. properly. The problem I am facing is when I am trying to change the date according to the selected language locale. The date is selected…
Rishabh
  • 3,752
  • 4
  • 47
  • 74
1 2
3
48 49