Multi language support
Hi,
first of all, thanks for this amazing app ! I'll buy a pro licence to support when I'll have enough money to do so.
My question is :
Is it possible to support multiple languages depending on the domain name in the retype.ymlfile ?
What I mean by that is something like this :
# Assuming the input property is set such as :
# input: ./src
localisation:
- url: mydomain.com
src: /en
- url: mydomain.fr # Using another domain that redirects to the same host IP
src: /fr
- url: de.mydomain.com # Using a subdomain
src: /de
- url: mydomain.com/nl # Using a path
src: /nl
- The
srcproperty would be appended to theinputone if it exists. If not, I don't know, I did not think about a solution yet 😅 - The
urlproperty would be used to determine the language as you'd want.
I know there are multiple problems that could show up using this way but it's just to explain my question
I hope you have a great day and thanks for reading !
I think this scenario will be possible to support with the release of Retype v3.0, which will be the next release. At the moment, we do not have a scheduled release date for v3.0, but this particular functionality has already been built and is in the process of testing.
Very interesting, especially with generation in different folders for different domains, in case different languages need to be placed on different domains.
The upcoming release of Retype v3.0 will support building using different languages.
Set locale: ru in your retype.yml to enable.
Retype v3.0 will support 24 languages, see https://retypeapp.github.io/retype-translations/#supported-languages
The source translation files are available at: https://github.com/retypeapp/retype-translations/tree/main/src
Please see the documentation at: https://github.com/retypeapp/retype-translations or, https://retypeapp.github.io/retype-translations/
Retype will not multi-target exactly as proposed above, but you can easily achieve the same results by running a custom build using the --override command.
The following sample demonstrates building a project using a French locale:
retype build --override "{ \"locale\": \"fr\" }"
You can target separate input and output locations using the same technique:
retype build --override "{ \"locale\": \"fr\", \"input\": \"fr\", \"output\": \".retype/fr\" }"
Just string together multiple custom build commands to support any number of languages. If you're hosting those separate languages on individual sub-domains, it would be super easy to build and host your original scenario.
We don't have an exact release date for Retype v3.0, but we're moving fast now, so shouldn't be long.
Hope this helps.