Subdomains for multilingual site

I have a multilingual (4 languages) website running on hugo on gitlab(testing it). right now it has urls like and

I want subdomains for urls like and

Is it possible? I have added a custom domain to gitlab too. how to manage urls for both domains(pointing to the same directory, serving same content) as gitlab won’t allow primary subdomain to be removed from domain list.

You would need to treat each language as a separate Hugo project with its own subdomain as a baseURL.

Hugo’s multilingual mode works by outputting a subdirectory per language code.