Dynamic locale directive changes

### Index Up << >>

## Dynamic locale directive changes

If you set Locale keys corresponding to some MiniVend `catalog.cfg` directives, those values will be set when setting the locale.

PageDir
  To use a different page directory for different locales, set the PageDir key. To have two separate language page sets, French and English, you would set:

          # Establish the default at startup
          PageDir   english
          Locale fr_FR  PageDir  francais
          Locale en_US  PageDir  english

ImageDir
  To use a different image directory for different locales, set the ImageDir key. To have two separate language button sets, French and English, you would set:

          # Establish the default at startup
          ImageDir   /images/english/
          Locale fr_FR  ImageDir   /images/francais/
          Locale en_US  ImageDir   /images/english/

ImageDirSecure
  Same as ImageDir.

PriceField
  To use a different field in the products database for pricing based on locale, set the PriceField locale setting.

          # Establish the default at startup
          PriceField    price
          Locale fr_FR  PriceField  prix

  The default will always be price, but if the locale `fr_FR` is set, the PriceField directive will change to `prix` to give prices in francs instead of dollars.

  If PriceBreaks is enabled, then the field `prix` from the pricing database will be used to develop the quantity pricing. NOTE: If no Locale settings are present, it will always be price, irrespective of the PriceField setting. Otherwise it will always match PriceField.

PriceDivide
  Normally used to enable penny pricing with a setting of 100, this can be used to do an automatic conversion factor based on locale.

          # Default at startup is 1 if not set
          # Franc is strong these days!
          Locale fr_FR  PriceDivide  .20

  The price will now be divided by `.20`, yielding franc prices five times that of the dollar.

PriceCommas
  Perhaps this isn't a good name anymore, but it controls whether the `mon_thousands_sep` will be used for standard currency formatting. Ignored if using price_picture. Set to 1 or 0, to enable and disable respectively. DO NOT USE Yes and No.

          # Default at startup is Yes if not set
          PriceCommas  Yes
          Locale fr_FR  PriceCommas  0
          Locale en_US  PriceCommas  1

UseModifier
  Changes the fields from that set shopping cart options.

          # Default at startup is 1 if not set
          # Franc is strong these days!
          UseModifier format
          Locale fr_FR  UseModifier formats

  If a previous setting was made for an item based on another locale, it will be maintained.

PriceAdjustment
  Changes the fields from UseModifier that will be used to adjust pricing. used to do an automatic conversion factor based on locale.

          # Default at startup
          PriceAdjustment  format
          Locale fr_FR  PriceAdjustment  formats

TaxShipping,SalesTax
  Same as the standard directives.

DescriptionField
  This changes the field accessed by default with the `[item-description]` and `[description code]` tags.

          # Establish the default at startup
          DescriptionField    description
          Locale fr_FR  DescriptionField desc_fr

The [locale] tag
  You can set standard error messages based on Locale settings. Make sure you don't use any of the predefined keys -- it will be safe if you begin the key with msg_ or such. The default message is set between the `[locale key]` and `[/locale]` tags. See the example above.

### Index Up << >>