1

I install Magento 2, with Bosnian Language: bs_Latn_BA and I notice that price format is wrong.

For example, if price is: 1345.67 Magento show me: KM 1,346

Bosnian correct format is: 1.345,67 KM

thousand separator: . decimal separator: , precision: 2 currency name on right side: 0.00 KM

Where I can change currency format for this language?

0

Have you tried injecting Magento\Framework\Pricing\PriceCurrencyInterface? You could make a plugin to modify the rendering of price.

/**
     * Format price value
     *
     * @param float $amount
     * @param bool $includeContainer
     * @param int $precision
     * @param null|string|bool|int|\Magento\Framework\App\ScopeInterface $scope
     * @param \Magento\Framework\Model\AbstractModel|string|null $currency
     * @return float
     */
    public function format(
        $amount,
        $includeContainer = true,
        $precision = self::DEFAULT_PRECISION,
        $scope = null,
        $currency = null
    );
  • I found problem, original one. On server there is new version of intl php module. ICU Data version was 50.1, old. When I upgrade to 54.1, working. probably in old ICU data there is no good definition for bs_Latn_BA – Kristijan Smiljanić Jul 11 '16 at 6:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.