How to use the @ngx-translate/core.TranslateModule.forChild function in @ngx-translate/core

To help you get started, we’ve selected a few @ngx-translate/core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github moodlehq / moodlemobile2 / src / addon / block / blogrecent / blogrecent.module.ts View on Github external
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

import { NgModule } from '@angular/core';
import { IonicModule } from 'ionic-angular';
import { TranslateModule } from '@ngx-translate/core';
import { CoreBlockDelegate } from '@core/block/providers/delegate';
import { AddonBlockBlogRecentHandler } from './providers/block-handler';

@NgModule({
    declarations: [
    ],
    imports: [
        IonicModule,
        TranslateModule.forChild()
    ],
    exports: [
    ],
    providers: [
        AddonBlockBlogRecentHandler
    ]
})
export class AddonBlockBlogRecentModule {
    constructor(blockDelegate: CoreBlockDelegate, blockHandler: AddonBlockBlogRecentHandler) {
        blockDelegate.registerHandler(blockHandler);
    }
}
github IronPans / freeng / src / app / democase / common / language.ts View on Github external
]
})
export class SharedModule {

  constructor(private translate: TranslateService) {

    translate.addLangs(['en', 'zh-CN']);
    translate.setDefaultLang('zh-CN');

    // const browserLang = translate.getBrowserLang();
    // translate.use(browserLang.match(/en|zh-CN/) ? browserLang : 'en');
  }
}

@NgModule({
  imports: [CommonModule, TranslateModule.forChild({})],
  exports: [TranslateModule]
})
export class LanguageModule {}
github moodlehq / moodlemobile2 / src / core / siteplugins / pages / plugin-page / plugin-page.module.ts View on Github external
import { CoreDirectivesModule } from '@directives/directives.module';
import { CoreSitePluginsPluginPage } from './plugin-page';
import { CoreSitePluginsComponentsModule } from '../../components/components.module';

/**
 * Module to lazy load the page.
 */
@NgModule({
    declarations: [
        CoreSitePluginsPluginPage
    ],
    imports: [
        CoreDirectivesModule,
        CoreSitePluginsComponentsModule,
        IonicPageModule.forChild(CoreSitePluginsPluginPage),
        TranslateModule.forChild()
    ]
})
export class CoreSitePluginsPluginPageModule {}
github moodlehq / moodlemobile2 / src / addon / mod / data / pages / entry / entry.module.ts View on Github external
import { CoreRatingComponentsModule } from '@core/rating/components/components.module';
import { AddonModDataComponentsModule } from '../../components/components.module';
import { AddonModDataEntryPage } from './entry';

@NgModule({
    declarations: [
        AddonModDataEntryPage,
    ],
    imports: [
        CoreDirectivesModule,
        CoreComponentsModule,
        AddonModDataComponentsModule,
        CoreCompileHtmlComponentModule,
        CoreCommentsComponentsModule,
        IonicPageModule.forChild(AddonModDataEntryPage),
        TranslateModule.forChild(),
        CoreRatingComponentsModule
    ],
})
export class AddonModDataEntryPageModule {}
github moodlehq / moodlemobile2 / src / addon / mod / lti / components / components.module.ts View on Github external
import { CommonModule } from '@angular/common';
import { IonicModule } from 'ionic-angular';
import { TranslateModule } from '@ngx-translate/core';
import { CoreComponentsModule } from '@components/components.module';
import { CoreDirectivesModule } from '@directives/directives.module';
import { CoreCourseComponentsModule } from '@core/course/components/components.module';
import { AddonModLtiIndexComponent } from './index/index';

@NgModule({
    declarations: [
        AddonModLtiIndexComponent,
    ],
    imports: [
        CommonModule,
        IonicModule,
        TranslateModule.forChild(),
        CoreComponentsModule,
        CoreDirectivesModule,
        CoreCourseComponentsModule
    ],
    providers: [
    ],
    exports: [
        AddonModLtiIndexComponent,
    ],
    entryComponents: [
        AddonModLtiIndexComponent,
    ]
})
export class AddonModLtiComponentsModule {}
github fluster / fluster-app / src / app / components / advertise / new-ad / new-ad-step-attributes / new-ad-step-attributes.module.ts View on Github external
import {FormsModule} from '@angular/forms';

import {TranslateModule} from '@ngx-translate/core';

