<?php

$__RB_LNG = [
    'validation' => [
        'name' => [
            'name' => 'Name'
        ],
        'firstname' => [
            'name' => 'First name'
        ],
        'firstName' => [
            'name' => 'First name'
        ],
        'lastname' => [
            'name' => 'Last name',
            'validation' => 'Last name isn\'t valid'
        ],
        'lastName' => [
            'name' => 'Last name',
            'validation' => 'Last name isn\'t valid'
        ],
        'address' => [
            'name' => 'Address',
        ],
        'zipcode' => [
            'name' => 'Zip code'
        ],
        'postalCode' => [
            'name' => 'Zip code'
        ],
        'city' => [
            'name' => 'City',
        ],
        'mail' => [
            'name' => 'E-mail address',
        ],
        'email' => [
            'name' => 'E-mail address',
        ],
        'emailAddress' => [
            'name' => 'E-mail address',
        ],
        'phone' => [
            'name' => 'Phone number',
        ],
        'phoneNumber' => [
            'name' => 'Phone number',
        ],
        'message' => [
            'name' => 'Message',
        ],
        'state' => [
            'name' => 'State',
        ],
        'country' => [
            'name' => 'Country',
        ],
        'note' => [
            'name' => 'Note',
        ],
        'subject' => [
            'name' => 'Subject',
        ],
        'date' => [
            'name' => 'Date ',
        ],
        'tos' => [
            'name' => 'Terms',
            'validation' => 'You need to accept the terms to proceed',
            'missing' => 'You need to accept the terms to proceed',
            'empty' => 'You need to accept the terms to proceed',
        ],
        'terms' => [
            'name' => 'Terms',
            'validation' => 'You need to accept the terms to proceed',
            'missing' => 'You need to accept the terms to proceed',
            'empty' => 'You need to accept the terms to proceed',
        ],
        'cardHolder' => [
            'name' => 'Card holder',
        ],
        'cardNumber' => [
            'name' => 'Card number',
        ],
        'expiryDate' => [
            'name' => 'Expiry date',
        ],
        'cvcNumber' => [
            'name' => 'CVC',
        ],
        'password' => [
            'name' => 'Password'
        ],
        'g-recaptcha-response' => [
            'name' => 'Google reCaptcha',
            'missing' => 'Didn\'t pass the "not-a-robot" test. Please try Google\'s reCaptcha again'
        ]
    ],
    'error' => [
        'occurred' => 'An error occurred',
        'missing' => 'Missing input field: ',
        'empty' => ' is required',
        'validation' => ' is not valid',
        'name' => 'unknown',
        'form' => [
            'login' => [
                'incorrect' => 'This user doesn\'t exist or the login is wrong',
                'disabled_user' => 'This user is no longer active'
            ],
            'unsubscribe' => [
                'incorrect' => 'This user doesn\'t exist or the e-mail is wrong',
                'disabled_user' => 'This user is no longer active',
                'cannot' => 'An error occurred. Please try again later.'
            ],
            'address_update' => [
                'disabled_user' => 'This user is no longer active',
                'email_exists' => 'This email address is already in use by someone else'
            ]
        ]
    ],
    'success' => [
        'form' => [
            'contact' => 'Thank you. The message has been sent to us\n'.'We will be in touch with you as soon as possible',
            'unsubscribe' => 'You are now unsubscribed from our service',
            'forgot_password' => 'An e-mail will be sent you on how to reset your password if the user exists.'
        ],
        'favorite' => [
            'added' => "Added successfully",
            'removed' => "Removed successfully",
        ],
        'votes' => [
            'added' => "Voted successfully",
            'removed' => "Removed vote successfully",
        ]
    ]
];

$__RB_LNG['validation']['from_firstname'] = ['name' => 'From ' . $__RB_LNG['validation']['firstname']['name'] ];
$__RB_LNG['validation']['from_lastname'] = ['name' => 'From ' . $__RB_LNG['validation']['lastname']['name'] ];
$__RB_LNG['validation']['from_address'] = ['name' => 'From ' . $__RB_LNG['validation']['address']['name'] ];
$__RB_LNG['validation']['from_city'] = ['name' => 'From ' . $__RB_LNG['validation']['city']['name'] ];
$__RB_LNG['validation']['from_zipcode'] = ['name' => 'From ' . $__RB_LNG['validation']['zipcode']['name'] ];
$__RB_LNG['validation']['from_state'] = ['name' => 'From ' . $__RB_LNG['validation']['state']['name'] ];
$__RB_LNG['validation']['from_country'] = ['name' => 'From ' . $__RB_LNG['validation']['country']['name'] ];
$__RB_LNG['validation']['from_email'] = ['name' => 'From ' . $__RB_LNG['validation']['email']['name'] ];
$__RB_LNG['validation']['from_phone'] = ['name' => 'From ' . $__RB_LNG['validation']['phone']['name'] ];

$__RB_LNG['validation']['to_firstname'] = ['name' => 'To ' . $__RB_LNG['validation']['firstname']['name'] ];
$__RB_LNG['validation']['to_lastname'] = ['name' => 'To ' . $__RB_LNG['validation']['lastname']['name'] ];
$__RB_LNG['validation']['to_address'] = ['name' => 'To ' . $__RB_LNG['validation']['address']['name'] ];
$__RB_LNG['validation']['to_city'] = ['name' => 'To ' . $__RB_LNG['validation']['city']['name'] ];
$__RB_LNG['validation']['to_zipcode'] = ['name' => 'To ' . $__RB_LNG['validation']['zipcode']['name'] ];
$__RB_LNG['validation']['to_state'] = ['name' => 'To ' . $__RB_LNG['validation']['state']['name'] ];
$__RB_LNG['validation']['to_country'] = ['name' => 'To ' . $__RB_LNG['validation']['country']['name'] ];
$__RB_LNG['validation']['to_email'] = ['name' => 'To ' . $__RB_LNG['validation']['email']['name'] ];
$__RB_LNG['validation']['to_phone'] = ['name' => 'To ' . $__RB_LNG['validation']['phone']['name'] ];

if (!empty($_SESSION) && !empty($_SESSION['lng']) && in_array($_SESSION['lng'], ['de', 'es', 'fr', 'it'])) {
    require_once __DIR__ .'/'. $_SESSION['lng'] .'.php';
}
