In case you have a multi-language store and want to add Store Codes to the URLs to make them look like e.g.,, follow next steps.

Navigate to Stores > Configuration > General > Web and find the Url Options section. There you choose to Add Store Code to URLs selecting Yes from the corresponding select box and Save Config.

Magento 2 store code url

Store Codes are set while creating each store view manually in Stores > All Stores and can be managed there.

Magento 2 store view list

Admin Panel Configuration is just one of the series of articles about How to Configure Multi-Language Magento Website? which include information about the creation of a new store view, language packs installation, useful multi-language store extensions, product&category, CMS pages&blocks, email templates, and other translations in Magento 2 website. You should definitely get acquainted with them in order to know how to manage a multilanguage store.