MCPcopy Create free account
hub / github.com/facebook/Rapid / htmlForLocalizedText

Method htmlForLocalizedText

modules/core/LocalizationSystem.js:520–522  ·  view source on GitHub ↗

* htmlForLocalizedText * Just returns the given text wrapped in an HTML span element encoding the locale * @param {string} text the text content for the span * @param {string?} localeCode the locale code for the span * @return {string} text wrapped in a HTML span

(text, localeCode)

Source from the content-addressed store, hash-verified

518 * @return {string} text wrapped in a HTML span
519 */
520 htmlForLocalizedText(text, localeCode) {
521 return `<span class="localized-text" lang="${localeCode || 'unknown'}">${text}</span>`;
522 }
523
524
525 /**

Callers 2

tHtmlMethod · 0.95
gotDocsFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected