How to set default language at moodle app

How to set default language at moodle app

by VItalii Hamash -
Number of replies: 12

If set another language by default, it's doesn't change.

i was attached file below.

at config.json and configconstants.ts  i made changes

"default_lang": "ka",

After building and running, language by default stay english.

I tried set different languages.

but it's doesn't work

Attachment Screenshot from 2020-09-16 04-08-37.png
Attachment Screenshot from 2020-09-16 04-13-14.png
Average of ratings: -
In reply to VItalii Hamash

Re: How to set default language at moodle app

by Kako Kvantaliani -

I believe, you mean that when you set parameters in config.json and configconstants.ts (like suteurl or default_lang) they are cleared after you run the project right?

In reply to VItalii Hamash

Re: How to set default language at moodle app

by Javier Tejera -
Hi there,

you can add forcedefaultlang = true in config.js.

This worked for me.
In reply to Javier Tejera

Re: How to set default language at moodle app

by VItalii Hamash -
Hi, Javier
Where is it that file config.js ?
Can you send a path to this file from the root folder to config.js ?
In reply to VItalii Hamash

Re: How to set default language at moodle app

by Javier Tejera -
Sure:

src/config.js
In reply to Javier Tejera

Re: How to set default language at moodle app

by VItalii Hamash -
Maybe config.json? Because config.js file does not exist.
Attachment Screenshot from 2021-02-04 06-08-06.png
In reply to VItalii Hamash

Re: How to set default language at moodle app

by VItalii Hamash -
Or we must create it?
In reply to VItalii Hamash

Re: How to set default language at moodle app

by Javier Tejera -
Yes, sorry, it is config.json:


In reply to Javier Tejera

Re: How to set default language at moodle app

by VItalii Hamash -
Hello, Javier.
it's not working
By default still, the English language is selected.
Attachment Screenshot from 2021-02-05 07-05-47.png
In reply to VItalii Hamash

Re: How to set default language at moodle app

by Javier Tejera -
That's strange, it works for me. Try clearing cache and cookies, run npm start again and also try other browsers.
In reply to Javier Tejera

Re: How to set default language at moodle app

by VItalii Hamash -
and for android or ios?
In reply to VItalii Hamash

Re: How to set default language at moodle app

by VItalii Hamash -
in production for AOT ?
In reply to VItalii Hamash

Re: How to set default language at moodle app

by Javier Tejera -
In my local machine, tried AOT production but I couldn't manage to deploy the app, so not really sure whether it works or not.