Posted by: elxr - Monday, 28 November 2011 11:40:28
Hi,
I tried to integrate YAF.NET in my web site and stumbled on its localization. Here are the details:
I need a forum on Serbian language - while there is no this language in YAF list, I need to create it. As far as I realized, I need to copy one existing language XML file, change its name and parameters in Resources tag, and that's it - I would have it in the list and I could start manual translation. But, it failed - I got no updates in the list.
The problem lies in this:
[code=xml][/code]
"SR" value is not recognized. I just don't know what to put here to get Serbian language in the list.
I tried to do the same with a few languages that were out of the list: Croatian (HR), Slovenian (SL), Bulgarian (BG), and it was ok - I got these languages.
Any help appreciated.
Posted by: elxr - Monday, 28 November 2011 12:38:11
An addition: if YAF.NET uses Culture codes of CultureInfo class, there is no two letter codes for serbian language (as for the rest of languages). There are only: "sr-SP-Cyrl" and "sr-SP-Latn", or "sr-Latn-CS", without a separate value "sr".
I also tried "sr-SP", "sr-SP-Latn", "sr-Latn" and other variations, but with no luck.
Posted by: tha_watcha - Monday, 28 November 2011 12:48:17
[quote]An addition: if YAF.NET uses Culture codes of CultureInfo class, there is no two letter codes for serbian language (as for the rest of languages). There are only: "sr-SP-Cyrl" and "sr-SP-Latn"[/quote]
Thats the Problem YAF has a check that only allows lanuages with xx-xx language codes but not xx-xx-xx. I Removed that check in changeset 1a8af763f9c0 then it should work with "sr"
Posted by: bbobb - Monday, 28 November 2011 13:21:28
Language codes are stored in db as a 5 char string anyway. it should be changed to varchar(10).
And the changes are complex because they will be in many places.
Posted by: elxr - Monday, 28 November 2011 15:57:21
Thanks for both answers. I really appreciate your efforts.
If I understood correctly, without some bigger changes there is no chance that this language shows in the system.
Could I expect these changes in some next major release of YAF.NET or I should just forget it and release forum with Serbian language under some other language name.
Regards
Posted by: tha_watcha - Monday, 28 November 2011 16:45:09
[quote=elxr;52045]Thanks for both answers. I really appreciate your efforts.
If I understood correctly, without some bigger changes there is no chance that this language shows in the system.
Could I expect these changes in some next major release of YAF.NET or I should just forget it and release forum with Serbian language under some other language name.
Regards[/quote]
Yes if it works correctly its included in the next release.
Posted by: bbobb - Monday, 28 November 2011 21:17:07
FILE:
mssql/tables.sql
ERROR:
The object 'DF__yaf_User__Cultur__300424B4' is dependent on column 'Culture'.
ALTER TABLE ALTER COLUMN Culture failed because one or more objects access this column.
STATEMENT:
-- Add 8-letter Language Code column
if exists (select top 1 1 from syscolumns where id=object_id('[dbo].[yaf_User]') and name='Culture' and prec=5)
begin
alter table [dbo].[yaf_User] alter column [Culture] nvarchar(10) NULL
end