Using Localization / i18n

OneSchema supports internationalization of the importer in many different languages. This feature is only supported on our Pro and Enterprise tiers.

To use internationalization use the languageCode param when initializing your SDK instance.

import oneschemaImporter from "@oneschema/importer"

const importer = oneschemaImporter({
  clientID: 'YOUR_CLIENT_ID',
  templateKey: 'YOUR_TEMPLATE_KEY',
  userJwt: 'YOUR_USER_JWT',
  
  // language code here!
  languageCode: "en",
})
import React, { useState } from "react"
import OneSchemaImporter from "@oneschema/react"

function OneSchemaExample() {
  const [isOpen, setIsOpen] = useState(false)

  const handleData = (data) => {
    console.log(data)
  }

  return (
    <div>
      <button onClick={() => setIsOpen(true)}>Import</button>

      <OneSchemaImporter
        isOpen={isOpen}
        onRequestClose={() => setIsOpen(false)}
        clientId={clientId}
        userJwt={token}
        templateKey={templateKey}
       

        /* language code here!  */
        languageCode="en"
      />
    </div>
  )
}
// Import the module into the application, with configuration
    OneSchemaModule.forRoot({
      clientId: 'CLIENT_ID',
      templateKey: 'TEMPLATE_KEY',
      userJwt: 'USER_JWT',
      
      
      // language code here!
      languageCode: 'en',
    }),

Supported languages

LanguagelanguageCode
Englishen
Arabicar
Chinese (Simplified)zh
Czechcs
Danishda
Dutchnl
Finnishfi
Frenchfr
Germande
Hungarianhu
Italianit
Japanesejp
Koreanko
Norwegianno
Polishpl
Portuguesept
Romanianro
Russianru
Spanishes
Swedishsv