Please note that the forum isn't realy used anymore.

If you have questions, want support or just simply want to talk to us you can find us on slack.

 

Add a new language after install

Hi Guys, Is it possible to install a new language after installing Fork CMS ?

Regards

Unfortunately, Fork CMS still needs a user-friendly way to add additional languages after install. This is a know issue, but the CMS is migrating from the Spoon Library to a full-stack Symfony application so I guess the dev's don't have time to implement new features like this until the migration is done.

Add additional languages to Fork CMS

You'll need to dive into the db to do this and create a serialized array with php.

First you should create an array with all the languages you want. eg: $var = array('en', 'fr', 'es'); . Then you should serialize it in php: echo serialize($var); and run the php file and copy the generated string. (Do all of this in a blank php file or a php online sandbox tool)

Then go to your database and run (this is for 3.7, for 3.6 lowercase the module names!!):

UPDATE modules_settings SET value = "<insert string="" here="">" WHERE name = "languages" AND (module = "Core" OR module= "Locale");</insert>

This will add the languages. You can active the languages in the backend settings > General tab. Make sure your site has site.multilanguage set to true in the parameters.yml file. It's best to also clear the cache. I think you will have missing translations in the locale table, but you can try to import them from the backend (/src/Backend/Core/Installer/Data/locale.xml).

You can copy pages from one language to another with a hidden action: siteurl/pages/copy?from=en&to=fr.

Let me know if this works...

Thank you for the answer. I created a new Fork CMS install then exported new languages entries to XML. After that I updated the database like you described ( I manually wrote the serialised array :) ). Frontend strings were imported successfully but not backend ones. Any idea .

The /src/Backend/Core/Installer/Data/locale.xml contains all Fork CMS translations translations I think. Try importing this one from the backend (settings > translations)

And maybe you also have missing translations for your modules (blog, ..)? There's a locale.xml file in each Install folder inside the module folder (in Frontend or Backend folder).

Worked I had to do the same with interface_languages in core module settings. Thank you Jesse.

Comment

The forum is deprecated in favor of our Slack channel, which provides real-time support for your issues.

Join us on Slack here: https://fork-cms.herokuapp.com/