Added localization code

Still incomplete