Add custom name for variant

Hello,
I've added a function to generate custom labels for variants select. It'is based on variant extension locallang.
yoda or empty() and operator should be || like in all other lines and also is $key more like $key => $value. Should be $extensionKey