A C++ program may add its own locales to be added to and used the same as the built in facets. To do this derive a class from locale::facet with the static member static locale::id.id.