Skip to content

Latest commit

 

History

History
59 lines (57 loc) · 1.76 KB

i18n.md

File metadata and controls

59 lines (57 loc) · 1.76 KB

Internationalization

The strings displayed by the editor may be translated into other languages using the i18n prop.

This example shows how to use the i18n prop to change the strings. It's shown with the default (English) values.

<Markmirror i18n={{
  // Button title attributes.
  previewTitle:      'Preview',
  findTitle:         'Find',
  findPrevTitle:     'Find Previous',
  findNextTitle:     'Find Next',
  h1Title:           'Header 1',
  h2Title:           'Header 2',
  h3Title:           'Header 3',
  boldTitle:         'Bold',
  italicTitle:       'Italic',
  oListTitle:        'Ordered List',
  uListTitle:        'Unordered List',
  quoteTitle:        'Quote',
  linkTitle:         'Link',
  imageTitle:        'Image',
  fullTitle:         'Fullscreen',
  uploadTitle:       'Upload',
  // Button labels when an icon isn't used.
  previewLabel:      'P',
  findLabel:         'Find',
  findPrevLabel:     'FP',
  findNextLabel:     'FN',
  h1Label:           'H1',
  h2Label:           'H2',
  h3Label:           'H3',
  boldLabel:         'B',
  italicLabel:       'I',
  oListLabel:        'OL',
  uListLabel:        'UL',
  quoteLabel:        'Q',
  linkLabel:         'L',
  imageLabel:        'I',
  fullLabel:         'F',
  uploadLabel:       'U',
  // Text inserted when text isn't already selected.
  h1Placeholder:     'Heading',
  h2Placeholder:     'Heading',
  h3Placeholder:     'Heading',
  boldPlaceholder:   'bold text',
  italicPlaceholder: 'italic text',
  oListPlaceholder:  'list',
  uListPlaceholder:  'list',
  quotePlaceholder:  'quote',
  linkPlaceholder:   'link',
  imagePlaceholder:  'alt text',
  // Misc.
  uploadError:       'Upload error',
  imageURL:          'Image URL',
  linkURL:           'Link URL'
}} />