Jan 10 at 11:39 AM
Edited Jan 10 at 11:40 AM
|
Hi
How can I change Orchard default culture, even before Setup getting done? I put all translated .po files in their directories, but where I should config Orchard to use these translation (NOT from dashboard)?
I want Orchard be in my culture's language by default at startup, not in English.
thanks in advance
|
|
Coordinator
Jan 10 at 4:40 PM
|
Currently, I don't think you can. It would require changes in setup.
|
|
|
|
Hi again,
I have modified SetupService.cs in Orchard.Setup module:
// set site name and settings
var siteService = environment.Resolve<ISiteService>();
var siteSettings = siteService.GetSiteSettings().As<SiteSettingsPart>();
siteSettings.Record.SiteSalt = Guid.NewGuid().ToString("N");
siteSettings.Record.SiteName = context.SiteName;
siteSettings.Record.SuperUser = context.AdminUsername;
//siteSettings.Record.SiteCulture = "en-US";
siteSettings.Record.SiteCulture = "fa-IR";
// add default culture
var cultureManager = environment.Resolve<ICultureManager>();
cultureManager.AddCulture("fa-IR");
//cultureManager.AddCulture("en-US");
but it seems nothing changed and still all pages are in english.
I have installed this translation:
http://orchardproject.net/localize/fa-IR before runing setup. If it's require to modify any other source code, please guid me.
Thanks
|
|
Jan 11 at 8:36 AM
Edited Jan 11 at 8:37 AM
|
Seems that Orchard alway starts it fly from the en-US ground :)
I agree with you this should be adaptable on setup..... if you fill a an issue, I will vote for it.
|
|
Coordinator
Jan 11 at 4:05 PM
|
Yes, that won't be enough, you also need an implementation of ICultureSelector that would need to kick in during setup.
|
|