How to Setup Keyboard Language Switching on MacOS
1) Go to System Preferences (Click the Apple logo in the top-left).
2) Go to “Language & Region” and select "Keyboard Preferences.”
3) Click the "+" symbol to add the needed language. Type the needed language, select it and click "Add.”
4) Important: click on the "Use the Caps Lock Key to Switch to and from U.S." settings.
Press the Caps Lock key once to change languages. Then long press the Caps Lock key to capitalize letters and long press to switch back to lowercase.
Note: The “Use the Caps Lock key to switch to and from U.S. Press and hold to enable typing in all uppercase” setting won’t appear when you have two keyboards that use the same basic underlying set of characters. Pick a non-Latin keyboard, and the option appears.