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