Closed MMastrofini closed 8 years ago
Hi, would it be possible to understand what the specific issue is? Would it be possible to have a plunker that shows the issue?
I followed the step by step procedure. The module is working correctly, provided I don't use special characters. When I use special characters, I see their corresponding code, e.g. & rather than & or à rather than à.
E.g. in my HTML I have <p>{{"FooterA" | translate}}</p>
. In my localized json file I have {"FooterA":"--- è ---"}
and the output in the HTML page is --- è ---
app.js is just
angular .module('LASTHorizon', [ 'ngRoute', 'ngCookies', 'ui.router', 'ngSanitize', 'pascalprecht.translate', 'tmh.dynamicLocale', 'LocalStorageModule' ]);
app.controller('IndexCtrl', ['$scope', 'LocaleService', function ($scope, LocaleService) {
$scope.currentLocaleDisplayName = LocaleService.getLocaleDisplayName();
$scope.localesDisplayNames = LocaleService.getLocalesDisplayNames();
$scope.visible = $scope.localesDisplayNames &&
$scope.localesDisplayNames.length > 1;
$scope.changeLanguage = function (locale) {
LocaleService.setLocaleByDisplayName(locale);
};
}]
);
This project is tmh.dynamicLocale, are you looking for pascalprecht.translate?
On Wednesday, July 6, 2016, MMastrofini notifications@github.com wrote:
I followed the step by step procedure. The module is working correctly, provided I don't use special characters. When I use special characters, I see their corresponding code, e.g. & rather than & or à rather than à.
E.g. in my HTML I have
{{"FooterA" | translate}}
. In my localized json file I have {"FooterA":"--- è ---"}and the output in the HTML page is --- è ---app.js is just
angular .module('LASTHorizon', [ 'ngRoute', 'ngCookies', 'ui.router', 'ngSanitize', 'pascalprecht.translate', 'tmh.dynamicLocale', 'LocalStorageModule' ]);
app.controller('IndexCtrl', ['$scope', 'LocaleService', function ($scope, LocaleService) { $scope.currentLocaleDisplayName = LocaleService.getLocaleDisplayName(); $scope.localesDisplayNames = LocaleService.getLocalesDisplayNames(); $scope.visible = $scope.localesDisplayNames && $scope.localesDisplayNames.length > 1; $scope.changeLanguage = function (locale) { LocaleService.setLocaleByDisplayName(locale); }; }] );
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/lgalfaso/angular-dynamic-locale/issues/105#issuecomment-230833747, or mute the thread https://github.com/notifications/unsubscribe/AAX44lSxXa2ntW4OOWwSvmkiL11uVZlAks5qS9xNgaJpZM4JGPpR .
I am very sorry, I initially thought the problem was somewhere else. Thanks.
When I use characters like
&
,à
orè
, I see their corresponding code, e.g.&
for&
orà
forà
. My version is 0.1.32.