I have a Magento 2 shop hosted using a traditional cPanel
hosting solution. Performance seems to be stable with the demo data and I'd like to install a language pack.
My problem is that I can only access a file manager, or run very simple commands by creating one-time cron jobs that execute a command ! and I have to manually delete them afterwards.
How can I install a language pack using these restrictions, since I do not believe I have composer installed ?
Best Answer
According to your requirements, you can create a translation module yourself manually.
app/i18n/languageName/code_ISO/code_ISO.csv
Example: for the French language it will be like this:
app/i18n/french/fr_FR/fr_FR.csv
fr_FR.csv
like this :"Hello","Bonjour"
"Incorrect CAPTCHA","CAPTCHA incorrect",module,Magento_Captcha
app/i18n/languageName/code_ISO/language.xml
French language example:
app/i18n/french/fr_FR/language.xml
app/i18n/languageName/code_ISO/registration.php
French language example:
app/i18n/french/fr_FR/registration.php
Clean your cache, deploy the static-content like this :
pub/static
except.htaccess
var/cache
var/view_preprocessed
php bin/magento setup:static-content:deploy -f