If I implement multilingual access to the resource through the parameter:
So, does Google index both of them as a single URL or different ones?
Webmasters Stack Exchange is a question and answer site for pro webmasters. It only takes a minute to sign up.Sign up to join this community
URLs which only differ by a language parameter are considered as separate URLs.
Example case study: Here's a link to the Google Webmasters support page covering "Managing multi-regional and multilingual sites".
This page is in multiple languages, and all the pages(with the same content in different languages) have a language attribute at the end of their URLs(?hl=en, ?hl=fr etc.). These pages don't refer to the English page as their canonical version.
This means Google(the search Engine) has indexed them as different pages and Google(the company) wants them as different pages since they have not implemented canonical tags.
If you change your browser language to french and search "Gérer les sites multirégionaux et multilingues" and SERP will display the URL with the french language parameter.
However, if you implement different URLs for different languages, it is recommended to use hreflang annotations to help google search display the correct language version of the page(based on the searcher's browser settings and location parameters).
Learn more about hreflang and its implementation here.