Example #1
0
        ?>
        </tr>
    <?php 
    }
    ?>
</table>

<h2 id="numberformatter-patterns">NumberFormatter Patterns <small><a href="#numberformatter-patterns">#</a></small></h2>

<table class="table table-hover">
    <tr>
        <th>Formatter Type</th>
        <th>Pattern</th>
    </tr>
    <?php 
    foreach (NumberFormatterInfo::getPatternTable($locale) as $type => $pattern) {
        ?>
        <tr>
        <th><?php 
        echo NumberFormatterInfo::$types[$type][0];
        ?>
<br /><small><?php 
        echo NumberFormatterInfo::$types[$type][1];
        ?>
</small></th>
        <td><code><?php 
        echo str_replace(';', ';<br>', $pattern);
        ?>
</code></td>
        </tr>
    <?php 
Example #2
0
        <td><?php 
    echo Locale::getDisplayScript($locale, Yii::$app->language) ?: '<em>none</em>';
    ?>
</td>
        <td><?php 
    echo Locale::getDisplayScript($locale, $locale) ?: '<em>none</em>';
    ?>
</td>
    </tr>
    <tr>
        <th>Default Currency</th>
        <?php 
    $defaultCurrency = \app\models\NumberFormatterInfo::getDefaultCurrency($locale);
    ?>
        <td><?php 
    echo $defaultCurrency ? $defaultCurrency . ' (' . \app\models\NumberFormatterInfo::getDefaultCurrencySymbol($locale) . ')' : '<em>none</em>';
    ?>
</td>
        <td><?php 
    echo $defaultCurrency ? ResourceInfo::getCurrencyName($defaultCurrency, Yii::$app->language) : '<em>none</em>';
    ?>
</td>
        <td><?php 
    echo $defaultCurrency ? ResourceInfo::getCurrencyName($defaultCurrency, $locale) : '<em>none</em>';
    ?>
</td>
    </tr>
</table>


<h2 id="icu-data-default">ICU Data <small><a href="#icu-data-default">#</a></small></h2>