It is possible just to edit the location of Documents like this, that's what the dialog does:
![Docs properties](https://cdn.statically.io/img/i.sstatic.net/py1vp.png)
I have found out that I can enable the same functionality as the dialog window just by editing registry values:
\HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders
Changing values for {F42EE2D3-909F-4907-8871-4C22FC0BF756}
(Local Documents) and Personal
to the local folder of OneDrive synced Documents, e.g.
C:\Users\myself\OneDrive - MyCompany\Documents
But still the visible name of the folder remained Documents
but it should have been in my language Dokumenty
...
Another thing I had to do was to copy desktop.ini
file from C:\users\myself\documents
to C:\Users\myself\OneDrive - MyCompany\Documents
. It fixed the visible folder name and icon in explorer. Of course restarting explorer.exe or logoff/logon was necessary.
The content of Desktop.ini was:
[.ShellClassInfo]
LocalizedResourceName=@%SystemRoot%\system32\windows.storage.dll,-21770
IconResource=%SystemRoot%\system32\imageres.dll,-112
IconFile=%SystemRoot%\system32\shell32.dll
IconIndex=-235
But I could have used instead my desired name directly:
LocalizedResourceName=Dokumenty