inbox-react-intl's People
Forkers
macndesign andresin87 rmoorman vdeventura kimkaid celdrake dimovdaniel jf423 tsriram javidshirinbayli tobmaster nerolis theasia-ashish fijiwebdesign prasad0552 danvusca eliseoferia14 sanishmaharjan ruffle1986 jnatherley kamaldlk ukyiwin jbalagues longsvitz rajjeet tata81 xc1427 briansu2004inbox-react-intl's Issues
internationalize react for Vanilla JS
Try https://github.com/alibaba/react-intl-universal which is developed by Alibaba Group. yahoo/react-intl can only be applied in view layer such as React.Component. For Vanilla JS file, there’s no way to internationalize it. For example, the following snippet is general form validator used by many React.Component in our apps.
export default const rules = {
noSpace(value) {
if (value.includes(' ')) {
return 'Space is not allowed.';
}
}
};
alibaba/react-intl-universal is simple but powerful. It doesn’t change behavior of components. And can used in JSX and normal JS file.
hot to write translation files
Hi -
Thanks for the great post, it was really clear and helpful. Once thing I don't get though: what would a translated file like? And in the context of this project, where would that file live?
Thanks!
Only get error message
Thanks for providing this sample repo.
When I try to run it, however, I only get this error message:
[BABEL] /Users/waldgeist/Documents/Development/htdocs/tests/inbox-react-intl/src/js/components/Header/SubHeader.js: [React Intl] Line 31: Default messages are not extracted from <FormattedPlural>, use <FormattedMessage> instead.
Getting error message while running your code
Hi,
I am getting following error message while running the code.
Uncaught Error: Cannot find module "!!../../../../node_modules/css-loader/index.js!../../../../node_modules/sass-loader/index.js!./Header.scss"
Could you please provide the steps for run this application?
Thanks,
Prashant
code comment inconsistency
First of all, let me tell you how much I appreciate your article and the sample project on localizing react projects. It was very helpful to make decisions in case of one of my projects to make it available worldwide.
https://github.com/iam-peekay/inbox-react-intl/blob/master/src/js/index.js#L23-L24
While I was looking at your code, I noted that this particular line of code (see above) doesn't do what the comment says in the previous line. It says Try full locale
first but you're trying to get the messages by providing the locale code without the region code first.
Since the locale code with the region (full locale code) is more specific, it's better to try it first. So the comment is correct and the code above is supposed to work according to that.
build:langs scripts doesn´t build messages
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.