Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

terra-i18n

Package Overview
Dependencies
Maintainers
6
Versions
113
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

terra-i18n - npm Package Compare versions

Comparing version 1.3.0 to 1.4.0

docs/DEPENDENCIES.md

5

CHANGELOG.md

@@ -7,2 +7,7 @@ Changelog

1.4.0 - (August 31, 2017)
------------------
### Changed
* Improved terra-i18n example in README.md
1.3.0 - (August 8, 2017)

@@ -9,0 +14,0 @@ ------------------

31

docs/README.md

@@ -14,7 +14,34 @@ # Terra I18n

```jsx
import React from 'react';
import { I18nProvider, i18nLoader } from 'terra-i18n';
i18nLoader('en', this.setState, this)
export default class ExampleLoader extends React.Component {
constructor(props) {
super(props);
<I18nProvider locale={this.state.locale} messages={this.state.messages} />
this.state = {
areTranslationsLoaded: false,
locale: props.locale,
messages: {},
};
}
componentDidMount() {
i18nLoader(this.state.locale, this.setState, this);
}
render() {
// Do not render components or the provider until translations and other
// dependencies are loaded.
if (!this.state.areTranslationsLoaded) {
return null;
}
return (
<I18nProvider locale={this.state.locale} messages={this.state.messages}>
{this.props.children}
</I18nProvider>
);
}
}
```

@@ -21,0 +48,0 @@

4

package.json
{
"name": "terra-i18n",
"main": "lib/I18n.js",
"version": "1.3.0",
"version": "1.4.0",
"description": "The terra-i18n component provides the internationalization to the React component. Terra supports the following locales: 'de' 'es' 'en' 'en-US' 'en-GB', 'fi-FI', 'fr', 'pt'. All locales related files are loading on demand.",

@@ -25,3 +25,3 @@ "repository": {

"babel-jest": "^19.0.0",
"terra-props-table": "^1.3.0"
"terra-props-table": "^1.4.0"
},

@@ -28,0 +28,0 @@ "peerDependencies": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc