How do I set the dateformat correctly to another language? Do I do this on the SQL server, through LCID in the config or somewhere?
Have a look at Control Panel > Site Administration > Site Configuration > Setup. under Basic Site Configuration, there should be a section with DateTime Settings, you should be able to use that to change the format.
Community Server Documentation please rate articles you read
Nintendo Wiikly | My Blog
Yeah I had already noticed how to do that, but it doesn't change the actual language of the date formatting. Its still says "Tuesday" instead of the actual translation.
nickeales:Its still says "Tuesday" instead of the actual translation.
I've logged this feature request as #786. Updates will be posted to this thread.
If CS can't localize it globally yet, you might be able to do it yourself by creating a DataControl that extends the relevant data control (e.g. ThreadData, PostData) and overriding the GetPropertyValue method.
protected override object GetPropertyValue(string property) { if (!string.IsNullOrEmpty(property) && this.DataSource != null) { Thread thread = this.DataSource as Thread; switch (property.ToLower()) { //Curse.com Date Ago Specific Format case "localdate": return MyCustomeDateFormat.FormatAgoDate(thread.ThreadDate); } } return base.GetPropertyValue(property); }
If you need to localize it to more than one format, you could get the language of the thread (e.g. thread.Section.DefaultLanguage) or the user (CSContext.Current.User.Profile.Language) and format it yourself to the appropriate language.
http://www.curse.com
Copyright© 2008 Telligent Systems Inc. All rights reserved CommunityServer.com • Telligent.com