BookStack/resources/views/pages/parts/editor-translations.blade.php
Dan Brown ef211a76ae
Made WYSIWYG editor translatable
- Created new translation file for editor view.
- Added simple logic to format for tinymce.
- Aligned some of the custom labels we were using.
2022-02-06 21:17:08 +00:00

11 lines
291 B
PHP

@php
$en = trans('editor', [], 'en');
$lang = trans('editor');
$mergedText = [];
foreach ($en as $key => $value) {
$mergedText[$value] = $lang[$key] ?? $value;
}
@endphp
<script nonce="{{ $cspNonce }}">
window.editor_translations = @json($mergedText);
</script>