Topic
  • 3 replies
  • Latest Post - ‏2013-06-25T15:06:06Z by GerardoMG
markboyd
markboyd
7 Posts

Pinned topic Text transform to Mixed case - Title Case

‏2013-06-24T20:05:42Z |

Is there a way to have HATS transform all CAPS host text into a Title case format, that is the first character of every word being uppercase, the rest being lower case.

I can use the thransform: Capitalize to make lowercase have the first character capitalized, but I need all CAPS to become lowercase except for the first character.   "IBM HATS" would be transformed to "Ibm Hats"

 

Updated on 2013-06-24T20:21:00Z at 2013-06-24T20:21:00Z by markboyd
  • tmparker
    tmparker
    519 Posts

    Re: Text transform to Mixed case - Title Case

    ‏2013-06-25T05:23:34Z  

    Hi Mark,

    Can you explain this a little more?  Where are you trying to convert the text, in the widget itself or after the fact or when someone click a button, etc...?  There are always things that can be done in code but it really depends on how you need to implement this.  This can be as easy as a line or two of JavaScript or possibly a little more work by creating a custom widget.

    Thanks

    Tim

  • markboyd
    markboyd
    7 Posts

    Re: Text transform to Mixed case - Title Case

    ‏2013-06-25T11:19:18Z  
    • tmparker
    • ‏2013-06-25T05:23:34Z

    Hi Mark,

    Can you explain this a little more?  Where are you trying to convert the text, in the widget itself or after the fact or when someone click a button, etc...?  There are always things that can be done in code but it really depends on how you need to implement this.  This can be as easy as a line or two of JavaScript or possibly a little more work by creating a custom widget.

    Thanks

    Tim

    Hi Tim,

    This would be applied to the default transformation.  Any text that is all caps would be transformed into capitalized. 

    So, we would most likely have to modify all of the widgets that are used in the app?

  • GerardoMG
    GerardoMG
    33 Posts

    Re: Text transform to Mixed case - Title Case

    ‏2013-06-25T15:06:06Z  

    Hi.

    Try to apply text replacements on the components using regexp to identify what you want and then use it to apply a style for the text transform.

    Here is an example that takes words with at least tree capital letters in the beginning and puts them in a span.


    textReplacement="([A-Z]{3@cm.})(.*)=@lt.span@gt.$1@lt./span@gt.$2,regularExpression,matchLTR"
     

    Hope it helps.
    /G