I'm new in Symfony 2 and I'm trying to translate multiple strings like menus and another static content and Symfony suggest to use Xliff. I want that the web admin can add or delete languages in the backend instead of edit the code. I know how can I do that, but I'm looking for a bundle that allows manage language like I want.
There is any bundle that allows manage language from the backend and add the translations for that elements that you use on the frontend dynamically?
Thank you in advance!
Take a look at LexikTranslationBundle.
Related
I have an application build with Symfony 3.3 and Twig that will be distributed to more customers. I'm using parameters.yml to customize its behavior and it seems to work well.
Where I have an issue is with twig templates: although the customers will use most of the templates as they are, they'll need to customize some parts like CSS styles, general layout and do occasional design overrides.
The options I have identified are:
Have a full set of templates for each customer. The issue is that the upgrades will be a nightmare as we have to patch each template and account for differences
Customize templates via YML files. The problem is that it gets too complicated soon and the number of parameters is potentially huge
Deliver a set of templates in app/Resources/views and allow the customer to override any of the templates by creating another file with the same name in another folder
Deliver a set of templates in AppBundle/Resources/views and let customers override them in app/Resources/views
Create the application as a Symfony bundle (ie. MyAppBundle) and deploy the application to each customer by including the MyAppBundle via composer. I like this solution a lot, but I do not know whether it is possible to implement is easily.
Do you have any suggestion on how to approach this problem?
I think the best way in your case is to think about the main parts and the customer parts and then build blocks and overwrite all parts that are relevant for the customer for example the CSS or anything else. If you know that there are special part you can build macros for example.
With the Block concept you can predefine the template but the customer has the ability to overwrite that part you've defined with it's own.
With Twig you have a lot of possibilities to solve such a problem.
Drupal 8 use that Theming concept.
https://www.chapterthree.com/blog/twig-concepts-drupal-8-themes-part-ii
Perhaps you can take a look how they have solved that and you can find a good solution for your problem.
I'm developing a system where a Phalcon server is responsible for a site frontend while a Symfony2 server is responsible for the content management. The content manager contains an WYSIWYG editor and thus displays the content using the same layout and style as the frontend. I realize Volt and Twig and very similar, but some things like includes and blocks have specific syntax or limitations. We can create our templates/themes in a way that is completely compatible, but that would not be very flexible.
Is there a way to use Volt templates in Symfony2? Or a practical way to convert templates automatically (by hand is not an option here)?
I think in your specific use case the most practical would be to use Twig with Phalcon. In your DI you can load a different engine for that, see the Phalcon Incubator project for the Twig-adapter.
In short it comes down to using (after adding the Incubator to your project, for instance with Composer):
$view->registerEngines(
array(".twig" => 'Phalcon\Mvc\View\Engine\Twig')
);
instead of
$view->registerEngines(array(
".volt" => 'Phalcon\Mvc\View\Engine\Volt'
));
The link describes a more complete step-by-step guide.
We need to customize for example the standard mail invitation template by changing the text a bit. I know this can be done by editing the freemarker template for the invitation that is stored in the data dictionary. This is however not optimal when it comes to application packaging. Is it somehow possible to extend the templates in the manner that they could be put on the extension classpath like the regular extension mechanism?
edit:
Found out that the inviation template for emails are hardcoded in the InviteSender java-class. :(
So I guess we will have to extend that class (and a lot of others) to do this.
Another solution I can think of would be to write a patch that replaces the ftl-files in the data dictionary with our edited ones at install time. Any other ideas?
It has been done and has been written in this blog.
In short No there is no out of the box solution for it.
Yes you could bootstrap your files and Patch Alfresco's (that's the most common used way).
You should also consider the fact that changing a template without to have access to the server where Alfresco is installed is a nice feature. With this functional guys who manage/operate/use Alfresco can change templates to their needs.
i would like to know how to override/disable an admin node and implement a custom one.
What i want to do is to make a custom node/add/page with different layout and tools and css in order to allow not so technical users to create content with custom layout an content using some sort of drag and drop interface.
This interface is already working, all i need is to know how to convert it into the new node/add/page.
Thanks in advance and forgive may bad english.
If you already have this working you can override the node/add/page path by providing an alias to your custom path. Simply visit admin/config/search/path/add.
I have an asp.net application which is purely build using C#, CSS, Javascript. Now i need to integrate my application with joomla cms.
**Is it possible to integrate an Asp.Net website with Joomla CMS**
Any help would be deeply appreciated.
Yes it is possible, and depending on what you are trying to "integrate" it might be fairly easy to do. First, you will need to get ChronoForms and ChronoConnectivity. Without having any more details here is what you would need to do -
Put the Joomla DB in the same database. By default Joomla uses the prefix jos_ for its database tables so this should not pose any issues. This will make it easy to access the tables of your application within Joomla.
Next you will need to create a form that has a field for each corresponding field in the table you want to edit. You will need one form for each table.
Using ChronoConnectivity you then associate the form with the table in the database.
This is pretty basic but it will give you the ability to edit any table in the same database that Joomla is installed in. You may have to get a little trickier to make it work well, but you can insert additional code in both ChoronForms and ChronoConnectivity as needed.
That would probably be the fastest and easiest way to do a simple integration.