Skip to content

Commit

Permalink
Adding docs for i18n
Browse files Browse the repository at this point in the history
  • Loading branch information
wernerkrauss committed Mar 5, 2024
1 parent 52eff1f commit 17ef369
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 7 deletions.
14 changes: 13 additions & 1 deletion docs/en/01_Getting_Set_Up/03_Troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,18 @@ SilverShop\ORM\FieldType\ShopCurrency:

then run `dev/build`

## Currencies are shown as simple number or with wrong decimal separator in GridFields

If you changed `summary_fields` of Product or Variation in one of your extensions, you need to make sure, that you tell the GridField to use `.Nice` for it. Example:

```php
private static $summary_fields = [
'Price.Nice' => 'Price',
'AdditionalPrice.Nice' => 'AdditionalPrice', # some custom price field
];

```

## I can't get payments to work? eg: PayPal, PaymentExpress, Other..

see [payment](06_Payment.md)
Expand All @@ -49,7 +61,7 @@ The default shop module provides a few shipping [modifiers](../03_How_It_Works/O
Follow the [Silverstripe internationalisation guide](http://docs.silverstripe.org/en/developer_guides/i18n/)


The translation of the silvershop module is being done via Transifex. You can see the current translation progress on: [www.transifex.com/silvershop/silverstripe-shop](https://www.transifex.com/silvershop/silverstripe-shop).
The translation of the silvershop module is being done via Transifex. You can see the current translation progress on: [www.transifex.com/silvershop/silverstripe-shop](https://www.transifex.com/silvershop/silverstripe-shop).
If your language isn't translated yet, we welcome your contribution on transifex! Just click the **"Help Translate "SilverShop"** button to get started.


Expand Down
19 changes: 19 additions & 0 deletions docs/en/01_Getting_Set_Up/07_Internationalisation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Internationalsiation i18n

## Setting different currency, decimal and thousand separators

You can set the currency, decimal and thousand separators in your config.yml file.

```yaml
SilverShop\Extension\ShopConfigExtension:
base_currency: 'EUR'
SilverShop\ORM\FieldType\ShopCurrency:
decimal_delimiter: ','
thousand_delimiter: '.'
# european style currencies, e.g. 45,00 € instead of €45,00
append_symbol: true
```
## Currencies are shown as simple number or with wrong decimal separator in GridFields
See [Troubleshooting](03_Troubleshooting.md#currencies-are-shown-as-simple-number-or-with-wrong-decimal-separator-in-gridfields) for more information.
5 changes: 4 additions & 1 deletion docs/en/01_Getting_Set_Up/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ Follow the standard [SilverStripe installation guide](http://docs.silverstripe.o

[Set up your payment provider](06_Payment.md), so customers can make online payments.

## Internationalisation
See [Internationalsiation i18n](07_Internationalisation.md) for some tips on how to use localise your shop settings.

## Automated Tasks

Add some [automated tasks](Tasks.md) to handle some things automatically for you.
Expand All @@ -34,7 +37,7 @@ If you are wanting to use a debugger tool, you'll probably need to make sure you

### E-Mails

The best way to catch/debug local emails is to use a service such as [Mailtrap](https://mailtrap.io/) which has a free plan.
The best way to catch/debug local emails is to use a service such as [Mailtrap](https://mailtrap.io/) which has a free plan.

The [silverstripe-email-helpers](https://packagist.org/packages/markguinn/silverstripe-email-helpers) module that will be installed alongside silvershop can be used to send your emails to the mailtrap service. To do so, create a config file `mysite/_config/mailer.yml` with the following content:

Expand Down
10 changes: 5 additions & 5 deletions docs/en/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Add it as a shop component of a website, or use as a full ecommerce website solu

Customisation is left to the developer, similar to how the SilverStripe CMS is customised.
There is little in the way of online web-interface based configuration, tweaking and setup.
This has been left for the store owner to collaborate with their developer.
This has been left for the store owner to collaborate with their developer.

## [Getting Set Up](01_Getting_Set_Up/index.md) < Start Here

Expand All @@ -13,7 +13,7 @@ This has been left for the store owner to collaborate with their developer.
* [Payment](01_Getting_Set_Up/06_Payment.md)
* [Bulk loading products from a CSV spreadsheet](01_Getting_Set_Up/Bulk_Loading.md)
* [Shipping](01_Getting_Set_Up/04_Shipping.md) and [Tax](01_Getting_Set_Up/05_Tax.md) Calculation

* [Internationalsiation i18n](01_Getting_Set_Up/07_Internationalisation.md)
## [Customisation](02_Customisation/index.md)

* [Emails](02_Customisation/Emails.md)
Expand All @@ -23,7 +23,7 @@ This has been left for the store owner to collaborate with their developer.
* [Hooks](02_Customisation/Hooks.md)
* [Recipes](02_Customisation/01_Recipes) - how do build in various features.
* [Migrating To Silverstripe](02_Customisation/Migrating_To_SilverStripe.md)
* [Contributing](02_Customisation/Contributing.md) - get involved with development.
* [Contributing](02_Customisation/Contributing.md) - get involved with development.
* [Testing](02_Customisation/Testing.md) - infrastructure / instructions


Expand All @@ -38,9 +38,9 @@ This has been left for the store owner to collaborate with their developer.
* [Shopping Cart](03_How_It_Works/Shopping_Cart.md)
* [Development](03_How_It_Works/Development.md) - Mission/aim, Coding style/conventions, Release process
* [Glossary](03_How_It_Works/Glossary.md)

## External Links

* [Demo](http://demo.ss-shop.org/)
* [Project Homepage](http://ss-shop.org/)
* [Forum](https://www.silverstripe.org/community/forums/e-commerce-modules/)
* [Forum](https://www.silverstripe.org/community/forums/e-commerce-modules/)

0 comments on commit 17ef369

Please sign in to comment.