You need to pass the text domain too. Assuming that you have the proper .mo
and .po
file, and loaded the text domain successfully:
if( $_POST["save"] === __( 'Publish', 'text-domain' ) ){
//do something
}
But this is not generally a good idea. You should do your checks based on something more certain, not a string that can be changed anytime.