YAFLogo

elxr
  • elxr
  • 51.8% (Neutral)
  • YAF Forumling Topic Starter
12 years ago
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:
<Resources xmlns:xml="http://www.w3.org/XML/1998/namespace" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" language="Serbian" code="sr">
"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.
Sponsor

elxr
  • elxr
  • 51.8% (Neutral)
  • YAF Forumling Topic Starter
12 years ago
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.
tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 3.0.3
12 years ago
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"



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"
bbobb
  • bbobb
  • 100% (Exalted)
  • YAF Developer
12 years ago
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.
elxr
  • elxr
  • 51.8% (Neutral)
  • YAF Forumling Topic Starter
12 years ago
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
tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 3.0.3
12 years ago
Originally Posted by: elxr 

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



Yes if it works correctly its included in the next release.
bbobb
  • bbobb
  • 100% (Exalted)
  • YAF Developer
12 years ago
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
YAF Logo Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved
About Us

The YAF.NET is an open source .NET forum project. YAF.NET is supported by an team of international developers who are build community by building community software.

Powered by Resharper Donate with PayPal button