TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/formsmd/formsmd/llms.txt
Use this file to discover all available pages before exploring further.
translate() function returns a localized string from a translations object based on the current localization setting.
Function signature
Parameters
The language code to use for translation. Should match one of the supported language codes (e.g.,
"en", "es", "fr").An object containing translations for one or more languages. Each property is a language code with its corresponding translated text.
Returns
The translated text for the specified localization. If the requested language is not found in the translations object, returns the first available translation.
Usage example
TranslationsType
TheTranslationsType object contains optional properties for each supported language.
Type definition
Supported languages
Forms.md supports the following 9 languages:- English (en)
- Arabic (ar)
- Bengali (bn)
- German (de)
- Spanish (es)
- French (fr)
- Japanese (ja)
- Portuguese (pt)
- Chinese (zh)
Code:
enDefault language for Forms.md. Used as fallback when other languages are unavailable.Best practices
Always provide at least an English (
en) translation as a fallback. This ensures your content displays even when other languages are unavailable.Complete example
Related
- Settings reference - See the
localizationsetting - Composer class - Learn about using the Composer with translations