Globalization pt-br

1 Answer 164 Views
Globalization Localization NumericTextBox
Almir
Top achievements
Rank 1
Almir asked on 09 Sep 2021, 01:37 PM

How to leave the NumericTextBox format in Brazilian Portuguese? I already left it that way but it doesn't work, returns the error:

Error in /turbo_modules/@telerik/kendo-intl@2.3.0/dist/npm/main.js (633:12)
NoLocale: Missing locale info for 'pt-br'

 


<template>
  <div class="example-wrapper row">
    <div class="col-xs-12 col-sm-6 example-col">
      <localization :language="'pt-br'">
        <intl :locale="'pt-br'">
          <p>NumericTextBox</p>
          <numerictextbox :default-value="123.45" :format="'c'">
          </numerictextbox>
          <p>Slider</p>
          <slider
            :buttons="true"
            :step="1"
            :default-value="7"
            :min="1"
            :max="10"
          >
          </slider>
        </intl>
      </localization>
    </div>
  </div>
</template>
<script>
import {
  IntlProvider,
  load,
  loadMessages,
  LocalizationProvider
} from "@progress/kendo-vue-intl";
import { NumericTextBox, Slider } from "@progress/kendo-vue-inputs";

import likelySubtags from "cldr-core/supplemental/likelySubtags.json";
import currencyData from "cldr-core/supplemental/currencyData.json";
import esNumbers from "cldr-numbers-full/main/es/numbers.json";
import esCurrencies from "cldr-numbers-full/main/es/currencies.json";

load(likelySubtags, currencyData, esNumbers, esCurrencies);

import esMessages from "./es.json";
loadMessages(esMessages, "es");

export default {
  components: {
    numerictextbox: NumericTextBox,
    slider: Slider,
    intl: IntlProvider,
    localization: LocalizationProvider
  }
};
</script>

1 Answer, 1 is accepted

Sort by
0
Accepted
Petar
Telerik team
answered on 14 Sep 2021, 08:38 AM

Hi Almir,

Here is an example that demonstrates how you can change the format of the NumericTextBox, based on the selected locale. 

Check the provided example and let me know if you have questions about the suggested implementation.

Regards,
Petar
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Almir
Top achievements
Rank 1
commented on 15 Sep 2021, 04:18 PM

Thanks!
Petar
Telerik team
commented on 16 Sep 2021, 06:23 AM

You are welcome! :)
Tags
Globalization Localization NumericTextBox
Asked by
Almir
Top achievements
Rank 1
Answers by
Petar
Telerik team
Share this question
or