Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

german localisation #199

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/Http/Middleware/Translation.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public function handle($request, Closure $next)
{
if (auth()->user()) {
$language = auth()->user()->language;
if (!in_array($language, ["en", "dk", "es"])) {
if (!in_array(strtolower($language), ["en", "de", "dk", "es"])) {
$language = "en";
}
app()->setLocale($language);
Expand Down
512 changes: 512 additions & 0 deletions resources/lang/de.json

Large diffs are not rendered by default.

19 changes: 19 additions & 0 deletions resources/lang/de/auth.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php

return [

/*
|--------------------------------------------------------------------------
| Authentication Language Lines
|--------------------------------------------------------------------------
|
| The following language lines are used during authentication for various
| messages that we need to display to the user. You are free to modify
| these language lines according to your application's requirements.
|
*/

'failed' => 'Die Zugangsdaten konnten nicht gefunden werden.',
'throttle' => 'Zu viele Einloggversuche. Probieren Sie es bitte in :seconds Sekunden noch mal.',

];
15 changes: 15 additions & 0 deletions resources/lang/de/pagination.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Pagination Language Lines
|--------------------------------------------------------------------------
|
| The following language lines are used by the paginator library to build
| the simple pagination links. You are free to change them to anything
| you want to customize your views to better match your application.
|
*/
'previous' => '&laquo; Weiter',
'next' => 'Zurück &raquo;',
];
5 changes: 4 additions & 1 deletion resources/lang/dk.json
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@
"For which user are you registering absence?": "For hvilken bruger registrerer du fravær?",
"France": "Frankrig",
"Full address": "Komplete adresse",
"German": "Tysk",
"Germany": "Tyskland",
"Go to client": "Gå til klient",
"Go to user": "Gå til bruger",
Expand Down Expand Up @@ -318,6 +319,7 @@
"Register absence": "Registrere fravær",
"Register payment": "Registrer betaling",
"Register time": "Registrer tid",
"Role & Permissions Management": "Rolle & Tilladelsesstyring",
"Role &amp; Permissions Management": "Rolle & Tilladelsesstyring",
"Role Management": "Rollestyring Tilladelsesstyring",
"Role created": "Rolle oprettede",
Expand Down Expand Up @@ -346,10 +348,11 @@
"Size": "Størrelse",
"Something wen't wrong, we can't find the file on the cloud. But worry not, we delete what we know about the image": "Noget gik galt, vi kunne ikke finde billedet i skyen, men vi har slettede den informationen, vi har om billedet",
"Source": "Kilde",
"Spanish": "Spansk",
"Spain": "Spanien",
"Start": "Start",
"Start of business": "Virksomhedens åbningstid",
"Status": "Status",
"Spanish": "Spansk",
"Sub Total": "Pris ex moms",
"Subject": "Emne",
"Subtotal": "Pris ex moms",
Expand Down
4 changes: 3 additions & 1 deletion resources/lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@
"For which user are you registering absence?": "For which user are you registering absence?",
"France": "France",
"Full address": "Full address",
"German": "German",
"Germany": "Germany",
"Go to client": "Go to client",
"Go to user": "Go to user",
Expand Down Expand Up @@ -346,10 +347,11 @@
"Size": "Size",
"Something wen't wrong, we can't find the file on the cloud. But worry not, we delete what we know about the image": "Something wen't wrong, we can't find the file on the cloud. But worry not, we delete what we know about the image",
"Source": "Source",
"Spanish": "Spanish",
"Spain": "Spain",
"Start": "Start",
"Start of business": "Start of business",
"Status": "Status",
"Spanish": "Spanish",
"Sub Total": "Sub Total",
"Subject": "Subject",
"Subtotal": "Subtotal",
Expand Down
5 changes: 4 additions & 1 deletion resources/lang/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@
"For which user are you registering absence?": "¿Para qué usuario registras la ausencia?",
"France": "Francia",
"Full address": "Dirección Completa",
"German": "Alemán",
"Germany": "Alemania",
"Go to client": "Ir al cliente",
"Go to user": "Ir al usuario",
Expand Down Expand Up @@ -318,6 +319,7 @@
"Register absence": "Registrar ausencia",
"Register payment": "Registrar pago",
"Register time": "Registrar tiempo",
"Role & Permissions Management": "Gestión de roles y permisos",
"Role &amp; Permissions Management": "Gestión de roles y permisos",
"Role Management": "Gestión de Roles",
"Role created": "Rol creado",
Expand Down Expand Up @@ -346,10 +348,11 @@
"Size": "Tamaño",
"Something wen't wrong, we can't find the file on the cloud. But worry not, we delete what we know about the image": "Algo salió mal, no pudimos encontrar la imagen en la nube, pero hemos eliminado la información que tenemos sobre la imagen",
"Source": "Fuente",
"Spanish": "Español",
"Spain": "España",
"Start": "Inicio",
"Start of business": "Inicio de la actividad",
"Status": "Estado",
"Spanish": "Español",
"Sub Total": "Subtotal",
"Subject": "Asunto",
"Subtotal": "Subtotal",
Expand Down
8 changes: 5 additions & 3 deletions resources/views/clients/create.blade.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
@extends('layouts.master')
@section('heading')
{{ __('Create New Client') }}
@stop
@section('content')
@push('scripts')
<script>
Expand Down Expand Up @@ -62,20 +65,19 @@ function getCookie(key) {
<?php
$data = Session::get('data');
?>
<h1>Create Client</h1>
<hr>
{!! Form::open([
'url' => '/clients/create/cvrapi'

]) !!}
<div class="col-sm-3">
<p style="font-size:1.2em; font-weight:300;">VAT</p>
<p style="font-size:1.2em; font-weight:300;">{!! __('Vat') !!}</p>
</div>
<div class="col-sm-9">
<div class="form-group">
<div class="input-group">

{!! Form::text('vat', null, ['class' => 'form-control', 'placeholder' => 'Insert company VAT']) !!}
{!! Form::text('vat', null, ['class' => 'form-control', 'placeholder' => __('Insert Company Vat')]) !!}
<div class="popoverOption input-group-addon"
rel="popover"
data-placement="left"
Expand Down
7 changes: 4 additions & 3 deletions resources/views/settings/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,10 @@
<p class="small">@lang('This is the default language for new users, the language can be changed for each user under their profile')</p>
<br>
<select class="form-control" name="language">
<option value="EN">@lang("English")</option>
<option value="DK" {{$settings->language == "DK" ? "selected" : ""}}>@lang("Danish")</option>
<option value="ES" {{$settings->language == "ES" ? "selected" : ""}}>@lang("Spanish")</option>
<option value="en" {{strtolower($settings->language) == "en" ? "selected" : ""}}>@lang("English")</option>
<option value="de" {{strtolower($settings->language) == "de" ? "selected" : ""}}>@lang("German")</option>
<option value="dk" {{strtolower($settings->language) == "dk" ? "selected" : ""}}>@lang("Danish")</option>
<option value="es" {{strtolower($settings->language) == "es" ? "selected" : ""}}>@lang("Spanish")</option>
</select>
</div>
</div>
Expand Down
4 changes: 4 additions & 0 deletions resources/views/users/form.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,13 @@
<div class="col-sm-9">
<div class="form-group col-sm-8">
<label for="language" class="control-label thin-weight">@lang('Language')</label> <br>

<label class="radio-inline">
<input value="dk" type="radio" name="language" {{isset($user) && strtolower($user->language) == "dk" ? 'checked': ''}}>@lang('Danish')
</label>
<label class="radio-inline">
<input value="de" type="radio" name="language" {{isset($user) && strtolower($user->language) == "de" ? 'checked': ''}}>@lang('German')
</label>
<label class="radio-inline">
<input value="en" type="radio" name="language" {{isset($user) && strtolower($user->language) == "en" ? 'checked': ''}}>@lang('English')
</label>
Expand Down