Translations 'IN' the Theme Folder?
Hello,
I'm well aware of how to create a locale.php file in "/conf/" but can it be done in the Theme folder?
I am creating a theme and there are a few things I want translated differently than the default sayings.
I want to package the theme with these translations.
Any suggestions or should I simply attach my locale.php modifications for that person to upload themselves?
Would prefer the "less steps" action, but understand if it's the only possibility. Thanks in advance!
Best Answers
-
peregrine MVP
yes. just put a locale folder in your theme.
probably the easiest thing to do, would be read the documentation for the steps....
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
6 -
peregrine MVP
see precedence here:
http://vanillaforums.org/discussion/comment/191468/#Comment_191468
see mobile specific here and more explanation of locale and theme specific here...
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
6
Answers
yes. just put a locale folder in your theme.
probably the easiest thing to do, would be read the documentation for the steps....
http://vanillaforums.org/docs/localization
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
see precedence here:
http://vanillaforums.org/discussion/comment/191468/#Comment_191468
see mobile specific here and more explanation of locale and theme specific here...
http://vanillaforums.org/discussion/25641/how-to-tutorial-theme-specific-definitions-mobile-vs-non-mobile
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
Hi Peregrine,
Thanks for this. Not sure how I missed that!
Hello,
Alright, I'm a little lost here so maybe I could get some clarification.
In the documentation it states create a new folder (in my theme) called "locales" - done.
I've added in the LocaleKey details as described in the documentation - done.
Keeping things simple, I named it "en-CA". I've created a file, "en-CA.php" - done.
It states then go to the Dashboard > Locales and I should be able to enable it then.
I'm unable to see this here. Obviously I'm missing something super simple but what?
Sorry for my ignorance here but I've tried all the suggestions to make this work.
Any advice or what step I could be overlooking or not doing correctly?
$Configuration['Garden']['Locale'] = 'en-CA';
if your locale is en-CA it is your default locale.
you will find the en-Ca locale in applications/vanilla/locale
it is already enabled, vanilla comes with en-Ca locale.
when changing locales you must delete the locale_map.ini from the /cache folder
as I pointed out in the links the precedence is as so...
if you have a definition in themes e.g. /themes/YOURTHEMENAME/locale/en-US.php, it will be overridden by any of these files if the same definition occurs.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
you can have multiple locales enabled..
e.g.
but the default locale you have chosen in dashboard is reflected in config.php e.g.
$Configuration['Garden']['Locale'] = 'en-CA';
is the one that is used.
you could re-read this and see if it helps...
http://vanillaforums.org/discussion/25641/how-to-tutorial-theme-specific-definitions-mobile-vs-non-mobile
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.