Actually Ok Google is designed to work on in US and nor internationally, so if you live outside US then Ok Google will not work for you, but there is a simple way to get it work.
To activate Ok Google on your Nexus 5 :-
- Navigate to Settings and tap on language & input
- Select “Voice Search” and then tap on “Language”
- Change your language to English (US) from your language which has been set by the phone automatically.
- Once you have set your language to English (US), you can see the Hotword detection option in Voice settings which is enabled by default, If not, click it to enable it.
- That’s it, now start using it.