# Customize Internationalization Resources

# Assumption

Assume you have an assets/in your website root directory, where you will configure the internationalization resources. Let's call this path as websiteRoot/assets/.

# Configuration

  1. Copy lib/locals inside SDK to websiteRoot/assets/.

  2. Set up the I18N path for loading resources.

    new UIExtension.PDFUI({
        i18n: {
            absolutePath: 'websiteRoot/assets/locals'
        },
        // the other options...
    });
    
  3. Add more localization languages Create a new folder in websiteRoot/assets/locals. The folder name should follow the language codes standard, such as zh-CN for Chinese. And then new a file and name it as ui_.json.

  4. Set up default language

    new UIExtension.PDFUI({
        i18n: {
            absolutePath: `websiteRoot/assets/locals`,
            lng: 'zh-CN'
        }// the other options
    })
    

# Verify the configuration in developer environment

  1. Clear your browser caches to ensure the latest I18N resources will be loaded.
  2. Refresh your browser, open the Network panel in DevTools,and check if the ui_.json request url points your custom language path. If so, it means success.