Different language per domain setup

I’m using the Learn2 theme for creating two online manuals, one in Dutch the other in English. I have created two domains for this:
xxx.nl
yyy.com
I’m using the translation feature of Grav, that means each page has two versions and by placing /nl or /en at the end of the URL you will get your language. According to the Grav documentation you can create rewrite rules that point you to the right language based on the URL

I have placed these rewrite rules in my webserver based on the docs:

# handle top level e.g. https://xxx.nl/nl
RewriteRule ^nl/?$ "https://xxx.nl" [R=302,L]
RewriteRule ^en/?$ "https://yyy.com" [R=302,L]

# handle sub pages, exclude admin path
RewriteCond %{REQUEST_URI} !(admin) [NC]
RewriteRule ^nl/(.*)$ "https://xxx.nl/$1" [R=302,L]
RewriteCond %{REQUEST_URI} !(admin) [NC]
RewriteRule ^en/(.*)$ "https://yyy.com/$1" [R=302,L]

However when i go to yyy.com it still points to the default language and shows this url: yyy.com/nl instead of /en.
Did i set this up correctly?

You could try using the Enviroment Feature.
Pick one of your domains to be default, lets say the yyy.com is default english version, user/config/system.yaml should contain

languages:
    supported:
    - en
    - nl

And the other domain should be an enviroment:
user/xxx.nl/config/system.yaml

languages:
    supported:
    - nl
    - en

After this enviroment setup is working you should have the yyy.com opening the ‘en’ version, and the xxx.nl the ‘nl’ version.

To complete setup, you will need to add two redirects in .htaccess:
yyy.com/nl to xxx.nl
xxx.nl/en to yyy.com