main menu link as language switcher
after long investigation and test I think there is no way to make the "language module" work correctly if all the language codes have not been declared in the configuration, so that every language has the code after the base_path. Using base_path for the primary language and code for the secondary (base_path / language_code /) creates confusion to the "language module" that results in unexpected results. Alias ​​url and url edirect can not make up for the lack. It would be necessary to create a special module to solve the situation and while having seen some code in the working web, I do not think it's a good idea to use it with the core 8 and beyond. The "language switcher" module, on the other hand, works well, but to make it integrated into the main menu, you still need to write custom code. In short, all languages, the primary and the others must be dicated in the configuration in the classic way: base_path / language_code /. There is no way out.