🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

transla-x

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

transla-x

Transla-X is an Angular translation library that provides localization support for multi-language applications. It offers a translation service, a translation pipe, and an interceptor for loading translations dynamically. It allows you to easily translate

1.0.2
latest
npm
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

TranslateX: Angular Internationalization and Localization for Free | Format Data Locale

Transla-X is an Angular translation library that provides localization support for multi-language applications. It offers a translation service, a translation pipe, and an interceptor for loading translations dynamically. It allows you to easily translate your application's content based on the selected language.

Table of Contents

  • Features
  • Installation
  • Usage
  • Contribution
  • License
  • Keywords

Features

  • Dynamic loading of translations for supported languages
  • Translation service for retrieving translated values
  • Translation pipe for translating content in templates
  • Interceptor for intercepting HTTP requests and loading translations

Installation

To install the Transla-X library, you can use npm or yarn. Run the following command in your Angular project:

Run bash `npm install transla-x` or Run bash `yarn add transla-x`

Usage

  • Import the TranslaXModule in your Angular application's module and configure it with the supported languages:

import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { AppComponent } from './app.component';
import { TranslaXModule } from 'transla-x';

const translationConfig = {
  supportedLanguages: ['en', 'ar'] // Set the supported languages here
};

@NgModule({
  imports: [BrowserModule, TranslaXModule.configure(translationConfig)],
  declarations: [AppComponent],
  bootstrap: [AppComponent]
})
export class AppModule {}

Use the translation pipe in your component template to translate content:


<p>English: {{ 'HELLO' | translation: 'en' }}</p>
<p>Arabic: {{ 'HELLO' | translation: 'ar' }}</p>

Contribution

Contributions to Transla-X are welcome! If you find a bug, have a feature request, or want to contribute code, please open an issue or submit a pull request. Please make sure to follow the project's code of conduct.

License

This project is licensed under the MIT License.

Keywords

translate

FAQs

Package last updated on 04 Jul 2023

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