csv-import icon indicating copy to clipboard operation
csv-import copied to clipboard

Internationalization support

Open civan opened this issue 11 months ago • 1 comments

Proposed implementation:

  • The importer has predefined languages but the consumer can still override these translations
const  customTranslations: {
    jp: {
      "Upload": "アップロード",
      "Browse files": "ファイルを参照",
    },
    pt: {
      "Upload": "Carregar",
      "Browse files": "Procurar arquivos",
    },
  }

<CSVImporter language="es" customTranslations={customTranslations}  ...props />

Screencast from 03-08-2024 12:55:20 PM.webm

Related Issue: #84

civan avatar Mar 08 '24 17:03 civan

Hi,

Any idea when this will be merged?

kedrigen avatar Apr 18 '24 12:04 kedrigen

This looks good, any idea when we'll get a release with this in it? @ciminelli

johnwards avatar May 17 '24 09:05 johnwards

Hi! Awesome feature. Any estimate on the release? Or is it possible to use it rn 🤔

gabrielwiggert avatar Jul 28 '24 01:07 gabrielwiggert

@kedrigen @johnwards @gabrielwiggert this is now released and available with version 1.0.12!

The documentation can be found here: https://github.com/tableflowhq/csv-import?tab=readme-ov-file#internationalization

ciminelli avatar Jul 30 '24 17:07 ciminelli

Awesome! Thank you so much.

Just one fix in the documentation:

<CSVImporter language="jp" translations={customTranslations} ...props />

to

<CSVImporter language="jp" customTranslations={customTranslations} ...props />

(The correct prop is customTranslations instead of translations ;) )

gabrielwiggert avatar Jul 30 '24 20:07 gabrielwiggert

Awesome! Thank you so much.

Just one fix in the documentation:

<CSVImporter language="jp" translations={customTranslations} ...props />

to

<CSVImporter language="jp" customTranslations={customTranslations} ...props />

(The correct prop is customTranslations instead of translations ;) )

Thanks! I noticed this too and updated the README after I merged the PR.

ciminelli avatar Jul 31 '24 00:07 ciminelli