@extends('layouts.main') @section('title') {{ __("Translate States") }} @endsection @section('page-title')

@yield('title')

@endsection @section('content')
@csrf @method('PUT')

{{ __('Translate State Names') }}

@if($countries->isNotEmpty())
@foreach($countries as $index => $country)
{{ __('States in') }} {{ $country->name }}
@php $countryStates = $States->where('country_id', $country->id); @endphp @if($languages->isNotEmpty())
@foreach($languages as $langIndex => $language)
{{ __('Language') }}: {{ $language->name }}
@foreach($countryStates as $state) @php $existingTranslation = $state->translations->firstWhere('language_id', $language->id); @endphp
@endforeach
@endforeach
@endif
@endforeach
@else

{{ __("No countries found.") }}

@endif
@endsection