Answers.Body: <p>I couldn't find a way to do this (So hopefully someone can come back on this, or it will be part of Commerce in future!)</p>
  
  <p>But what I did was to create an array matching the ISO's to the symbol then checked the array if the symbol existed. Luckily we only offered a few currencies so it wasn't so much of a pain.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-05T12:27:04.023Z
Answers.Text: Simple mapping arrays are a nice way to customise an output. I usually setup a config/businesslogic.php configuration file to keep things organised. Then in the template (this is good use case for a Twig macro) I can get the data: `{% set map = craft.config.get('currencyMap', 'businesslogic') %}`.
Answers.UserDisplayName: carlcs
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-06T12:40:19.320Z
Answers.Text: @carlcs That's a great idea, might do that in future. Always had issues using custom variables etc across templates
Answers.UserDisplayName: Jason Mayo
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-05T08:57:54.637Z
Answers.LastActivityDate: 2017-07-05T08:57:54.637Z
Answers.UserDisplayName: Jason Mayo
Answers.Body: <p>You don't need to create your own symbol map - it exists as a yii translation:</p>
  
  <pre><code>{% set localeData = craft.i18n.getLocaleData() %}
  {% set currencyIso = 'USD' %}
  
  {{ localeData.getCurrencySymbol(currencyIso)  }}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-06T12:40:39.257Z
Answers.Text: Wish I'd known this on a previous project! Upvoted!
Answers.UserDisplayName: Jason Mayo
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-10T09:08:56.307Z
Answers.Text: @JasonMayo I try to learn Craft by answering questions here. This one was easy: I searched for the '€' symbol in the code base and researched how to access the translation data. I'm glad it was helpful.
Answers.UserDisplayName: Oliver Stark
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-05T13:12:27.410Z
Answers.LastActivityDate: 2017-07-05T13:12:27.410Z
Answers.UserDisplayName: Oliver Stark
Body: <p>Is there a way to output the currency symbols for each accepted payment currency in a Craft Commerce site?</p>
  
  <p>Consider the following simplified example;</p>
  
  <pre><code>{% set currencies = craft.commerce.paymentCurrencies %}
  {% if currencies|length &gt; 1 %}
  &lt;select name="paymentCurrency"&gt;
      {% for currency in currencies %}
          &lt;option&gt;{{ currency.iso }}&lt;/option&gt;
      {% endfor %}
  &lt;/select&gt;
  {% endif %}
  </code></pre>
  
  <p>Instead of the currency ISO code being output in the option, I also want to show the symbol. I can't find a method for doing so.</p>
  
Tags: <plugin-craftcommerce><currency>
Title: Output currency symbols
ThreadText: # Output currency symbols
  
  (Asked by: username_0 on 2017-07-05)
  
  Is there a way to output the currency symbols for each accepted payment currency in a Craft Commerce site?
  
  Consider the following simplified example;
  
  ```
  {% set currencies = craft.commerce.paymentCurrencies %}
  {% if currencies|length > 1 %}
  <select name="paymentCurrency">
      {% for currency in currencies %}
          <option>{{ currency.iso }}</option>
      {% endfor %}
  </select>
  {% endif %}
  
  ```
  
  Instead of the currency ISO code being output in the option, I also want to show the symbol. I can't find a method for doing so.
  
  **Tags:** plugin-craftcommerce, currency
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_3 on 2017-07-05. Score: 4 | Accepted answer
  
  You don't need to create your own symbol map - it exists as a yii translation:
  
  ```
  {% set localeData = craft.i18n.getLocaleData() %}
  {% set currencyIso = 'USD' %}
  
  {{ localeData.getCurrencySymbol(currencyIso)  }}
  
  ```
  
  > **Comments:**
  > **username_1**: Wish I'd known this on a previous project! Upvoted!  
  > **username_3**: @username_1 I try to learn Craft by answering questions here. This one was easy: I searched for the '€' symbol in the code base and researched how to access the translation data. I'm glad it was helpful.  
  
  ---
  
  ### Answer by username_1 on 2017-07-05. Score: 2
  
  I couldn't find a way to do this (So hopefully someone can come back on this, or it will be part of Commerce in future!)
  
  But what I did was to create an array matching the ISO's to the symbol then checked the array if the symbol existed. Luckily we only offered a few currencies so it wasn't so much of a pain.
  
  > **Comments:**
  > **username_2**: Simple mapping arrays are a nice way to customise an output. I usually setup a config/businesslogic.php configuration file to keep things organised. Then in the template (this is good use case for a Twig macro) I can get the data: `{% set map = craft.config.get('currencyMap', 'businesslogic') %}`.  
  > **username_1**: @username_2 That's a great idea, might do that in future. Always had issues using custom variables etc across templates  
  
  ---
  
  