And in fact, something like en-US-small_public is within the capability of the RFC4646 conventions we use in Koha. Part of the reason I chose RFC4646 to represent language codes during the langtag redesign is that it supports 'extensions'. So you could have something like:
en-NZ-l-small_public-i-opac-t-prog-v-3000000
The first two subtags are valid in the subtag registry, but the rest of them are context-specific extensions ... in this case, specific to Koha itself. The l- prefix might refer to library type, the i- prefix is 'Interface' (opac or staff), the t- prefix refers to the template used, and the v- prefix to the version string.