<key alias="settingsLoaded"><![CDATA[Settings for '%0%' are loaded!]]></key>
The value of $scope.mailbox.eMail is a string like this: [email protected]
But if I load my page with this custom property editor in a custom section I get only this notification:
The parameter is truncate to 1 char. Have anyone an explanation for this?
Or is the syntax for using a parameter in localizationService wrong? Unfortunately, I have not found this in the documentation on umbraco.github.io/belle/
I had a similar case, where I needed to translate the messages in the notifications. But I didn't need to pass any arguments - just use the translation key from the respective language file in /Umbraco/Config/Lang/
<language alias="en" intName="English (UK)" localName="English (UK)" lcid="" culture="en-GB">
...
<area alias="analytics">
<key alias="settingsSaved">Settings have been saved</key>
<key alias="accountDetailsSaved">Account details have been saved</key>
<key alias="profileDetailsSaved">Profile details have been saved</key>
</area>
</language>
How use parameter with localizationService in Angularjs?
Hi all,
I have this line in a angularjs controller:
My key in en.xml looks like this:
The value of $scope.mailbox.eMail is a string like this: [email protected]
But if I load my page with this custom property editor in a custom section I get only this notification:
The parameter is truncate to 1 char. Have anyone an explanation for this?
Or is the syntax for using a parameter in localizationService wrong? Unfortunately, I have not found this in the documentation on umbraco.github.io/belle/
Best regards
Sören
I have a look into umbraco.services.js and I realized why it doesn't work.
I need to pass an array as a parameter instead of strings.
In my example above the code in angularjs controller must look like this:
I hope this helps anyone with similar problems.
Best
Sören
A minor detail, but you don't actually need the "tokens" array. You can just do
Other than that you spared me a headache :-)
Hi Sören
Thanks for sharing this
I had a similar case, where I needed to translate the messages in the notifications.
But I didn't need to pass any arguments - just use the translation key from the respective language file in /Umbraco/Config/Lang/
I managed to solve it like this:
where the language file hae a format like this:
/Bjarne
Hi Bjarne,
thank you. Yes, this is the way without passing any arguments and will work if you have language entries without variables.
Sören
is working on a reply...