The keyboard layout effects not only what is typed, but how the data is sent to the computer. It may appear that you have typed the same information, but the computer thinks it is different.
If a password is typed using the USA keyboard layout and then the layout is switched in the Localization preference panel passwords will no longer work. This is also true if you FTP, Telnet, or rlogin to a computer using a different keyboard layout than what was used to create password.
The only way to fix this problem is to change your password. Select the keyboard layout that your password was typed with in the Localization preferences. In the Password preferences type in the original password when prompted. Go to the Localization preferences again and change the keyboard layout to the new layout. Go back to the Password preferences and type in the new password.
If you are trying to remote login (via FTP, Telnet, etc) to your computer, the computer you are on will also have to have the same keyboard layout selected. If you are on a Mac OS X machine you can use the Preferences, as described, to change to layout. If you are running on a non Mac OS X machine, contact the manfuacturer of the operating system. Note: this probably will not work. The layout may be operating system specific.