diff --git a/doc/api.rst b/doc/api.rst index 0834a874..4e370252 100644 --- a/doc/api.rst +++ b/doc/api.rst @@ -85,6 +85,19 @@ Compatibility .. doxygentypedef:: fmt::string_view .. doxygentypedef:: fmt::wstring_view +Locale +------ + +All formatting is locale-independent by default. Use the ``'n'`` format +specifier to insert the appropriate number separator characters from the +locale:: + + #include + #include + + std::locale::global(std::locale("en_US.UTF-8")); + auto s = fmt::format("{:n}", 1000000); // s == "1,000,000" + .. _format-api: Format API