![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
A simple translation module for Angular applications
npm i @nwx/i18n |OR| yarn add @nwx/i18n
// In your environment{prod,staging}.ts
import { AppCfg, TargetPlatform, HttpMethod } from '@nwx/cfg';
import { LogLevels } from '@nwx/logger';
export const environment: AppCfg = {
// app name
appName: 'Neekware',
// target (browser, mobile, desktop)
target: TargetPlatform.web,
// production, staging or development
production: false,
// one or more app specific field(s)
log: {
// Log level, (default = none)
level: LogLevels.info
},
i18n: {
// available languages
availableLanguages: {
en: {
name: 'English',
locale: '@angular/common/locales/en',
localeExtra: '@angular/common/locales/extra/en'
},
fr: {
name: 'Français',
locale: '@angular/common/locales/fr',
localeExtra: '@angular/common/locales/extra/fr'
},
de: {
name: 'Deutsch',
locale: '@angular/common/locales/de',
localeExtra: '@angular/common/locales/extra/de'
}
},
// enabled languages (iso list)
enabledLanguages: [
// order is important
'en',
'fr'
]
}
};
// In your app.module.ts
import { CfgModule } from '@nwx/cfg';
import { LoggerModule } from '@nwx/logger';
import { environment } from '../environments/environment';
@NgModule({
declarations: [AppComponent],
imports: [
BrowserModule,
CfgModule.forRoot(environment), // make the environment injectable
LoggerModule,
I18nModule.forRoot()
],
bootstrap: [AppComponent]
})
export class AppModule {}
// In your app.module.ts
import { Component } from '@angular/core';
import { CfgService, DefaultCfg } from '@nwx/cfg';
import { LogService } from '@nwx/logger';
import { I18nService } from '@nwx/i18n';
@Component({
selector: 'app-root',
template: `<h1>{{'COMMON.WELCOME' | translate}} to {{ title }}!</h1>`
})
export class AppComponent {
title = 'Neekware';
constructor(public cfg: CfgService, public log: LogService, public i18n: I18nService) {
this.title = this.cfg.options.appName;
this.log.info('AppComponent loaded ...');
}
}
Include your translated files in the /assets/i18n
directory of your application.
/assets/i18n/en.json
{
"COMMON.WELCOME": "Welcome",
"COMMON.ABOUT": "About"
}
/assets/i18n/fr.json
{
"COMMON.WELCOME": "Bienvenue",
"COMMON.ABOUT": "Sur"
}
// In your app.module.ts
import { Component } from '@angular/core';
import { CfgService, DefaultCfg } from '@nwx/cfg';
import { LogService } from '@nwx/logger';
import { I18nService } from '@nwx/i18n';
@Component({
selector: 'app-root',
template: `<h1>{{'COMMON.WELCOME' | translate}} to {{ title }}!</h1>`
})
export class AppComponent {
direction = 'ltr';
title = 'Neekware';
constructor(public cfg: CfgService, public log: LogService, public i18n: I18nService) {
this.title = this.cfg.options.appName;
// translate in ts files
i18n.xlate.get('COMMON.WELCOME').subscribe((res: string) => {
this.log.info(res);
});
// check if language is Right2Left `rtl`
if (i18n.isLanguageRTL('he')) {
this.direction = 'rtl';
}
// change the language
i18n.setCurrentLanguage('fr');
// other available methods
// currentLanguage()
// defaultLanguage()
// enabledLanguages()
// isCurrentLanguage(iso)
// getLanguageName(iso)
// getLanguageDirection(iso)
// isLanguageEnabled(iso)
}
}
@nwx/i18n
uses the great @ngx-translate
package under the hood.To run the tests against the current environment:
npm run ci
Released under a (MIT) license.
X.Y.Z Version
`MAJOR` version -- making incompatible API changes
`MINOR` version -- adding functionality in a backwards-compatible manner
`PATCH` version -- making backwards-compatible bug fixes
0.0.2
Enhancements:
FAQs
A simple translation module for Angular applications
The npm package @nwx/i18n receives a total of 0 weekly downloads. As such, @nwx/i18n popularity was classified as not popular.
We found that @nwx/i18n demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.