Forms.md includes built-in localization support for 9 languages. All UI elements, validation messages, and default text are automatically translated based on your selected language.Documentation 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.
Supported languages
Forms.md supports the following languages out of the box:English
en (default)Arabic
arBengali
bnGerman
deSpanish
esFrench
frJapanese
jaPortuguese
ptChinese
zhSetting the language
Set the language using thelocalization setting in your Markdown template:
The default language is English (
en) if not specified.Using the Composer API
When using the Composer class, set the language in the constructor:Automatic translations
When you set a language, Forms.md automatically translates:Form validation messages
Form validation messages
- Required field errors
- Invalid email format
- Invalid date/time format
- File size limit exceeded
- Invalid phone number format
UI elements
UI elements
- Button labels (Next, Previous, Submit, Restart)
- Loading states
- Success messages
- Form instructions
- Placeholder text
Input-specific text
Input-specific text
- “Choose as many as you like” for multiple choice
- “Size limit: X MB” for file uploads
- “Currently: filename.pdf” for existing files
- Country calling code labels
- Date/time format helpers
The translate() function
Use thetranslate() function to localize custom content in your forms.
Import and usage
Type definition
The translate function accepts a localization code and a translations object:Example with form fields
The
translate() function automatically falls back to the first available language if the specified localization isn’t found.Right-to-left (RTL) support
Forms.md includes full RTL support for languages like Arabic. Simply set both the localization and text direction:- Mirrors the layout
- Reverses text direction
- Adjusts form field alignment
- Repositions UI elements
- Arabic example
- With Composer API
Multi-language forms
Create forms that support multiple languages by detecting the user’s preference:Browser language detection
Language selector
Translation coverage
Here are examples of automatically translated UI text:Custom translations object
Access the full translations object directly:Best practices
Set localization early
Always set the
localization setting at the top of your template or in the Composer constructor:Use translate() consistently
For custom text that needs localization, always use the
translate() function:Next steps
Theming
Customize your form’s appearance
Google Sheets
Save responses to Google Sheets