Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dictionary Items in Rich Text Field Type #903

Closed
Trobeloo opened this issue Oct 26, 2022 · 5 comments
Closed

Dictionary Items in Rich Text Field Type #903

Trobeloo opened this issue Oct 26, 2022 · 5 comments

Comments

@Trobeloo
Copy link

Hello,
We have a multi language site and use Dictionary Items in Forms. In our current Umbraco 8 site we created a custom Field type to display Dictionary Items as Html.
We are converting to Umbraco 10 and latest Forms version. Is it possible to use the new Rich Text Field Type to display Dictionary Items.
I tried to put item tag "#PR License Hint" in the field but it doesn't get replaced by the dictionary item content.

@AndyButland
Copy link

I just checked this and can confirm it doesn't currently work no. The reason is that dictionary items are only parsed if they are the only text in the field, which made sense for most other use cases (like captions, default values etc.), where you want to translate the whole text.

For rich text of course there's HTML tags as well, so currently this isn't being recognised as a field containing tags to replace.

Will see if we can add support for this though in an upcoming release.

@Trobeloo
Copy link
Author

Thanks Andy.
I think I was using the wrong FieldType as the "Title and descrription" field type is doing what I need.
In the Body property I enter a Dictionary Items "#PR License Hint"
In English it contains:

To learn more about our licensing system, please visit this page.

When the form is displayed the Html is correctly rendered.

@AndyButland
Copy link

Yes, it'll work with "Title and description" as for that one the value isn't stored embedded within one or more an HTML tag. I've been working on it this morning for rich text too though, and think we can make it work for that field too.

@AndyButland
Copy link

We'll include replacements of magic strings within HTML tags in the next release.

@Trobeloo
Copy link
Author

Trobeloo commented Nov 2, 2022

Great

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants