Grid-Types


Note: Most of this has been integrated into Globalize and the local dataview (see Grid-SPF).

 


 

The Type feature handles detecting, validating, parsing and serializing various data types. One purpose is to enable type-specific sorting and filtering, like currencies or dates.

Implementations for dates and numbers should delegate to the jquery-global plugin.

 

Open issues:

 

 

Data types to work with:

 

 

In general sorting needs to have the value parsed to a number, otherwise will just sort as string. 

 

Filtering can have different options based on the type:

 

Demo with sorting and filtering

http://view.jqueryui.com/grid/grid-type/type.html

Demo with sorting, using the current grid implementation with underlying data model

http://view.jqueryui.com/grid/grid-datamodel/datasort.html

Demo for type detection

http://view.jqueryui.com/grid/grid-type/detection.html

 

 

// some olde stuff from dark places of the wiki:

// TODO review and integrate or remove

 

Use cases: 

  1. Set the locale info for all plugins prior to creating any (before document ready) (might be the case that the dom sets the locale e.g. <html lang="en">)
  2. Change locale for all plugins after creation and have them refresh.
  3. Change locale for a single plugin after creation and have it refresh (is this an actual use case?, Yes I have this use case where I have a page with serveral languages on it.)

 

Requirements:

  1. support localization of the following types
    1. Monetary
    2. Non-monetary numeric
    3. time
    4. date
    5. standard messages, yes/no, close
    6. numeral representation. Languages such as Hindi and Arabic use different characters to represent the digits 0-9. For example, the digit 9 is written as реп in Hindi.
  2. Formatting information for a locale can be centrally stored and not split between different plugins
  3. i18n cannot be a dependency for jQuery UI widgets. widgets should work properly without any localization.
  4. Must be able to mark strings so that a parser like xgettext can extract translatable strings for external translation. 
  5. Support different translation contexts to support instances where the same word has very different meanings in two different parts of the application and may translate to two different words in a given language. This article explains the issue better. 

 

Goals:

 

References:

Locales and localization in the GNU C Library 

GNU Gettext Utilities

I18n in rails

i18n javascript helper to use the rails translations

How Google Chrome extensions handle i18n