Skip to content

How use Multilanguage in jsx? #455

Answered by oscarotero
cawa-93 asked this question in Q&A
Discussion options

You must be logged in to vote

I think it's not possible to export a variable with a dot in the name. This will fail

export const title.en = "Title";
export const title.gl = "Título";

But you can export the language variables:

export const en = {
  title: "Title",
}

export const gl = {
  title: "Título",
}

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@cawa-93
Comment options

@oscarotero
Comment options

Answer selected by cawa-93
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants