Telerik Forums
KendoReact Forum
1 answer
42 views

I am aware there is https://github.com/telerik/kendo-react-messages, but the repo doesn't seem to be updated regularly with every new release.

So my question is: What is the best way to maintain translation files and where can I get complete json files for all components as it is documented in https://www.telerik.com/kendo-react-ui/components/grid/globalization/#toc-messages for example?

Wissam
Telerik team
 answered on 06 Nov 2023
1 answer
105 views
Dear Support Team,

I am currently utilizing your Kendo React PDF processing tool for my project. While the user interface displays Spanish characters correctly and clearly, the generated PDF reports do not mirror this accuracy. Instead, they seem to render different characters.

Your assistance in resolving this matter would be greatly appreciated.

I really appreciate any help you can provide.

UI

 

PDF

Konstantin Dikov
Telerik team
 answered on 05 Jul 2023
1 answer
101 views
In below chart I am trying to make all text to show in localized format. Values on category axis and values on tooltip also needs in localized. 
Is there any way to convert numbers into localized format or I need to pass localized numbers and text as chart values
Vessy
Telerik team
 answered on 14 Feb 2023
1 answer
58 views

Hi all, i have the attached grid, in the title of the second column i wanna put a translated text that i pass to the page via props, if i put that text variable in another item (as <h1/>) the text is rendered correctly, when i put it in column title it gave me the error '"Cannot read properties of undefined (reading '''strings')".

 

so how can i put a translated text via parent variable in a child component into GridColumn title?

Vessy
Telerik team
 answered on 09 Dec 2022
1 answer
69 views

I would like to ask, where are the localization messages in Kendo React packages. In Kendo jQuery was translation mesages included in kendo-ui package, but in React, I'm not able to found the messages. ...or in Kendo React the messages are not available and I must create messages JSON object and translate by self? 

Thanks a lot.

Vessy
Telerik team
 answered on 25 Oct 2022
1 answer
50 views

Hello,

 

I am able to set the localization service to the message in english but when I change the dropdown value to spanish the message remains in english, do you have a workaround for this?

const DrawerContainer = (props: any) => {
 

constlocalizationService = useLocalization();

    const locales: LocaleInterface[] = [
        {
          language: "en-US",
          locale: "en",
          name: "English",
        },
        {
          language: "es-ES",
          locale: "es",
          name: "Spanish",
        },
        {
          language: "sv",
          locale: "sv",
          name: "Swedish",
        },
      ];
 const [currentLocale, setCurrentLocale] = React.useState(
        locales[0]
    );
  const [expanded, setExpanded] = React.useState(true);
  const [drawerExpanded, setDrawerExpanded] = React.useState(true);
  const [items, setItems] = React.useState([
    {
      text: localizationService.toLanguageString('custom.personalInfo', ''),
      route: '/profile'
    },
    {
      separator: true
    },
    {
      text: 'Sites',
      route: '/sites'
    },
    {
      separator: true
    },
    {
      text: 'My Compressed Air System',
      route: '/mycasystem'
    },
    {
      text: Array(25).fill('\xa0').join('') + 'Compressors',
      route: '/mypage'
    },
    /* {
      text: 'My Compressor',
      route: '/mycomp'
    }, {
      text: 'Compare',
      route: '/compare'
    },
    {
      text: 'Dashboard',
      route: '/dashboard'
    },
    {
      text: 'Customers',
      route: '/customers'
    } */

  ]);

 const selected = setSelectedItem(props.location.pathname);
 

return<div>

<LocalizationProvider language={currentLocale.language}>
            <IntlProvider locale={currentLocale.locale}>
<DropDownList
                                value={currentLocale}
                                textField="name"
                                onChange={(e) => {
                                    setCurrentLocale(e.target.value);
                                }}
                                data={locales}
                            />
          <div className="custom-toolbar">
        <Button icon="menu" onClick={handleClick}  />
        <span  className="title" id="burguer-menu">{localizationService.toLanguageString('custom.menu', '')}</span>
      </div>
    <Drawer expanded={expanded} position={'start'} mode={'push'} width={300} items={items.map(item => ({
      ...item,
      selected: item.text === selected
    }))} onSelect={onSelect}>
      <DrawerContent>
        {props.children}
      </DrawerContent>
   

</Drawer>

            </IntlProvider>
          </LocalizationProvider>
  </div >;
};
export default withRouter(DrawerContainer);
Konstantin Dikov
Telerik team
 answered on 07 Jun 2022
1 answer
108 views

Hello,

 

I am trying to localize the following snippet of code.

  const [steps, setSteps] = React.useState<Array<stepsInterface>>([
    { label: {localizationService.toLanguageString('custom.AddCompressor', '')}, isValid: undefined },
    { label: 'Add properties', isValid: undefined }
  ]);

 

The problem is that label only accepts strings and throws an error, hence the localization does not work, some help would be appreciated.

 

Kind regards

 

Daniela

 

 

Filip
Telerik team
 answered on 26 May 2022
1 answer
47 views

Hello,

 

I am trying to localize my entire application but I cannot get this example working; https://www.telerik.com/kendo-react-ui/components/intl/l10n/reacting-to-language-changes/

My code is below.

import { Message } from '../../common/Message';

loadMessages(messages["es"], "es");

const DetailComponent = (props: any) => {

    const locales: LocaleInterface[] = [
        {
          language: "en-US",
          locale: "en",
        },
        {
          language: "es-ES",
          locale: "es",
        },
      ];
    const [currentLocale, setCurrentLocale] = React.useState<LocaleInterface>(
        locales[0]
    );
const defaultMessages = {
  [yesterdaysMessageKey]: "Yesterday was a good day!",
  [todaysMessages]: "Today is a good day as well!",
  [tomorrowsMessageKey]: "Tomorrow will be even better!",

};

 

return (

<LocalizationProvider language={currentLocale.language}>
<IntlProvider locale={currentLocale.locale}>
<p>
 <strong> <Message messageKey={yesterdaysMessageKey} defaultMessage={defaultMessages[yesterdaysMessageKey]}/>:</strong> {dataItem.nickname}

</p>

</IntlProvider>
</LocalizationProvider>
  );

};

 

import * as React from "react";
import { useLocalization } from "@progress/kendo-react-intl";
interface MessageProps {
  messageKey: string;
  defaultMessage: string;
}
export const Message = (props: MessageProps) => {
  const localization = useLocalization();
  return (
    <span style={{ display: "block" }}>
      {localization.toLanguageString(props.messageKey, props.defaultMessage)}
    </span>
  );

};

 

export interface LocaleInterface {
    language: string;
    locale: string;
  }
 
Filip
Telerik team
 answered on 17 May 2022
1 answer
258 views

I was wondering if it was possible to override the locale used when using formatNumber with the IntlProvider. In the kendo-intl repo it seems you are able to do the below:

formatNumber(1234.5678, "n2", "de"); 
However, in the kendo-react-intl docs there are only two params for this method, and it doesn't seem to be possible in the react library.

 

Can anyone offer any advice on whether this is possible?


Konstantin Dikov
Telerik team
 answered on 14 Apr 2022
1 answer
241 views

Hi.

I don't understand well from the docs how to apply different translations for grids.

the only example that I see is https://www.telerik.com/kendo-react-ui/components/grid/globalization/

for Spanish but it is not enough for me, I need Hebrew, Chinese, and so on where I can find all the resources?

and how can I do dynamic change without all the imports like in the example? 

 

Konstantin Dikov
Telerik team
 answered on 17 Jan 2022
Narrow your results
Selected tags
Tags
+? more
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?