Closed bjarnef closed 9 years ago
Great stuff @bjarnef I still have a lot to learn about localisation inside Umbraco & recommend you type up your findings for the documentation project for Umbraco on GitHub so others can learn from this.
@warrenbuckley where do you think these info should be added? http://umbraco.github.io/Belle/#/api or somewhere on our.umbraco.org?https://our.umbraco.org/documentation/Extending-Umbraco/
I think both places would be best @bjarnef to be honest.
Just discovered a way to localize the text in the
So now I know these ways to localize in Umbraco 7: Element directive:
<localize key="@anylytics"></localize>
or<localize key="@anylytics" />
Localize attribute directive on element + attribute to localize as value using https://github.com/umbraco/Umbraco-CMS/blob/5b9a98ad6ae9e63322c26f7b162204e34f7fcb54/src/Umbraco.Web.UI.Client/src/common/directives/util/localize.directive.js
e.g.
<input type="text" localize="placeholder" placeholder="@analytics_selectAnAccount">
or<option value="" localize="label" label="@analytics_selectAnAccount"></option>
Attribute on umb-control-group directive (no localize attribute directive - just e.g.
label="@myKey"
) using this for<umb-control-group>
https://github.com/umbraco/Umbraco-CMS/blob/5b9a98ad6ae9e63322c26f7b162204e34f7fcb54/src/Umbraco.Web.UI.Client/src/common/directives/html/umbcontrolgroup.directive.js: ``