Reputation: 30411
I'm about to create a multilingual site where English will be used for the public pages then Arabic for the Admin. I've never worked on this before and am unsure where to begin. Maybe those who've done multilingual sites before can answer a few questions for me.
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
?I really am a bit lost on where to begin on this.
Upvotes: 5
Views: 6433
Reputation: 11
By default, Laravel uses the email field for authentication. If you would like to customize this, you may define a username method on your LoginController:
public function username()
{
return 'username';
}
Upvotes: 0
Reputation: 12172
iso-8859-6
, so you'll need to change the charset attribute in the admin viewsbody { direction: rtl; }
in your css for the Arabic pagesYou might find these links useful:
When you want to validate form fields using Laravel's translation files (application/language/XX/validation.php
), you will find that the :attribute
placeholder uses the form field's name
attribute, resulting in a mostly-translated error message with the word "email" (or whatever) in English. You can work around this by using the Validation Attributes array to hook up the English field names with the Arabic equivalent. If you find you've already translated them in another language file, you can use the following code instead:
'attributes' => array_merge(
Lang::file('application', 'ar', 'filename_without_extension'),
Lang::file('application', 'ar', 'another_file')
),
Upvotes: 6