LogoLogo
โค๏ธ SponserMore
  • ๐Ÿš€Getting Started
    • Installation
    • Angular Compatibility
    • Config Options
  • ๐Ÿ’กCore Concepts
    • Translation in the Template
    • Signals
    • Translation API
    • Language API
  • ๐Ÿง Advanced Topics
    • ๐ŸฆฅLazy Load
      • Scope Configuration
      • Inline Loaders
    • The Transpiler
    • SSR Support
    • Unit Testing
    • Hack the Library
  • ๐ŸงชSandbox & Examples
  • โš™๏ธAdditional Functionality
    • Loading Template
    • Key Referencing
    • Utility Functions
    • Comments for Translators
    • Multiple Languages Simultaneously
  • ๐Ÿ“ฆMigration Guides
    • Migrate from ngx-translate
    • Migrate from Angular's i18n
  • ๐Ÿ”งTools
    • Keys Manager (TKM)
      • Keys Extractor
      • Keys Detective
      • Options
      • Debugging
      • Using with Nx ๐Ÿ‹
    • Validator
    • Optimize
    • Scoped Library Extractor
  • ๐Ÿ”ŒPlugins
    • Message Format
    • Persist Translations
    • Persist Lang
    • Preload Langs
    • Locale l10n
    • Community Plugins
  • ๐ŸงฐSchematics
    • :ng-add
    • :scope
    • :join
    • :split
  • ๐ŸณRecipies
    • Prefetch User Language
    • Using Xliff
    • Generate Locale Files using Google Translate
  • ๐Ÿ“šBlog Posts
    • Transloco Team Posts
      • Transloco Goes Functional: A Guide to Transloco's Functional Transpiler
    • From the Community
  • โ“FAQs
Powered by GitBook

@ 2025 Transloco

On this page
  • Installation
  • Usage

Was this helpful?

  1. Plugins

Preload Langs

This plugin enables the preloading of specified languages during periods of browser inactivity, leveraging the requestIdleCallback API for optimal performance.

Installation

pnpm add @jsverse/transloco-preload-langs
yarn add @jsverse/transloco-preload-langs
npm install @jsverse/transloco-preload-langs

Usage

import { provideTranslocoPreloadLangs } from '@jsverse/transloco-preload-langs';

bootstrapApplication(AppComponent, {
  providers: [
    provideTranslocoPreloadLangs(['es', 'some-scope'])
  ],
});

import { provideTranslocoPreloadLangs } from '@jsverse/transloco-preload-langs';

@NgModule({
  providers: [
    provideTranslocoPreloadLangs(['es', 'some-scope'])
  ]
  ...
})
export class TranslocoRootModule {}
PreviousPersist LangNextLocale l10n

Last updated 5 months ago

Was this helpful?

๐Ÿ”Œ