Convert niceNames to method to allow localization

Hi

niceNames are currently implemented as class properties. These are inherently constrained by PHP to not allow dynamic value calculation and therefore dynamic values like using `trans()` cannot be defined.

By referencing the niceNames array in the `setAttributeNames` call as a method, a simple override of `niceNames()` is available to support dynamic values. If not overridden, legacy support is preserved as it just returns the `$niceNames` property by default.

The docs should probably be updated to suggest using the method.