Docs
API
  • lang

    Object

    Localization.

    Also read about i18n.

    The main purpose of lang param is to rewrite languages params.

    It is advised to set first i18n property and
    if it requires some not standard values than use property lang.

    Example

    
    var grid = new FancyGrid({
      title: 'Localization - French',
      lang: {
        paging: {
          info: 'Page courante [0] - [1] sur [2]',
          page: 'Page',
          of: 'sur [0]'
        },
        loadingText: 'En cours de chargement...',
        thousandSeparator: '.',
        decimalSeparator: ',',
        sourceText: 'Source',
        date: {
          read: 'd/m/Y',
          write: 'd/m/Y',
          edit: 'd/m/Y',
          today: "Aujourd'hui",
          startDay: 1,
          days: ['Dimanche', 'Lundi', 'Mardi', 'Mercredi', 'Jeudi', 'Vendredi', 'Samedi'],
          months: ['Janvier', ...],
          am: 'am',
          pm: 'pm',
          AM: 'AM',
          PM: 'PM',
          ok: 'OK',
          cancel: 'Annuler'
        }
      }
      ...
    });
    

    Example

    
    var grid = new FancyGrid({
      title: 'Localization - French',
      i18n: 'fr',
      lang: {  
        date: {
          read: 'm/d/Y'
        }
      }
      ...
    });
    

    Default

    Object with values from en-US language package