import {NewAdStepAttributesComponent} from './new-ad-step-attributes';
import {TargetedUsersModule} from '../../targeted-users/targeted-users.module';

@NgModule({
    declarations: [
        NewAdStepAttributesComponent
    ],
    imports: [
        IonicModule,
        CommonModule,
        FormsModule,
        TranslateModule.forChild(),
        TargetedUsersModule
    ],
    exports: [
        NewAdStepAttributesComponent
    ]
})
export class NewAdStepAttributesModule {
}
github moodlehq / moodlemobile2 / src / addon / mod / forum / components / components.module.ts View on Github external
import { CorePipesModule } from '@pipes/pipes.module';
import { CoreCourseComponentsModule } from '@core/course/components/components.module';
import { CoreRatingComponentsModule } from '@core/rating/components/components.module';
import { CoreTagComponentsModule } from '@core/tag/components/components.module';
import { AddonModForumIndexComponent } from './index/index';
import { AddonModForumPostComponent } from './post/post';

@NgModule({
    declarations: [
        AddonModForumIndexComponent,
        AddonModForumPostComponent
    ],
    imports: [
        CommonModule,
        IonicModule,
        TranslateModule.forChild(),
        CoreComponentsModule,
        CoreDirectivesModule,
        CorePipesModule,
        CoreCourseComponentsModule,
        CoreRatingComponentsModule,
        CoreTagComponentsModule
    ],
    providers: [
    ],
    exports: [
        AddonModForumIndexComponent,
        AddonModForumPostComponent
    ],
    entryComponents: [
        AddonModForumIndexComponent
    ]
github moodlehq / moodlemobile2 / src / addon / mod / assign / feedback / file / file.module.ts View on Github external
import { IonicModule } from 'ionic-angular';
import { TranslateModule } from '@ngx-translate/core';
import { AddonModAssignFeedbackFileHandler } from './providers/handler';
import { AddonModAssignFeedbackFileComponent } from './component/file';
import { AddonModAssignFeedbackDelegate } from '../../providers/feedback-delegate';
import { CoreComponentsModule } from '@components/components.module';
import { CoreDirectivesModule } from '@directives/directives.module';

@NgModule({
    declarations: [
        AddonModAssignFeedbackFileComponent
    ],
    imports: [
        CommonModule,
        IonicModule,
        TranslateModule.forChild(),
        CoreComponentsModule,
        CoreDirectivesModule
    ],
    providers: [
        AddonModAssignFeedbackFileHandler
    ],
    exports: [
        AddonModAssignFeedbackFileComponent
    ],
    entryComponents: [
        AddonModAssignFeedbackFileComponent
    ]
})
export class AddonModAssignFeedbackFileModule {
    constructor(feedbackDelegate: AddonModAssignFeedbackDelegate, handler: AddonModAssignFeedbackFileHandler) {
        feedbackDelegate.registerHandler(handler);
github Alfresco / alfresco-ng2-components / lib / core / info-drawer / info-drawer.module.ts View on Github external
export function declarations() {
    return [
        InfoDrawerLayoutComponent,
        InfoDrawerTabComponent,
        InfoDrawerComponent,
        InfoDrawerTitleDirective,
        InfoDrawerButtonsDirective,
        InfoDrawerContentDirective
    ];
}

@NgModule({
    imports: [
        CommonModule,
        MaterialModule,
        TranslateModule.forChild()
    ],
    declarations: declarations(),
    exports: declarations()
})
export class InfoDrawerModule {}
github moodlehq / moodlemobile2 / src / addon / mod / quiz / pages / navigation-modal / navigation-modal.module.ts View on Github external
import { NgModule } from '@angular/core';
import { IonicPageModule } from 'ionic-angular';
import { AddonModQuizNavigationModalPage } from './navigation-modal';
import { TranslateModule } from '@ngx-translate/core';
import { CoreComponentsModule } from '@components/components.module';
import { CoreDirectivesModule } from '@directives/directives.module';

@NgModule({
    declarations: [
        AddonModQuizNavigationModalPage
    ],
    imports: [
        CoreDirectivesModule,
        CoreComponentsModule,
        IonicPageModule.forChild(AddonModQuizNavigationModalPage),
        TranslateModule.forChild()
    ]
})
export class AddonModQuizNavigationModalPageModule {}