I have following files structure now for email templates: ~/resources/views/emails/$template.blade.php
I would like to implement following structure with fallback to default locale:
~/resources/views/emails/$locale/$template.blade.php
It is very common issue, but unfortunately i can't find ready solutions. What is best way to implement this? Or perhaps there are some existing solutions you could advise?
I don't really see any problem here. You can check if your localized email exists with View::exists('emails/'. $locale .'/'. $template) and if it doesn't exist load the $fallback_locale one.
Related
You would have thought this would have been a fairly straightforward task, however, I can't for the life of me, find where it is originally set. I'd like to make a few other changes once I know which file to look for. any help much appreciated.
Hi please check if you have any party extension installed.
If not then please check the below steps
You need to create one folder in your theme name i18n and create file en_US.csv en_US is the language code it depends on your language code.
you need to change the value from Zip/Postcode to Postcode/Zip .
The second method is to enable translate inline and change the word that you want to change.
https://docs.magento.com/m2/ee/user_guide/system/translate-inline.html
I could not find a good example showing the correct or effective way to store the locators for easy organization/modification. Can someone point me to one?
Preferably a config file or another .js file.
Again an example will greatly help.
Thanks!
The "best practice" is to put your locators in a page object.
example: https://github.com/angular/protractor/tree/master/website/test/e2e
Docs: http://angular.github.io/protractor/#/page-objects
I'll second the use of page objects and have some additional examples on GitHub...
I am writing a ZF Application that generates emails as certain actions occur, e.g. when a user signs up. My default mail settings are set in a Mail Resource plugin.
My question is, what's the best approach to managing the email templates? They could be text files, .ini, or in the code itself.
It seems to me that text files would be the easiest, but I'm always cautious about introducing another kind of file type that needs to be managed. Has anyone tried using .ini? How does this work?
You can store your email template in following directory
Create an view script like : /views/emails/template.phtml
<body>
<?php echo $this->var1; ?>
<h1>Welcome</h1>
<?php echo $this->var2; ?>
</body>
Please see this is already post on stackoverflow this might be helpfull for you How can I make email template in Zend Framework? and another solution also posted What is the best way to use Email Template in Zend/PHP
I would say - definitively not in the code! It will just make your code mixed up with representation, which you want to show to the user. Plus if your site is multi-language - it will make you to have even bigger mess... Good idea would be to use some kind of template engine. As example: How can I make email template in Zend Framework?
I've got a random workflow in my sharepoint application that allows employees to make a request for some holiday period! So some emails have to be send around.
I'd like tu customize this email-notifications in the following way:
language (default is 'en', and I'd
like to cange if possible)
structure
thanks a lot!
george
I still got no idea how you can customize an email-notification...perhaps you could look for it's tamplate and "customize" it there, but this would change it for all notificaitons...so that's not a real solution!
anyway, I've found a quite good way to change the language. Well, email notifications always take the "default language" (which you can find in Site Actions/Site Settings/Site Administration/Language Settings) from the actual Site/SiteCollection/...regarding to this problem you should check my answer to this question link
So, now you can change a Site's default language to a new one(of course only if you got the right [Language ID]and the language pack(s) installed)...do some stuff like sending notification mails in favored language(s) (for example within a workflow like the one I've described above).
When your work(act. the workflow's work) is done you can set back the Site's language to the original one and you're done!
I want to use my own template in Joomla 1.5.
But I don't know how I can do it.
Thanks in advance.
You can learn from here
http://www.phpeveryday.com/pack/Joomla-Template-Step-By-Step-Tutorial
The simplest way i think is to the templates subdirectory in Joomla!, duplicate one of the existing template subdirectories and give it a name my_template and then modify that. In the Joomla! admin you can select the new template and it will be applied.
If it all goes horribly wrong you can simply delete the directory and you will not have done any damage to the rest of the site.
One the Joomla! site there are a number of tutorials on how to do it you can work along with