Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only translate defined locales, skip default locale while still removing all data-t attributes #48

Open
nCubed opened this issue Sep 22, 2021 · 0 comments

Comments

@nCubed
Copy link

nCubed commented Sep 22, 2021

Is it possible to only translate the defined locales and skip the base locale, but still strip the data-t attributes in the base locale?

For example, we have an existing static website with the English language and would like to create a Spanish language version. I would like to leave the existing English text and simply add the data-t="some.path" attribute where the language should be substituted for the Spanish version and output to the "es" directory. With the net effect of the original html file is the English text remains, but the data-t="some.path" attribute is stripped.

I've found this is mostly possible by defining only an "es" locale in the locales switch. The Spanish version of the html is created and the original English version is untouched. However, the original English version still retains the data-t attributes (and value), whereas the Spanish version data-t attribute (and value) is stripped as expected.

Hopefully this makes sense.

@nCubed nCubed changed the title Only translate Only translate defined locales, skip default locale while still removing all data-t attributes Sep 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant