Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Documentation] Single language documentation fix #1063

Merged
merged 1 commit into from
Mar 8, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 1 addition & 73 deletions docs/05-01-going-single-language.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,40 +23,7 @@ mv app/config/security.yml app/config/security.multilang.yml
mv app/config/security.singlelang.yml app/config/security.yml
```

## 3) Change your AppKernel

Comment out the `KunstmaanLanguageChooserBundle` and `LuneticsLocaleBundle` in your [AppKernel.php](https://github.com/Kunstmaan/KunstmaanBundlesStandardEdition/blob/master/app/AppKernel.php)

```
//new Kunstmaan\LanguageChooserBundle\KunstmaanLanguageChooserBundle(),
//new Lunetics\LocaleBundle\LuneticsLocaleBundle(),
```

## 4) Change your config.yml

Comment out the `kunstmaan_language_chooser` configuration section in your [config.yml](https://github.com/Kunstmaan/KunstmaanBundlesStandardEdition/blob/master/app/config/config.yml)

```
#kunstmaan_language_chooser:
# autodetectlanguage: false
# showlanguagechooser: true
# languagechoosertemplate: CompanyYourBundle:Default:language-chooser.html.twig
# languagechooserlocales: [nl, fr, de, en]
```

## 5) Change your bundle's service.yml

Comment out the default locale listener in your bundle's `service.yml`

```
# companyyourbundle.default_locale_listener:
# class: Company\YourBundle\EventListener\DefaultLocaleListener
# tags:
# - { name: kernel.event_listener, event: kernel.response, method: onKernelResponse }
# arguments: [%defaultlocale%]
```

## 6) Change parameters.yml.dist and parameters.yml
## 3) Change parameters.yml.dist and parameters.yml

Configure the parameters.yml.dist (part of the repo) and parameters.yml (your local settings) files like so:

Expand All @@ -66,43 +33,4 @@ Configure the parameters.yml.dist (part of the repo) and parameters.yml (your lo
multilanguage: false
```

## 7) Prevent the admin from being cached

Change

```
fos_http_cache:
cache_control:
rules:
# match admin area
-
match:
path: ^/[^/]+/admin
headers:
cache_control:
public: false
max_age: 0
s_maxage: 0
last_modified: "-1 hour"
```

to

```
fos_http_cache:
cache_control:
rules:
# match admin area
-
match:
path: ^/admin
headers:
cache_control:
public: false
max_age: 0
s_maxage: 0
last_modified: "-1 hour"
```


And that's it, you now have a single language website.