Open burakkilic opened 8 years ago
Can't you use injector to inject gettext and use it? var getT = $injector.get('getText');
Thank you, I'll try
doing the above works, but it only marks the string for translation. You cannot to gettextCatalog.getString inside the config because you can't inject another service (gettextCatalog) into the config.
What we need to do is replace
if ($injector.has('$translate') && useTranslateService) {
return $injector.get('$translate').instant(message);
} else {
return false;
}
with
if ($injector.has('$translate') && useTranslateService) {
return $injector.get('$translate').instant(message);
} else if ($injector.has('gettextCatalog') && useTranslateService) {
return $injector.get('gettextCatalog').getString(message);
} else {
return false;
}
could you guys do this please?
Hello;
I am using angular-gettext for translation.
I need to inject gettext service to configuration but it didn't work.
What should I do to translate alert messages?