Angular Universal with i18n (Server Side Rendering)

A solution is to pre-build packages for each language, and have a proxy detect which bundle to serve as default. From the Angular docs on i8n: Merge with the AOT compiler The AOT (Ahead-of-Time) compiler is part of a build process that produces a small, fast, ready-to-run application package. When you internationalize with the AOT … Read more

Rails: How to raise I18n translation is missing exceptions in the testing environment

As of Rails 4.1.0, there’s now a better solution than the 4 year-old answers to this question: add the following line to your config file: config.action_view.raise_on_missing_translations = true I like to set this in the test environment only, but you might also want to set it in development. I would strongly advise against setting it … Read more

In what JS engines, specifically, are toLowerCase & toUpperCase locale-sensitive?

Note: Please, note that I couldn’t test it! As per ECMAScript specification: String.prototype.toLowerCase ( ) […] For the purposes of this operation, the 16-bit code units of the Strings are treated as code points in the Unicode Basic Multilingual Plane. Surrogate code points are directly transferred from S to L without any mapping. The result … Read more

Credit Card validation: can Card Name contain non-ASCII characters?

The character set that is used does not allow for diacritics. In brief, it only allows uppercase ASCII characters. The restriction ultimately comes from the historical way in which banking cards encode data onto the magnetic stripe (as defined in ISO 7811). The data is encoded in a 7 bits per character format known as … Read more

tech