0
如何翻譯我的base.html.php
佈局?語言環境app/Resource/view/base.html.php Symfony2
<!-- app/Resources/views/base.html.php -->
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Title</title>
</head>
<body>
<?php echo $view['translator']->trans('Bye'); ?>
<div id="content">
<?php $view['slots']->output('body') ?>
</div>
</body>
</html>
<!-- app/Resources/translations/messages.de.xliff -->
<?xml version="1.0"?>
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
<file source-language="en" datatype="plaintext" original="file.ext">
<body>
<trans-unit id="1">
<source>Bye</source>
<target>Auf Wiedersehen.</target>
</trans-unit>
</body>
</file>
</xliff>
我也有我的包src/../Bundle/../translation/messages.de.xliff
。這工作正常。它始於id="1"
。
那麼我怎樣才能讓翻譯在base.html.php中工作呢?
是否有可能在html中更改不同地區的圖片?
是的,你是正確的電子郵件。挺容易。但我的第一個問題沒有解決。任何想法? – craphunter
對不起,你是對的。 Symfony只是沒有清除緩存以及它應該是。再次感謝! – craphunter