Changeset 394 for branches/gettext/examples
- Timestamp:
- 06/17/07 22:04:18 (1 year ago)
- Files:
-
- branches/gettext/examples/example_api_autovalidate.php (modified) (1 diff)
- branches/gettext/examples/example_api_default_attributes.php (modified) (1 diff)
- branches/gettext/examples/example_api_factory_customModule.php (modified) (1 diff)
- branches/gettext/examples/example_api_factory_detailed.php (modified) (1 diff)
- branches/gettext/examples/example_api_factory_simple.php (modified) (1 diff)
- branches/gettext/examples/example_api_locale.php (modified) (1 diff)
- branches/gettext/examples/example_api_locale_gettext.php (modified) (1 diff)
- branches/gettext/examples/example_api_locale_patI18n.php (added)
- branches/gettext/examples/example_api_replace_element.php (modified) (1 diff)
- branches/gettext/examples/example_api_setvalues.php (modified) (1 diff)
- branches/gettext/examples/example_api_toxml.php (modified) (1 diff)
- branches/gettext/examples/example_api_toxml_ns.php (modified) (1 diff)
- branches/gettext/examples/example_attributefilter_applyform.php (modified) (1 diff)
- branches/gettext/examples/example_attributefilter_gettext.php (modified) (1 diff)
- branches/gettext/examples/example_attributefilter_test.php (modified) (1 diff)
- branches/gettext/examples/example_creator_autosave.php (modified) (1 diff)
- branches/gettext/examples/example_creator_db.php (modified) (1 diff)
- branches/gettext/examples/example_creator_db_mysql.php (modified) (1 diff)
- branches/gettext/examples/example_datasrc_countries.php (modified) (2 diffs)
- branches/gettext/examples/example_datasrc_function.php (modified) (1 diff)
- branches/gettext/examples/example_datasrc_object.php (modified) (1 diff)
- branches/gettext/examples/example_element_combobox.php (modified) (1 diff)
- branches/gettext/examples/example_element_date.php (modified) (1 diff)
- branches/gettext/examples/example_element_enum.php (modified) (1 diff)
- branches/gettext/examples/example_element_enum_optgroup.php (modified) (1 diff)
- branches/gettext/examples/example_element_file.php (modified) (1 diff)
- branches/gettext/examples/example_element_group.php (modified) (1 diff)
- branches/gettext/examples/example_element_hidden.php (modified) (1 diff)
- branches/gettext/examples/example_element_number.php (modified) (2 diffs)
- branches/gettext/examples/example_element_pool.php (modified) (1 diff)
- branches/gettext/examples/example_element_pool_multi.php (modified) (2 diffs)
- branches/gettext/examples/example_element_radio.php (modified) (1 diff)
- branches/gettext/examples/example_element_radiogroup.php (modified) (1 diff)
- branches/gettext/examples/example_element_set.php (modified) (2 diffs)
- branches/gettext/examples/example_element_string.php (modified) (1 diff)
- branches/gettext/examples/example_element_switch.php (modified) (1 diff)
- branches/gettext/examples/example_element_switchgroup.php (modified) (1 diff)
- branches/gettext/examples/example_element_text.php (modified) (1 diff)
- branches/gettext/examples/example_event_combined.php (modified) (1 diff)
- branches/gettext/examples/example_event_object.php (modified) (1 diff)
- branches/gettext/examples/example_event_onerror.php (modified) (3 diffs)
- branches/gettext/examples/example_event_onsubmit.php (modified) (1 diff)
- branches/gettext/examples/example_event_onsuccess.php (modified) (2 diffs)
- branches/gettext/examples/example_filter_auto.php (modified) (1 diff)
- branches/gettext/examples/example_filter_function.php (modified) (1 diff)
- branches/gettext/examples/example_filter_multiplier.php (modified) (1 diff)
- branches/gettext/examples/example_filter_trim.php (modified) (1 diff)
- branches/gettext/examples/example_filter_xss.php (modified) (1 diff)
- branches/gettext/examples/example_observer_attach_element.php (modified) (1 diff)
- branches/gettext/examples/example_observer_attach_elements.php (modified) (1 diff)
- branches/gettext/examples/example_observer_attach_form.php (modified) (1 diff)
- branches/gettext/examples/example_observer_combining.php (modified) (1 diff)
- branches/gettext/examples/example_observer_error_attributes.php (modified) (1 diff)
- branches/gettext/examples/example_observer_readonly.php (modified) (1 diff)
- branches/gettext/examples/example_parser_attributes.php (modified) (1 diff)
- branches/gettext/examples/example_parser_datanamespace.php (modified) (1 diff)
- branches/gettext/examples/example_parser_datasource.php (modified) (1 diff)
- branches/gettext/examples/example_parser_events.php (modified) (1 diff)
- branches/gettext/examples/example_parser_html.php (modified) (1 diff)
- branches/gettext/examples/example_parser_intro.php (modified) (1 diff)
- branches/gettext/examples/example_parser_ns_auto.php (modified) (1 diff)
- branches/gettext/examples/example_parser_ns_handler.php (modified) (1 diff)
- branches/gettext/examples/example_parser_options.php (modified) (1 diff)
- branches/gettext/examples/example_parser_pattemplate.php (modified) (1 diff)
- branches/gettext/examples/example_parser_pattemplate_2forms.php (modified) (1 diff)
- branches/gettext/examples/example_parser_pattemplate_group.php (modified) (1 diff)
- branches/gettext/examples/example_parser_placeholder.php (modified) (1 diff)
- branches/gettext/examples/example_parser_radiogroups.php (modified) (1 diff)
- branches/gettext/examples/example_parser_simple.php (modified) (1 diff)
- branches/gettext/examples/example_renderer_array.php (modified) (1 diff)
- branches/gettext/examples/example_renderer_pattemplate.php (modified) (1 diff)
- branches/gettext/examples/example_renderer_pattemplate_form.php (modified) (1 diff)
- branches/gettext/examples/example_renderer_pattemplate_repeat.php (modified) (1 diff)
- branches/gettext/examples/example_renderer_radiogroup.php (modified) (1 diff)
- branches/gettext/examples/example_renderer_string.php (modified) (1 diff)
- branches/gettext/examples/example_renderer_string_attributes.php (modified) (1 diff)
- branches/gettext/examples/example_renderer_string_errors.php (modified) (1 diff)
- branches/gettext/examples/example_renderer_string_placeholders.php (modified) (1 diff)
- branches/gettext/examples/example_rule_after.php (modified) (1 diff)
- branches/gettext/examples/example_rule_before.php (modified) (1 diff)
- branches/gettext/examples/example_rule_conditionAnything.php (modified) (1 diff)
- branches/gettext/examples/example_rule_conditionalenum.php (modified) (1 diff)
- branches/gettext/examples/example_rule_element.php (modified) (1 diff)
- branches/gettext/examples/example_rule_format.php (modified) (1 diff)
- branches/gettext/examples/example_rule_remove.php (modified) (1 diff)
- branches/gettext/examples/example_storage_csv.php (modified) (1 diff)
- branches/gettext/examples/example_storage_db.php (modified) (1 diff)
- branches/gettext/examples/example_storage_mail.php (modified) (1 diff)
- branches/gettext/examples/example_storage_propel.php (modified) (1 diff)
- branches/gettext/examples/patExampleGen/config.php (modified) (2 diffs)
- branches/gettext/examples/patExampleGen/locale.php (modified) (1 diff)
- branches/gettext/examples/patExampleGen/patI18n-configure.php (added)
- branches/gettext/examples/patExampleGen/sections_api.php (modified) (1 diff)
- branches/gettext/examples/setup_gettext.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/gettext/examples/example_api_autovalidate.php
r373 r394 31 31 */ 32 32 require_once $neededFiles['patErrorManager']; 33 34 /** 35 * localisation stuff 36 */ 37 require_once $neededFiles['patI18n_configure']; 33 38 34 include dirname( __FILE__ ) . '/setup_gettext.php';35 39 36 40 // element definitions for this example branches/gettext/examples/example_api_default_attributes.php
r373 r394 32 32 require_once $neededFiles['patErrorManager']; 33 33 34 include dirname( __FILE__ ) . '/setup_gettext.php'; 34 /** 35 * localisation stuff 36 */ 37 require_once $neededFiles['patI18n_configure']; 35 38 39 36 40 // element definitions for this example 37 41 $elementsDefinition = array( branches/gettext/examples/example_api_factory_customModule.php
r379 r394 34 34 require_once $neededFiles['patErrorManager']; 35 35 36 /** 37 * localisation stuff 38 */ 39 require_once $neededFiles['patI18n_configure']; 40 36 41 37 42 // tell patForms where to find custom modules branches/gettext/examples/example_api_factory_detailed.php
r373 r394 35 35 require_once $neededFiles['patErrorManager']; 36 36 37 include dirname( __FILE__ ) . '/setup_gettext.php'; 37 /** 38 * localisation stuff 39 */ 40 require_once $neededFiles['patI18n_configure']; 38 41 39 42 // username element attribute collection branches/gettext/examples/example_api_factory_simple.php
r373 r394 34 34 require_once $neededFiles['patErrorManager']; 35 35 36 include dirname( __FILE__ ) . '/setup_gettext.php'; 36 /** 37 * localisation stuff 38 */ 39 require_once $neededFiles['patI18n_configure']; 37 40 38 41 branches/gettext/examples/example_api_locale.php
r373 r394 32 32 require_once $neededFiles['patErrorManager']; 33 33 34 include dirname( __FILE__ ) . '/setup_gettext.php'; 35 34 /** 35 * internationalisaion 36 */ 37 require_once $neededFiles['patI18n']; 38 39 // Internal 40 $moduleConf = array(); 41 patI18n::addModule( 'Internal', $moduleConf ); 42 43 // Gettext 44 $moduleConf = array( 45 'domain' => 'this_domain_is_not_used', 46 'dir' => '/tmp', 47 'domains' => array( 48 array( 49 'domain' => 'patForms', 50 'dir' => dirname( __FILE__ ) . '/locales', 51 ) 52 ) 53 ); 54 patI18n::addModule( 'Gettext', $moduleConf ); 55 patI18n::setLocale( $_GET['lang'] ); 56 57 // all the above is done by the following include 58 // require_once $neededFiles['patI18n_configure']; 36 59 37 60 // element definitions for this example branches/gettext/examples/example_api_locale_gettext.php
r373 r394 32 32 require_once $neededFiles['patErrorManager']; 33 33 34 include dirname( __FILE__ ) . '/setup_gettext.php'; 34 /** 35 * localisation stuff 36 */ 37 require_once $neededFiles['patI18n_configure']; 35 38 36 39 branches/gettext/examples/example_api_replace_element.php
r373 r394 34 34 require_once $neededFiles['patErrorManager']; 35 35 36 include dirname( __FILE__ ) . '/setup_gettext.php'; 37 36 /** 37 * localisation stuff 38 */ 39 require_once $neededFiles['patI18n_configure']; 38 40 39 41 // element definitions for this example - note branches/gettext/examples/example_api_setvalues.php
r373 r394 32 32 require_once $neededFiles['patErrorManager']; 33 33 34 include dirname( __FILE__ ) . '/setup_gettext.php'; 34 /** 35 * localisation stuff 36 */ 37 require_once $neededFiles['patI18n_configure']; 35 38 36 39 branches/gettext/examples/example_api_toxml.php
r373 r394 32 32 require_once $neededFiles['patErrorManager']; 33 33 34 include dirname( __FILE__ ) . '/setup_gettext.php'; 34 /** 35 * localisation stuff 36 */ 37 require_once $neededFiles['patI18n_configure']; 35 38 36 39 branches/gettext/examples/example_api_toxml_ns.php
r373 r394 32 32 require_once $neededFiles['patErrorManager']; 33 33 34 include dirname( __FILE__ ) . '/setup_gettext.php'; 34 /** 35 * localisation stuff 36 */ 37 require_once $neededFiles['patI18n_configure']; 35 38 36 39 branches/gettext/examples/example_attributefilter_applyform.php
r373 r394 31 31 require_once $neededFiles['patErrorManager']; 32 32 33 include dirname( __FILE__ ) . '/setup_gettext.php'; 33 /** 34 * localisation stuff 35 */ 36 require_once $neededFiles['patI18n_configure']; 34 37 35 38 // element definitions for this example branches/gettext/examples/example_attributefilter_gettext.php
r373 r394 31 31 require_once $neededFiles['patErrorManager']; 32 32 33 include dirname( __FILE__ ) . '/setup_gettext.php'; 33 /** 34 * localisation stuff 35 */ 36 require_once $neededFiles['patI18n_configure']; 34 37 35 38 // element definitions for this example branches/gettext/examples/example_attributefilter_test.php
r373 r394 31 31 require_once $neededFiles['patErrorManager']; 32 32 33 include dirname( __FILE__ ) . '/setup_gettext.php'; 33 /** 34 * localisation stuff 35 */ 36 require_once $neededFiles['patI18n_configure']; 34 37 35 38 // element definitions for this example branches/gettext/examples/example_creator_autosave.php
r373 r394 33 33 require_once $neededFiles['patForms']; 34 34 35 include dirname( __FILE__ ) . '/setup_gettext.php';36 37 35 /** 38 36 * patErrorManager class 39 37 */ 40 38 require_once $neededFiles['patErrorManager']; 39 40 /** 41 * localisation stuff 42 */ 43 require_once $neededFiles['patI18n_configure']; 44 41 45 42 46 // the DSN to your database branches/gettext/examples/example_creator_db.php
r117 r394 38 38 require_once $neededFiles['patErrorManager']; 39 39 40 /** 41 * localisation stuff 42 */ 43 require_once $neededFiles['patI18n_configure']; 44 40 45 41 46 // create the creator :) branches/gettext/examples/example_creator_db_mysql.php
r117 r394 37 37 */ 38 38 require_once $neededFiles['patErrorManager']; 39 40 /** 41 * localisation stuff 42 */ 43 require_once $neededFiles['patI18n_configure']; 39 44 40 45 branches/gettext/examples/example_datasrc_countries.php
r278 r394 31 31 */ 32 32 require_once $neededFiles['patErrorManager']; 33 34 /** 35 * localisation stuff 36 */ 37 require_once $neededFiles['patI18n_configure']; 38 39 /** 40 * localisation stuff 41 */ 42 require_once $neededFiles['patI18n_configure']; 43 33 44 34 45 … … 65 76 // create the form 66 77 $form =& patForms::createForm($elementsDefinition, array('name' => 'myForm')); 67 68 // set the form locale, the country selection is adjusted automatically69 $form->setLocale('de');70 71 78 72 79 $countries = &patForms::createDatasource('Countries'); branches/gettext/examples/example_datasrc_function.php
r267 r394 31 31 */ 32 32 require_once $neededFiles['patErrorManager']; 33 34 /** 35 * localisation stuff 36 */ 37 require_once $neededFiles['patI18n_configure']; 38 33 39 34 40 branches/gettext/examples/example_datasrc_object.php
r117 r394 31 31 */ 32 32 require_once $neededFiles['patErrorManager']; 33 34 /** 35 * localisation stuff 36 */ 37 require_once $neededFiles['patI18n_configure']; 33 38 34 39 branches/gettext/examples/example_element_combobox.php
r185 r394 31 31 */ 32 32 require_once $neededFiles['patErrorManager']; 33 34 /** 35 * localisation stuff 36 */ 37 require_once $neededFiles['patI18n_configure']; 33 38 34 39 branches/gettext/examples/example_element_date.php
r176 r394 31 31 */ 32 32 require_once $neededFiles['patErrorManager']; 33 34 /** 35 * localisation stuff 36 */ 37 require_once $neededFiles['patI18n_configure']; 33 38 34 39 /** branches/gettext/examples/example_element_enum.php
r117 r394 31 31 */ 32 32 require_once $neededFiles['patErrorManager']; 33 34 /** 35 * localisation stuff 36 */ 37 require_once $neededFiles['patI18n_configure']; 33 38 34 39 branches/gettext/examples/example_element_enum_optgroup.php
r347 r394 31 31 */ 32 32 require_once $neededFiles['patErrorManager']; 33 34 /** 35 * localisation stuff 36 */ 37 require_once $neededFiles['patI18n_configure']; 33 38 34 39 branches/gettext/examples/example_element_file.php
r355 r394 33 33 */ 34 34 require_once $neededFiles['patErrorManager']; 35 36 /** 37 * localisation stuff 38 */ 39 require_once $neededFiles['patI18n_configure']; 35 40 36 41 branches/gettext/examples/example_element_group.php
r168 r394 31 31 */ 32 32 require_once $neededFiles['patErrorManager']; 33 34 /** 35 * localisation stuff 36 */ 37 require_once $neededFiles['patI18n_configure']; 33 38 34 39 branches/gettext/examples/example_element_hidden.php
r117 r394 31 31 */ 32 32 require_once $neededFiles['patErrorManager']; 33 34 /** 35 * localisation stuff 36 */ 37 require_once $neededFiles['patI18n_configure']; 33 38 34 39 branches/gettext/examples/example_element_number.php
r117 r394 32 32 require_once $neededFiles['patErrorManager']; 33 33 34 /** 35 * localisation stuff 36 */ 37 require_once $neededFiles['patI18n_configure']; 38 34 39 35 40 // element definitions for this example … … 59 64 // you can set the separator character to use 60 65 // for the number format string: 61 //'formatseparator' => ' §',66 //'formatseparator' => '', 62 67 ), 63 68 ), branches/gettext/examples/example_element_pool.php
r117 r394 31 31 */ 32 32 require_once $neededFiles['patErrorManager']; 33 34 /** 35 * localisation stuff 36 */ 37 require_once $neededFiles['patI18n_configure']; 33 38 34 39 branches/gettext/examples/example_element_pool_multi.php
r117 r394 31 31 */ 32 32 require_once $neededFiles['patErrorManager']; 33 33 34 /** 35 * localisation stuff 36 */ 37 require_once $neededFiles['patI18n_configure']; 34 38 35 39 // element definitions for this example … … 100 104 ), 101 105 array( 102 'label' => 'Bj örn Schotte',106 'label' => 'Bjᅵn Schotte', 103 107 'value' => 1004, 104 108 ), branches/gettext/examples/example_element_radio.php
r360 r394 32 32 require_once $neededFiles['patErrorManager']; 33 33 34 /** 35 * localisation stuff 36 */ 37 require_once $neededFiles['patI18n_configure']; 34 38 35 39 // element definitions for this example branches/gettext/examples/example_element_radiogroup.php
r380 r394 32 32 require_once $neededFiles['patErrorManager']; 33 33 34 /** 35 * localisation stuff 36 */ 37 require_once $neededFiles['patI18n_configure']; 34 38 35 39 // element definitions for this example branches/gettext/examples/example_element_set.php
r271 r394 31 31 */ 32 32 require_once $neededFiles['patErrorManager']; 33 34 /** 35 * localisation stuff 36 */ 37 require_once $neededFiles['patI18n_configure']; 33 38 34 39 … … 58 63 ), 59 64 array( 60 'label' => 'More J ägerschnitzel',65 'label' => 'More Jᅵerschnitzel', 61 66 'value' => 'w3' 62 67 ), branches/gettext/examples/example_element_string.php
r268 r394 32 32 require_once $neededFiles['patErrorManager']; 33 33 34 /** 35 * localisation stuff 36 */ 37 require_once $neededFiles['patI18n_configure']; 34 38 35 39 // element definitions for this example branches/gettext/examples/example_element_switch.php
r321 r394 31 31 */ 32 32 require_once $neededFiles['patErrorManager']; 33 34 /** 35 * localisation stuff 36 */ 37 require_once $neededFiles['patI18n_configure']; 33 38 34 39 branches/gettext/examples/example_element_switchgroup.php
r380 r394 31 31 */ 32 32 require_once $neededFiles['patErrorManager']; 33 34 /** 35 * localisation stuff 36 */ 37 require_once $neededFiles['patI18n_configure']; 33 38 34 39 branches/gettext/examples/example_element_text.php
r380 r394 31 31 */ 32 32 require_once $neededFiles['patErrorManager']; 33 34 /** 35 * localisation stuff 36 */ 37 require_once $neededFiles['patI18n_configure']; 33 38 34 39 branches/gettext/examples/example_event_combined.php
r294 r394 32 32 require_once $neededFiles['patErrorManager']; 33 33 34 /** 35 * localisation stuff 36 */ 37 require_once $neededFiles['patI18n_configure']; 34 38 35 39 // element definitions for this example branches/gettext/examples/example_event_object.php
r117 r394 31 31 */ 32 32 require_once $neededFiles['patErrorManager']; 33 34 /** 35 * localisation stuff 36 */ 37 require_once $neededFiles['patI18n_configure']; 33 38 34 39 branches/gettext/examples/example_event_onerror.php
r117 r394 32 32 require_once $neededFiles['patErrorManager']; 33 33 34 /** 35 * localisation stuff 36 */ 37 require_once $neededFiles['patI18n_configure']; 34 38 35 39 // element definitions for this example … … 53 57 // register the event handler for the onSubmit event - in this case, 54 58 // a custom function. 55 $form->registerEventHandler( 'onError', ' displayErrors' );59 $form->registerEventHandler( 'onError', 'myDisplayErrors' ); 56 60 57 61 /** … … 64 68 * @see patForms::registerEventHandler() 65 69 */ 66 function displayErrors( &$form, $event )70 function myDisplayErrors( &$form, $event ) 67 71 { 68 72 // get and display errors as needed branches/gettext/examples/example_event_onsubmit.php
r274 r394 32 32 require_once $neededFiles['patErrorManager']; 33 33 34 /** 35 * localisation stuff 36 */ 37 require_once $neededFiles['patI18n_configure']; 34 38 35 39 // element definitions for this example branches/gettext/examples/example_event_onsuccess.php
r117 r394 32 32 require_once $neededFiles['patErrorManager']; 33 33 34 /** 35 * localisation stuff 36 */ 37 require_once $neededFiles['patI18n_configure']; 34 38 35 39 // element definitions for this example … … 69 73 ), 70 74 array( 71 'label' => 'More J ägerschnitzel',75 'label' => 'More Jᅵerschnitzel', 72 76 'value' => 'w3' 73 77 ), branches/gettext/examples/example_filter_auto.php
r117 r394 31 31 */ 32 32 require_once $neededFiles['patErrorManager']; 33 34 /** 35 * localisation stuff 36 */ 37 require_once $neededFiles['patI18n_configure']; 33 38 34 39 branches/gettext/examples/example_filter_function.php
r187 r394 31 31 */ 32 32 require_once $neededFiles['patErrorManager']; 33 34 /** 35 * localisation stuff 36 */ 37 require_once $neededFiles['patI18n_configure']; 33 38 34 39
