title: React-intl define messages outside of react
body: <p>I have utils.js file.</p>
  
  <pre><code>export function categoryIdToCategoryName(categoryId) {
  let name;
  switch (categoryId) {
      case constants.RISK_CATEGORY_LOW:
          name = 'low';
          break;
      case constants.RISK_CATEGORY_MEDIUM:
          name = 'medium';
          break;
      case constants.RISK_CATEGORY_HIGH:
          name = 'high';
          break;
      case constants.RISK_CATEGORY_CRITICAL:
          name = 'critical';
          break;
      default:
          console.warn('see: /utils/risk.js', 'categoryIdToCategoryName:', categoryId);
          name = 'unknown';
     }
      return name;
  }
  </code></pre>
  
  <p>I would like to translate this texts - [low, medium, high, critical] using <a href="https://github.com/yahoo/react-intl" rel="noreferrer">https://github.com/yahoo/react-intl</a>. So I defined messages</p>
  
  <pre><code>const translations = defineMessages({
  riskLow: {
      id: 'utils.risk.low',
      defaultMessage: 'low',
  },
  riskMedium: {
      id: 'utils.risk.medium',
      defaultMessage: 'medium',
  },
  riskHigh: {
      id: 'utils.risk.high',
      defaultMessage: 'high',
  },
  riskCritical: {
      id: 'utils.risk.critical',
      defaultMessage: 'critical',
  }
  });
  </code></pre>
  
  <p>And now what is the last step?</p>
  
  <p>How can I pass the messages back to the function? There should be <code>formatMessage</code> function but it's only in react context.</p>