i18n handling
npm install fz-i18n1. I18NProvider
2. ConnectI18NProvider
3. I18N
4. FormatText
5. PluralFormat
6. DateTimeDiffFormat
7. UserTimeDiffFormat
```
``
onChange=((accept,reject)=>{call accept or reject})>
``
``
``
yesterday={{key:"yesterday",params:["hh","mm","ss"]}}
tomorrow={{key:"tomorrow",params:["hh","mm","ss"]}}
others={({years, days, hours, minutes})=>{
if( days > 7){
return "DD-MM-YYYY"
}else{
return getDateKeyWithParam(years, days, hours, minutes)
}
}}
ago="ago"
later="later"
/>
``
tomorrow={{key:"tomorrow",params:["hh","mm","ss"]}}
others={({years, days, hours, minutes})=>{
if( days > 7){
return "DD-MM-YYYY"
}else{
return getDateKeyWithParam(years, days, hours, minutes)
}
}}
ago="ago"
later="later"
/>
`
var Greetings = ()=>{
return Hello,{this.props.name}
}
Hello - hard coded data
name - dynamic data mostly no need to I18N. In case any dynamic data going to pass generic component. use i18nUtils.getI18NValue function
I18N Implementation
var Greetings = ()=>{
return
}
`
`
textarea placeholder display i18n value
var Textarea=()=>{
return
}
You can mention particular props going to accept i18n key. so convert using I18N HOC
Textarea = HOCI18N(["placeHolder"])(Textarea)
You can use utils function
i18n json build time composes not yet done
#1.2.0-beta.9
- es6 move and prettier format
#1.2.0-beta.11
title support
missing use Cases
today yesterday tomorrow error fix
pattern format changed
#1.2.0-beta.12
user date format pattern issue fix
#1.2.0-beta.13
suffix issue fix - pattern "00000" to "0000"
#1.2.0-beta.14
proptypes move to prop-types package
"getValues" duplicate method build issue
#1.2.0-beta.15
Support For Date/Month Translations