Generate the download filename from existing text (e.g. "Recent searches") which will simplify things for translators.
- Get the localized text
- Apply a filter (so it can be changed by plugins/functions)
- Sanitize it (https://codex.wordpress.org/Function_Reference/sanitize_file_name)
- (Don't do this) Lowercase_ it (
$str = mb_strtolower($str, mb_detect_encoding($str));)
Generate the download filename from existing text (e.g. "Recent searches") which will simplify things for translators.
$str = mb_strtolower($str, mb_detect_encoding($str));)