Contents

Cms\Classes\LangScanner

Overview

LangScanner scans theme templates for translatable strings used with the translation filters and functions


Protected Properties

protected Cms\Classes\Theme $theme

theme to scan


Public Methods

public __construct()

public __construct($theme): void

__construct the scanner for a theme

public parseContent()

public parseContent($content): array 

parseContent extracts translatable strings from template markup

public static scan()

public static scan($theme): array 

scan is a helper method that returns the found messages for a theme

public scanForMessages()

public scanForMessages(): array 

scanForMessages in the theme layouts, pages and partials

Protected Methods

protected processTwigTags()

protected processTwigTags($content): array 

processTwigTags finds string literals passed to the translation filters (|trans, |_, |__, |trans_choice, |transchoice) and functions (__, trans, trans_choice) inside Twig expressions