|
|||
| Moderated by: Renate.Reinartz, Markus.Kreisel, Jaakko.Salmenius, Ilkka.Salmenius |
|
||||||||||||||||
| Database localisation - Usage - Three simple steps to localize - Technical Support (You need to be registered at the forum to write) - .NET, Delphi, ... - Sisulizer Localization Tool Support | |||||||||||||||||
| Author | Post | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|||||||||||||||||
|
avdam Member
|
Hello, I am evaluating the different methods of database localisation. I would like to do database cloning because I think that's so easy. But I have SQL server, so... Are there plans to support SQL server cloning? I tried field localisation because no trouble in generated id's and primary keys etc. I used sisulizer succefully to translate a name column into a new name_nl column. But how do I get those names in the WPF UI without code modification? I use the entity frame work to acces the data.
|
||||||||||||||||
| |||||||||||||||||
| |||||||||||||||||
|
Markus.Kreisel Administrator
|
Hi, Even with cloning you would need to change a little bit code to point your application to the different source to read from. Perhaps you could use Table Localization method. That's available with SQL-Servers and is similar to cloning. Cloning a SQL-Server would basically mean that you get a second server. That's not possible. But I guess Table Localization will do the trick. Anyway you have to add code to point to the other database table name. Hope this helps Markus
____________________ http://www.sisulizer.com - Three simple steps to localize |
||||||||||||||||
| |||||||||||||||||
|
|||||||||||||||||
|
avdam Member
|
Ok thanks for fast reply. I think field localisation falls into the same category as table localisation: In both cases I have to write code to get the data from the correct column/table. About cloning: I didn't mean cloning SQL server itself but of course the database which I use. In the sisulizer documentation I read that the requirement for cloning is: 1 local database file. I have 1 database file for use by sql server. The difficulty for sisulizer is, as I understood, the attaching and detaching problems. Anyway is there a plan to overcome the difficulty. See also the post of JohanW on 26 sept 2007 on this forum. Although Jaakko didn't promise it, he said "so we might implement this soon" Now we are 3 years later so...
|
||||||||||||||||
| |||||||||||||||||
| |||||||||||||||||
|
Jaakko.Nieminen Administrator
|
I studied this cloning for SQL server a bit. To clone a server based database is much harder than a local file based database such as Access. Wehn you clone a database the sturcutre of the database must be identical to the original. Also the row count must be the same. This is easly reached with simple file copy when working with Access. However there is no such feature in SQL server. You need to manually copy every single table, row and other database elements. This is why we haven't implemented database cloning for other databases but Access. One more thing about database cloning. It is an easy solution when your application need only read. As soon as the application starts to modify the data it has to do the same modifications into the localized (current) database and to the original database. Field localization is easier to modify because the row you are accessing is the same as the original row. Row and Table localization have the same problem as database localization. You have to apply the same change into the original row/table as well. Is it OK for you that you create and initialize the localized database. This means that you must first create the localized database, then make sure that the localized databases have identicaly structure to the original database and finally populate the localized databases such way that they contain the same (not necarrary identical value because some field are localized) rows. If this is OK for you I can quckly implement database cloning for server based databases. Jaakko
|
||||||||||||||||
| |||||||||||||||||
|
|||||||||||||||||
|
Jaakko.Nieminen Administrator
|
Take a look at this screenshot. It contains database in my SQL Server. There is an original database called Country and a Finnish database called CountryFi. The localized databases must append a locale part into the original name. The format is <original name>[-|_]<locale>. So if the original name is Country the Dutch database should be one of the following:
As I told in my previous email Sisulizer can not create of populate localized databases. You have to create them and populate them before starting Sisulizer's build process. Also Sisulizer does not let you choose database localization unless there is at least one localized database in the same database server as the original database. Jaakko Attachment: Untitled.png (Downloaded 17 times)
|
||||||||||||||||
| |||||||||||||||||
| |||||||||||||||||
|
avdam Member
|
I already tried field localisation but that requires unwanted code modification. I just studied since yesterday the problem of database localisation. I have more questions. What about upgrading the customers database to a new version with more texts and other structure? Maybe it's better to generate resource files from the database texts, because then you have connection with the sisulizer standard way of localization. After retrieving the text from the database you can get via the resourceManager.GetString(key); call the localized text?
|
||||||||||||||||
| |||||||||||||||||
|
|||||||||||||||||
|
Jaakko.Nieminen Administrator
|
avdam wrote: I already tried field localisation but that requires unwanted code modification. This is true. All database localization methods requires code modifiation. Using resource files as your suggested works very well. It also requires you to modify your existing code. What is your programming tool? Jaakko
|
||||||||||||||||
| |||||||||||||||||
| |||||||||||||||||
|
avdam Member
|
I just succeeded manually add some resource string which also are in the database. I used the c# code below to translate the text: ResourceManager rm = new ResourceManager( ".Resource1", typeof(Resource1).Assembly); String str = rm.GetString(name); if (!string.IsNullOrEmpty(str)) { return str; } This method also requires code modification, but no database modification. It also solves database upgrade issues. I will investigate whether it's possible to easy generate the resource strings from database fields. Arjan
|
||||||||||||||||
| |||||||||||||||||
|
|||||||||||||||||
|
avdam Member
|
I just succeeded manually add some resource string which also are in the database. I used the c# code below to translate the text: ResourceManager rm = new ResourceManager( ".Resource1", typeof(Resource1).Assembly); String str = rm.GetString(name); if (!string.IsNullOrEmpty(str)) { return str; } This method also requires code modification, but no database modification. It also solves database upgrade issues. I will investigate whether it's possible to easy generate the resource strings from database fields. Arjan
|
||||||||||||||||
| |||||||||||||||||
| |||||||||||||||||
|
Jaakko.Nieminen Administrator
|
Resx file format is very simple XML based format. You can easily read string from DB and write .resx file. Jaakko
|
||||||||||||||||
| |||||||||||||||||
| Current time is 08:04 am | |
| .NET, Delphi, ... - Sisulizer Localization Tool Support > Technical Support (You need to be registered at the forum to write) > Usage - Three simple steps to localize > Database localisation | |
Sisulizer software localization tool - Three simple steps to localize