We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have: mainViews = ['Home', 'Providers', 'Carts']
mainViews = ['Home', 'Providers', 'Carts']
I want: mainViews = [LocalizedStrings.home, LocalizedStrings.providers, LocalizedStrings.carts]
mainViews = [LocalizedStrings.home, LocalizedStrings.providers, LocalizedStrings.carts]
so that I can: mainView.map( (text, index) => { // code goes here })...
mainView.map( (text, index) => { // code goes here })...
result: undefined
undefined
The text was updated successfully, but these errors were encountered:
You are not using it correct. As mentioned in the documentation: https://github.com/stefalda/react-localization#typescript-support you can do something like this:
export interface IStrings extends LocalizedStringsMethods{ home_header: string; home_title: string; provider_header: string; provider_title: string; carts_header: string; carts_title: string; } public strings: IStrings; this.strings = new LocalizedStrings({ it: { home_header: "Punti", home_title: "Tempo" provider_header: "Uno", provider_title: "Roma" carts_header: "Prova", carts_title: "Testo" }, en: { home_header: "Score", home_title: "Time" provider_header: "One", provider_title: "Rome" carts_header: "Check", carts_title: "Test" } });
And try to do some stuff or add logic to match the view depending strings.
Sorry, something went wrong.
No branches or pull requests
I have:
mainViews = ['Home', 'Providers', 'Carts']
I want:
mainViews = [LocalizedStrings.home, LocalizedStrings.providers, LocalizedStrings.carts]
so that I can:
mainView.map( (text, index) => { // code goes here })...
result:
undefined
The text was updated successfully, but these errors were encountered: