CKEditor5.Components.LanguageNormalizer (ckeditor5_phoenix v1.16.1)

View Source

Normalizes language codes for CKEditor integration.

Summary

Functions

Normalizes the language code to a format suitable for CKEditor. If the language is nil, it defaults to "en". If the language is "en-us", it normalizes it to "en".

Functions

normalize_language(language)

@spec normalize_language(nil) :: String.t()
@spec normalize_language(String.t()) :: String.t()

Normalizes the language code to a format suitable for CKEditor. If the language is nil, it defaults to "en". If the language is "en-us", it normalizes it to "en".