Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
valdisiljuconoks committed Mar 1, 2016
1 parent fec5277 commit d137b1f
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,43 @@ New localization provider needs to be "registered" and added to the list of the

**NB!** If you do have extracted `<episerver.framework>` section into separate file (usually `episerver.framework.config`), please clean-up web.config after NuGet package installation and move content of the `<localization>` section to that separate physical file.

## Import Language Xml Files

This is a natural situation when adding `DbLocalizationProvider` to the project - there already will be Xml language files present.

Even after `DbLocalizationProvider` library is added - old Xml language files will continue to work. However - if you would like to get rid of language files completely - you will need to migrate them to the database.

Migration may happen in 2 ways:

* via SQL script generated by migration tool
* sometimes direct access (via `SqlConnection` object) may not be applicable. That's why it's possible to extract all Xml language file resources and later import them into database via Administration UI (AdminUI).


### Migration with SQL script

Migration via SQL script is pretty simple. First of all you need to install `DbLocalizationProvider.MigrationTool` package. Then you can execute `.exe` file inside package `tools/` folder.


```
> DbLocalizationProvider.MigrationTool.exe -s="{path-to-project}" -e -i
```

Explanation of switches used:

* `-s` - specifies **s**ource directory for the project (your web root)
* `-e` - asks migration tool to **e**xport all resources from language Xml files into SQL format file (resulting file `localization-resource-translations.sql` by default is located in the same folder specified by `-s`)
* `-i` - asks migration tool to **i**mport resources from exported file into directly database (using connection string named `"EPiServerDB"`)

### Migration via JSON file

Using JSON format export file is similar as with SQL script file, you just need to provide switch to use JSON file (import from AdminUI is supported only with JSON format files).


```
> DbLocalizationProvider.MigrationTool.exe -s="{path-to-project}" -e --json
```


## DbLocalizationProvider Features

All resources in DbLocalizationProvider system are divided into 2 groups:
Expand Down

0 comments on commit d137b1f

Please sign in to comment.