Open thenovacreator opened 9 years ago
Hi,
Have you tried ?
<timer interval="1000" language="de" >{{yearUnit}}</timer>
It is written here : http://siddii.github.io/angular-timer/index.html#/clock-timer-i18n
Yes this works but not for my usecase.
Does this work? I haven't had a chance to test it, but it isn't one of the examples you've given:
<timer interval="1000" language="de">{{minutes}} minute{{minutesS}}</timer>
Is there any way to use i18n version, but have days, hours and minutes in separate containers?
I need to style each element separately, and if I use this example:
<timer interval="1000" start-time="1357020000000" language="de" >{{yearUnit}}</timer>
I get this result:
<span class="ng-binding ng-scope">3 Jahre, 18 Tage, 9 Stunden, 14 Minuten, 44 Sekunden</span>
But the desired result:
<span class="ng-binding ng-scope">
<span>3 Jahre</span>
<span>18 Tage</span>
<span>9 Stunden</span>
<span>14 Minuten</span>
</span>
Is there any way to achieve this?
Hi @keligijus :smile:
I guess we could split this value $scope.yearUnit
https://github.com/siddii/angular-timer/blob/master/app/js/_timer.js#L236 in :
$scope.dayI18n
$scope.hourI18n
$scope.yearUnit
is built there : https://github.com/siddii/angular-timer/blob/master/app/js/i18nService.js#L53 and generated with https://github.com/EvanHahn/HumanizeDuration.js
Do you think you could provide a PR ?
Hi @polomarcus :)
I'll try to do my best. If I can figure it out and make it work, will definitely provide a PR
I really do not get how your Plural / Singular units System is working. I want for singular "Minute" and for plural "Minuten" and tried:
Minute{{MinutenS}} Minuten{{MinuteS}} Minute{{MinuteN}}
but none of them seems to work. What could i do to get this working? The syntax is very confusing.
Maybe it would be easier if you would use a syntax like so [minute|minutes]. This would ne inspired by http://laravel.com/docs/5.0/localization#pluralization
http://siddii.github.io/angular-timer/index.html#/clock-timer-i18n just don't work!