Set default language in typo3 neos (1.0.1 Beta)

718 Views Asked by At

I am having site with default language norway. How to set default language in neos. It seems by default it takes english as default language.

When i add simple contact form and for required fields it says (This is the required field) I just wanted to translate it to norway.

Could you please help in this.

Thank you in advance

1

There are 1 best solutions below

0
On

To change default language/locale to norwegian, all you need is to modify Configuration/Settings.yaml in root of your neos installation like this:

TYPO3:
  Flow:
    persistence:
      backendOptions:
        #your db setup here
    #start of what you need
    i18n:
      defaultLocale: de
    #de should be exchanged to no in your case.. but it will cause errors
    #end of what you need

But, at this point Flow doesn't have translations for norwegian, so for 'no' instead of 'de' it will throw exceptions. There are few ways of handling this:

  1. In Packages/Framework/TYPO3.Flow/Resources/Private/Translations create 'no' directory, then copy files from 'en' and translate them and then apply patch for your application.
  2. Create your own contact form plugin, with custom validation and errors in norwegian or translations from your own package.
  3. Create your own translated validators and modify contact-form.yaml in Packages/Sites/Typo3.NeosDemo...