Dev Helpers

JavaScript / Internationalization

Apply locale-sensitive uppercasing

Dev Helpers · June 22, 2026

Capitalization depends on the language of the text. Pass the intended locale at the boundary where a display label is created.

Worked example

console.log("istanbul".toLocaleUpperCase("tr"));

Result

İSTANBUL

Implementation notes

Keep case conversion out of database identity rules unless all participants share the same normalization policy. A label can change length during conversion.

Try it yourself

Compare the uppercase form of i in Turkish and English.

Open the JavaScript example →

Editorial date June 22, 2026 · Published December 6, 2026

Related articles

Sum distances with a Euclidean norm

A diagonal is longer than either of its components. Math.hypot combines perpendicular distances without making the caller square each input.

Build an OS-independent path

Path conventions belong to the destination. Use an explicit path flavour when generating portable asset names.

Resolve ranked ties

A leaderboard needs an explicit tie policy. Ranking tied scores and sorting their display order are separate decisions.