"attach_image": "Attach Image",
"enter_phone_number_here": "Enter phone number here",
"enter_your_message_here": "Enter your message here",
"choose_phone_number_to_send_message": "Choose a specific phone number to send the message",
"enter_session": "Enter Session",
"choose_session_to_send_messages_from": "Choose a specific session to send messages from",
"choose_group_as_sender": "Choose a group to be used as a sender",
"main_phone_only": "Main phone only",
"choose_phone_number": "Choose a phone number",
"choose_group": "Choose a group",
"enter_message_to_use": "Enter the message to be used",
"confirm_send_message": "Are you sure you want to send the message?",
"template_deleted_successfully": "Template has been successfully deleted.",
"error_deleting_template": "An error occurred while deleting the template. Please try again.",
"template_updated_successfully": "Template has been successfully updated.",
"error_editing_template": "An error occurred while editing the template. Please try again.",
"add_template": "Add Template",
"description": "Description",
"additions": "Additions",
"confirm_add_new_template": "Are you sure you want to add the new template?",
"please_fill_all_required_fields": "Please fill all required fields.",
"following_data_section_title": "Enter the following data",
"alerts_country_code_info": "Country code is used only to identify phone numbers within SAS customers data.",
"labels_save_by_group": "Save according to group",
"labels_country_code": "Country Code",
"placeholders_save_by_group": "Save according to group",
"placeholders_country_code": "Country Code",
"tables_sas_radius_list_found": "Client List | Found :count entries",
"tables_sas_link": "Sas Link",
"remaining_days": "Remaining Days",
"percentage_days_remaining": "Percentage of Days Remaining",
"the_better": "The Better",
"daily_points_consumption": "Daily Points Consumption",
"percentage_points_consumed_today": "Percentage of Points Consumed Today",
"the_lower_better": "The Lower, The Better",
"customers": "Customers",
"groups": "Groups",
"messages": "Messages",
"todays_messages": "Today's Messages",
"session_status": "Session Status",
"this_month_messages": "This Month's Messages",
"phones": "Phones",
"balance": "Balance",
"monthly": "Monthly",
"daily": "Daily"
}{
"sas_radius_pro_dashboard": "لوحة مراقبة Sas Radius Pro",
"logo": "شعار",
"user_profile": "ملف المستخدم",
"search_placeholder": "بحث...",
"traffic_report": "تقرير المرور",
"source": "المصدر:",
"wikipedia_com": "ويكيبيديا.كوم",
"jan": "يناير",
"feb": "فبراير",
"mar": "مارس",
"apr": "أبريل",
"may": "مايو",
"jun": "يونيو",
"jul": "يوليو",
"aug": "أغسطس",
"sep": "سبتمبر",
"oct": "أكتوبر",
"nov": "نوفمبر",
"dec": "ديسمبر",
"temperature_celsius": "درجة الحرارة (°م)",
"reggane": "رجانة",
"search": "بحث",
"home": "الرئيسية",
"messages": "الرسائل",
"client_list_found_count_entries": "قائمة العملاء | تم العثور على :count مدخلات",
"template_list_found_count_entries": "قائمة القوالب | تم العثور على :count مدخلات",
"message_settings": "إعدادات الرسائل",
"country_code": "كود الدولة",
"egypt": "مصر",
"libya": "ليبيا",
"iraq": "العراق",
"uae": "الإمارات",
"saudi_arabia": "السعودية",
"messaging_service": "خدمة الرسائل",
"additional_keys_you_can_use": "مفاتيح إضافية يمكنك استخدامها",
"profile": "البروفايل",
"expiration_date": "تاريخ الانتهاء",
"username": "اسم المستخدم",
"first_name": "الاسم الأول",
"usage_example": "مثال للاستخدام",
"hello": "مرحبا",
"the": "ال",
"monthly_package_activated": "تم تفعيل الباقة الشهرية وسوف تنتهي في",
"client_receive_like_this": "سوف يتلقى العميل ذلك بهذا الشكل",
"hello_yasser_package_activated": "مرحبا ياسر، تم تفعيل باقة 50 جيجابايت الشهرية وسوف تنتهي في",
"activation_message": "رسالة التفعيل",
"expiry_message": "رسالة انتهاء الصلاحية",
"about_to_expire_subscription": "اشتراك على وشك الانتهاء",
"upon_subscription_activation": "عند تفعيل الاشتراك",
"upon_package_renewal": "عند تجديد الباقة",
"upon_package_change": "عند تغيير الباقة",
"upon_client_deposit": "عند إيداع العميل",
"upon_withdrawal_from_client_balance": "عند السحب من رصيد العميل",
"upon_editing_client_data": "عند تعديل بيانات العميل",
"upon_adding_or_removing_consumption_capacities_gb_for_client": "عند إضافة أو إزالة سعات استهلاك (جيجابايت) للعميل",
"upon_client_deletion": "عند حذف العميل",
"upon_manager_login": "عند تسجيل دخول المدير",
"upon_manager_deposit": "عند إيداع المدير",
"upon_withdrawal_from_manager_balance": "عند السحب من رصيد المدير",
"aggressive_messaging": "الرسائل العنيفة",
"operation_number": "رقم العملية",
"account_symbol": "رمز الحساب",
"last_name": "الاسم الأخير",
"package": "باقة",
"balance": "الرصيد",
"return_to_menu": "العودة إلى القائمة",
"card_activation_confirmation_message": "رسالة تأكيد تفعيل البطاقة",
"insufficient_balance_for_package_activation_message": "رصيد غير كافٍ لتفعيل الباقة",
"package_activation_data_message": "رسالة بيانات تفعيل الباقة",
"package_activation_confirmation_message": "رسالة تأكيد تفعيل الباقة",
"enable_card_charging": "تمكين شحن البطاقة",
"menu_message": "رسالة القائمة",
"successful_card_activation_message": "رسالة تفعيل البطاقة الناجحة",
"card_entry_request_message": "رسالة طلب إدخال البطاقة",
"bot_preferences": "تفضيلات الروبوت",
"message_sent_successfully": "تم إرسال الرسالة بنجاح!",
"operations": "العمليات",
"add": "إضافة",
"view": "عرض",
"send_message": "إرسال رسالة",
"change_group": "تغيير المجموعة",
"reload": "إعادة تحميل",
"filter": "تصفية",
"template": "القالب",
"message": "الرسالة",
"creation_date": "تاريخ الإنشاء",
"name": "الاسم",
"group": "المجموعة",
"phone": "الهاتف",
"phones": "الهواتف",
"notes": "ملاحظات",
"delete": "حذف",
"delete_confirmation": "تأكيد الحذف",
"are_you_sure_you_want_to_delete_the_selected_groups": "هل أنت متأكد من حذف المجموعات المحددة؟",
"confirm": "موافق",
"cancel": "إلغاء",
"profile_data_sent_successfully": "تم إرسال بيانات الملف الشخصي بنجاح:",
"error_sending_profile_data": "خطأ في إرسال بيانات الملف الشخصي:",
"button_aview_not_found": "لم يتم العثور على الزر بمعرف "aview".",
"modal_element_not_provided": "لم يتم توفير عنصر المودال.",
"delete_confirmation_modal_not_found": "لم يتم العثور على العنصر بمعرف "deleteConfirmationModal".",
"confirm_delete_not_found": "لم يتم العثور على العنصر بمعرف "confirmDelete".",
"delete_button_not_found": "لم يتم العثور على العنصر بمعرف "deletebtn".",
"select_all_checkbox_not_found": "لم يتم العثور على العنصر بمعرف "selectAllcheckbox".",
"no_checkboxes_found": "لم يتم العثور على مربعات اختيار.",
"please_select_at_least_one_client_to_delete": "الرجاء تحديد عميل واحد على الأقل للحذف.",
"selected_clients_deleted": "تم حذف العملاء المحددين بنجاح.",
"error_deleting_clients": "خطأ في حذف العملاء: ",
"error_deleting_clients_generic": "حدث خطأ أثناء حذف العملاء.",
"no_group": "لا توجد مجموعة",
"default_selected": "تم تحديد الافتراضي",
"unexpected_value_setting_default": "قيمة غير متوقعة، سيتم التعيين على الافتراضي",
"enable_account_balance_display": "تمكين عرض رصيد الحساب",
"card_charging": "شحن البطاقة",
"operation_confirmation": "تأكيد العملية",
"settings_saved_successfully": "تم حفظ الإعدادات بنجاح!",
"an_error_occurred": "حدث خطأ:",
"unexpected_error_occurred": "حدث خطأ غير متوقع.",
"operation_data_sent_successfully": "تم إرسال بيانات العملية بنجاح:",
"error_sending_operation_data": "خطأ في إرسال بيانات العملية:",
"name_input_not_in_focus": "حقل الاسم ليس في التركيز.",
"submitting_data": "جارٍ إرسال البيانات:",
"general": "عام",
"attach_image": "إرفاق صورة",
"enter_phone_number_here": "أدخل رقم الهاتف هنا",
"enter_your_message_here": "أدخل رسالتك هنا",
"choose_phone_number_to_send_message": "اختر رقم هاتف محدد لإرسال الرسالة",
"enter_session": "أدخل الجلسة",
"choose_session_to_send_messages_from": "اختر جلسة محددة لإرسال الرسائل منها",
"choose_group_as_sender": "اختر مجموعة لاستخدامها كمرسل",
"main_phone_only": "الهاتف الرئيسي فقط",
"choose_phone_number": "اختر رقم هاتف",
"choose_group": "اختر مجموعة",
"enter_message_to_use": "أدخل الرسالة التي سيتم استخدامها",
"confirm_send_message": "هل أنت متأكد من أنك تريد إرسال الرسالة؟",
"template_deleted_successfully": "تم حذف القالب بنجاح.",
"error_deleting_template": "حدث خطأ أثناء حذف القالب. يرجى المحاولة مرة أخرى.",
"template_updated_successfully": "تم تعديل القالب بنجاح.",
"error_editing_template": "حدث خطأ أثناء تعديل القالب. يرجى المحاولة مرة أخرى.",
"add_template": "إضافة قالب",
"description": "الوصف",
"additions": "إضافات",
"confirm_add_new_template": "هل أنت متأكد من إضافة القالب الجديد؟",
"please_fill_all_required_fields": "يرجى ملء جميع الحقول المطلوبة.",
"following_data_section_title": "إدخال البيانات التالية",
"alerts_country_code_info": "كود الدولة يُستخدم فقط لتحديد أرقام الهواتف ضمن بيانات عملاء SAS.",
"labels_save_by_group": "حفظ حسب المجموعة",
"labels_country_code": "كود الدولة",
"placeholders_save_by_group": "احفظ حسب المجموعة",
"placeholders_country_code": "كود الدولة",
"tables_sas_radius_list_found": "قائمة Sas Radius | تم العثور على :count مدخلات",
"tables_sas_link": "رابط Sas",
"remaining_days": "الايام المتبقية",
"percentage_days_remaining": "نسبة ما تبقى من ايام",
"the_better": "اكثر افضل",
"daily_points_consumption": "استهلاك النقاط اليومى",
"percentage_points_consumed_today": "نسبة ما تم استهلاكه من نقاط اليوم",
"the_lower_better": "اقل افضل",
"customers": "العملاء",
"groups": "المجموعات",
"todays_messages": "رسائل اليوم",
"session_status": "حالة الجلسة",
"this_month_messages": "رسائل الشهر الحالى",
"monthly": "شهري",
"daily": "يومي"
} the english is the english[en.json] the ar.json is the en to ar
To effectively manage translations in your Laravel application, it's essential to ensure consistency between the translation keys used in your Blade templates and those defined in your en.json and ar.json files. Based on your provided HTML template and existing translation files, it appears you're using both identifier-like keys and actual English phrases as keys. To streamline the translation process and avoid conflicts, it's recommended to adopt one consistent approach.
Recommendation: Use Actual Phrases as Keys in JSON Files
Given that your Blade templates use actual English phrases as keys (e.g., __('Home'), __('Delete')), it's best to align your en.json and ar.json files accordingly. This approach simplifies the translation process, especially when dealing with dynamic content.
Updated en.json
Here's the updated en.json file incorporating all the translation keys used in your HTML template. This ensures that every __('...') call in your Blade templates has a corresponding entry in the en.json file.
json
{
"Sas Radius Pro Dashboard": "Sas Radius Pro Dashboard",
"Logo": "Logo",
"User Profile": "User Profile",
"Search...": "Search...",
"Home": "Home",
"Messages": "Messages",
"Message List | Found :count entries": "Message List | Found :count entries",
"Add": "Add",
"Delete": "Delete",
"Delete Confirmation": "Delete Confirmation",
"Change Name": "Change Name",
"Message": "Message",
"From": "From",
"To": "To",
"Creation Date": "Creation Date",
"Groups": "Groups",
"Choose Group": "Choose Group",
"All Clients": "All Clients",
"Are you sure you want to delete these messages?": "Are you sure you want to delete these messages?",
"Confirm": "Confirm",
"Cancel": "Cancel",
"Please select at least one client to delete.": "Please select at least one client to delete.",
"Selected clients have been successfully deleted.": "Selected clients have been successfully deleted.",
"An error occurred while deleting clients. Please try again.": "An error occurred while deleting clients. Please try again.",
"An unexpected error occurred. Please try again.": "An unexpected error occurred. Please try again."
}
Updated ar.json
Below is the ar.json file with Arabic translations corresponding to the keys defined in en.json. Ensure that the Arabic translations accurately reflect the intended meaning.
json
{
"Sas Radius Pro Dashboard": "لوحة مراقبة Sas Radius Pro",
"Logo": "شعار",
"User Profile": "ملف المستخدم",
"Search...": "بحث...",
"Home": "الرئيسية",
"Messages": "الرسائل",
"Message List | Found :count entries": "قائمة الرسائل | تم العثور على :count مدخلات",
"Add": "إضافة",
"Delete": "حذف",
"Delete Confirmation": "تأكيد الحذف",
"Change Name": "تغيير الاسم",
"Message": "الرسالة",
"From": "من",
"To": "إلى",
"Creation Date": "تاريخ الإنشاء",
"Groups": "المجموعات",
"Choose Group": "اختر المجموعة",
"All Clients": "جميع العملاء",
"Are you sure you want to delete these messages?": "هل أنت متأكد من رغبتك في حذف هذه الرسائل؟",
"Confirm": "تأكيد",
"Cancel": "إلغاء",
"Please select at least one client to delete.": "الرجاء تحديد عميل واحد على الأقل للحذف.",
"Selected clients have been successfully deleted.": "تم حذف العملاء المحددين بنجاح.",
"An error occurred while deleting clients. Please try again.": "حدث خطأ أثناء حذف العملاء. يرجى المحاولة مرة أخرى.",
"An unexpected error occurred. Please try again.": "حدث خطأ غير متوقع. يرجى المحاولة مرة أخرى."
}
Steps to Implement the Translations
Update JSON Files:
Replace your existing en.json and ar.json files with the updated versions provided above. Ensure that these files are located in the resources/lang/ directory of your Laravel project.
Adjust Blade Templates (If Necessary):
Ensure that all __('...') calls in your Blade templates use the exact phrases as keys. For example:
This alignment guarantees that Laravel can correctly fetch the corresponding translations from the JSON files.
Clear Cache (Optional but Recommended):
After updating translation files, it's good practice to clear Laravel's cache to ensure that the changes take effect immediately. Run the following Artisan commands:
Switch your application's locale to Arabic (ar) and verify that all translations appear correctly in the user interface.
Similarly, ensure that the default English locale (en) displays the intended text.
Consistent Translation Keys: Best Practices
Use Descriptive Keys:
While using actual phrases as keys is straightforward, especially for small projects, consider using descriptive identifier-like keys for larger projects to avoid duplication and simplify maintenance. For example:
Using descriptive keys helps prevent duplication of phrases that might appear multiple times across different parts of the application.
Easier Maintenance:
When keys are descriptive, translators and developers can easily understand the context of each phrase, leading to more accurate translations.
Conclusion
By aligning your Blade templates with your translation JSON files using actual phrases as keys, you ensure a smooth and error-free localization process. For larger projects or enhanced maintainability, consider adopting descriptive identifier-like keys. Whichever approach you choose, consistency is key to effective translation management in your Laravel application.