We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.
Required fields*
11
I had been wondering for a while why toUpperCase didn't really do much for some languages... but didn't quite care enough to find out. Glad I finally did, this was a very interesting read!
This doesn't seem to work with digraphs such as "IJ" in dutch. Using the latest version the example here is incorrectly capitalized to "Ijsselmeer" (The regex version). The code I used was: capitalizeFirstLetter('ijssel', 'nl-NL') - That's a correct localization string right?
@GéryOgam It may be helpful to know the formal term for what you’re trying to do with the second regular expression in the answer you linked: "segmentation". Segmentation is complex and, in some cases, its behavior varies with language as well. It’s defined by UAC #29. Fortunately, ECMAScript (via ECMA-402, the Intl API) provides an API for this, %Intl.Segmenter%. You’d use granularity: "word".
A tag is a keyword or label that categorizes your question with other, similar questions. Choose one or more (up to 5) tags that will help answerers to find and interpret your question.
complete the sentence: my question is about...
use tags that describe things or concepts that are essential, not incidental to your question
toUpperCasedidn't really do much for some languages... but didn't quite care enough to find out. Glad I finally did, this was a very interesting read!capitalizeFirstLetter('ijssel', 'nl-NL')- That's a correct localization string right?granularity: "word".