New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@medrecord/frontend-translations-middleware

Package Overview
Dependencies
Maintainers
3
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@medrecord/frontend-translations-middleware

This is a middleware built on a base [ngx-translate](https://github.com/ngx-translate/core) for internal usage with Medrecord's components and extending their translations if they are not existed.

  • 0.0.6
  • npm
  • Socket score

Version published
Maintainers
3
Created
Source

Medrecord Translations Middleware

This is a middleware built on a base ngx-translate for internal usage with Medrecord's components and extending their translations if they are not existed.

Installation

Add TranslateModule from @ngx-translate/core. It requires HttpClientModule.

app.module.ts

@NgModule({
  ...
  imports: [
    ...
    HttpClientModule,
    TranslationMiddlewareModule
    })
    ...
  ],
  ...
})
export class AppModule { }

Usage

Inject TranslationMiddlewareService into your component. Use method: addTranslation for extending translations list.
Use translationMiddleware instead of translation.

API

Method addTranslation - It is provided by TranslationMiddlewareService and should be used for adding custom component translations.

setTranslation(language, [translation object])

Troubleshooting

If you have no i18n folder in your assets or en.json file you will start getting 404 error in your console. Ignore it or add i18n/en.json as default file.

FAQs

Package last updated on 07 Jul 2020

Did you know?

Socket

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.

Install

Related posts

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