Internationalization(i18n) is the process of making your application translatable in different locales. Here’s how you could add i18n support to your Angular application in five easy steps.

Step 1: Installation

Install ngx-translate/core module to leverage the benefits of ngx-translate in your application.

npm install @ngx-translate/core --save

Install ngx-translate/http-loader module to load the translation files in your application.

npm install @ngx-translate/http-loader --save

Step 2: Service to handle all translation logic in your app

Create a TranslationService to include translation logic for your application. …


Good morning/afternoon/evening everyone. I (Name) from (Department Name) department, take this opportunity to welcome each one of you to the valedictory function of (Fest name), a National level Technical and cultural fest. This is an immensely exciting evening for our institute. The actively growing participation of students from different colleges every year, affirms the relevance and meaningfulness of this celebration. The fest was a synergy of the youth creativity and talent quotient. It was a hustle bustle affair with gamut of events rolled to test talent and mental ability, logical thinking and creativity. All in all it was a fun…


You can test ngx-translate Internationalization support in your application using ngx-translate-testing library. Let’s get started.

Installation:

npm install @ngx-translate-testing --save-dev

Usage:

Add TranslateTestingModule to the spec file you want to test as follows:

import { TranslateTestingModule } from 'ngx-translate-testing';describe('HomeComponent', () => {
beforeEach(() => {
TestBed.configureTestingModule({
imports: [ TranslateTestingModule.withTranslations({}) ]
});
}
});

If you have used only TranslatePipe in html file and do not have to test any translations in the component, above configuration for TranslateTestingModule will suffice.

If you have used TranslateService within component.ts file and would like to test a translation, modify the configuration as follows:


1.Introduction:

“Don’t be dismayed by good-byes. A farewell is necessary before you can meet again. And meeting again, after moments or lifetimes, is certain for those who are friends.” (Richard Bach)

Good morning everyone, I would like to extend a warm welcome to our Principal ________ Sir/Madam, coordinator _________ Sir/Madam, our teachers, our non-teaching staff and most importantly, to you friends, whom we bid farewell today.

Today, you may smile or even cry. But forgetting these memories, you dare not try . (smile when you say the last 4 words)

We wish to make this day a memorable one for…

Priyanka Rodz

Software Developer by profession. Balcony + Coffee + Book, are my favorites. Music is my love. I love to explore creative options outside work.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store