Get 2024 Templates Mega Bundle!$1000 worth of 19 Bootstrap HTML, Vue & React Templates + 3 Vector Sets for just $99
Get for 99$

Can't find how to change the language in Metronic 8 Laravel.


Hello,

I have been trying to find a way to change the language i use in my laravel/metronic 8 application.

1st problem : I have created a new lang folder called fr, and to get started I copied the files I had in the folder en, translated them, changed the language in app.php and the pages are not getting translated. For example i used the "__" helper in the login.blade.php view and it's not working. It's outputing the key/parameter i'm sending with the "__" helper.

2nd problem : I also tried finding a way to change the error message i get in the forms.
By default when I empty the metronic 8 password input it says "the password is requried" In red. I can't find where to change that.

Looking for help,

Thank you in advance


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (3)


Hi Ali Silarbi,

The login modal message could be from this file resources/assets/extended/js/custom/authentication/sign-in/general.js

Thanks



Hello,

Effectively you're right,

I got only one small question left, after I changed the language, I noticed that on the modal that i get on the incorrect login informations, the message is duplicated, can I know where i also can change that ?



Hi Ali Silarbi,

The validation localization file uses the default Laravel.

You copy from en lang and create a new language folder, then customize it to your language;
resources/lang/en

Look for the file here;
resources/lang/en/validation.php

Check the documentation online;
https://laravel.com/docs/9.x/localization

Thanks


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(