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

Multi language support #404

Closed
PirateSeal opened this issue Aug 23, 2022 · 3 comments
Closed

Multi language support #404

PirateSeal opened this issue Aug 23, 2022 · 3 comments
Assignees
Labels
Milestone

Comments

@PirateSeal
Copy link

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 the input one if it exists. If not, I don't know, I did not think about a solution yet 😅
  • The url property 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 !

@geoffreymcgill
Copy link
Contributor

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.

@geoffreymcgill geoffreymcgill self-assigned this Aug 25, 2022
@geoffreymcgill geoffreymcgill added this to the v3.0 milestone Aug 25, 2022
@sergeykorobeynikov
Copy link

Very interesting, especially with generation in different folders for different domains, in case different languages need to be placed on different domains.

@geoffreymcgill
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants