title: Angular translate on custom attributes
body: <p>I have a switch widget which uses custom data attribute value to label itself.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>.switch.switch-text .switch-label::before {
    right: 1px;
    color: #c2cfd6;
    content: attr(data-hide);
    }
    
    .switch.switch-text .switch-label::after {
    left: 1px;
    color: #c2cfd6;
    content: attr(data-show);
    opacity: 0;
  }
  
  .switch.switch-text .switch-input:checked ~ .switch-label::before {
    opacity: 0;
  }
  
  .switch.switch-text .switch-input:checked ~ .switch-label::after {
    opacity: 1;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;label class="switch switch-text switch-pill switch-primary"&gt;
                              &lt;input type="checkbox" class="switch-input" checked&gt;
                              &lt;span class="switch-label" attr.data-show="{{GLOBALS.ACTIONS.SHOW | translate}}" attr.data-hide="{{GLOBALS.ACTIONS.HIDE | translate}}"&gt;&lt;/span&gt;
                              &lt;span class="switch-handle"&gt;&lt;/span&gt;
                          &lt;/label&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>But it just does not work. I have looked at different answers relating to similar problem but some says it works some says it doesn't. If I user without attr. in front I get a binding error anyway since it does not recognise the attribute.</p>
  
  <p>How can I translate the value of custom attribute using angular translate?</p>