Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Jesse Andrews 191 posts 716 karma points c-trib
    Jan 25, 2018 @ 03:15
    Jesse Andrews
    0

    Need a way to extend Translation Manager to support custom data types

    I have a number of custom/installed data types that aren't currently supported by Translation Manager (one of the more prominent ones being SEO Checker). It would be helpful to have plugin support so that developers can integrate currently unsupported data types into the translation pipeline. Maybe something similar to what umbraco does with property converters?

  • Kevin Jump 2341 posts 14868 karma points MVP 8x c-trib
    Jan 25, 2018 @ 09:04
    Kevin Jump
    100

    Hi

    yes translation manager does support extending for unsupported data types. There are value converters (very similar to property converters)

    For example this is the Value Converter for StackedContent (included in the package) https://gist.github.com/KevinJump/a982a7cb7234b9ed4c2f41fdb708d7c4 and this is one for the RJP MultiURL Picker https://gist.github.com/anonymous/8dddfa36480ab36e50d457600db33127

    However If the property only stores the values as a string (so it's not a JSON object) you can tell Translation Manager to treat it as text in the config.

    within Config/Translations.Config there is a mappers section you can add the propertyEditorAlias of the property - if it the property just stores content as text & or HTML

    <mappers>
      <text>
        <text>My.Example.PropertyEditor,SomeOther.Editor</text>
        <html>My.Example.PropertyEditor</html>
      </text>
    </mappers>
    

    any properties in here will just be treated as text - the important thing to note is if a property contains html elements it needs to be included in both the text and html tags in the config.

  • Jesse Andrews 191 posts 716 karma points c-trib
    Jan 25, 2018 @ 22:21
    Jesse Andrews
    0

    Good to know. I'll give this a try and let you know whether I run into issues.

    Also, is this information documented anywhere on https://jumoo.co.uk/translate/? I had checked the documentation section, but didn't see this tidbit.

Please Sign in or register to post replies

Write your reply to:

Draft