A
Andrus
I'm creating WinForms 5-language client-server application which allows to
add/change translations at runtime.
I have table in server which contais translations, 9000 records :
MainLanguage CHAR(254) primary key,
Language1 CHAR(254),
Language2 CHAR(254),
Language3 CHAR(254),
Language4 CHAR(254)
Translators change this table at runtime. I have created a trigger which
stores last change of this table to
allow replication.
I need to create single method
enum DestLanguage { Lang1, Lang2, Lang3, Lang4 };
static string Translate( string mainLanguageText, DestLanguage
destinationLanguage ) { ... }
which returns translated text in desired language.
My application may work over slow internet connection. Single application
invocation usually uses 5% of records from tihs table.
So it seems not reasonable to make round strip to server for every label and
caption in application which needs to translated.
So I need to cache this table in C: drive.
Any idea how to implement caching ?
Installing and distributing SQLite or SQL server compact edition with my
application seems to be overkill for this small task.
I'm looking for a lightweight data structure which allows to store and
search data.
I can serialize and deserialize it as dictionary object in isolated storage.
However in this case I must load whole dictionary (9000 items, approx 6 MB )
in application startup.
I'm afraid that this cause some delay at application startup and consumes to
much memory.
Is using serialization/deserialization for this amout of data reasonable
solution ?
Any idea how to implement this ?
Andrus.
add/change translations at runtime.
I have table in server which contais translations, 9000 records :
MainLanguage CHAR(254) primary key,
Language1 CHAR(254),
Language2 CHAR(254),
Language3 CHAR(254),
Language4 CHAR(254)
Translators change this table at runtime. I have created a trigger which
stores last change of this table to
allow replication.
I need to create single method
enum DestLanguage { Lang1, Lang2, Lang3, Lang4 };
static string Translate( string mainLanguageText, DestLanguage
destinationLanguage ) { ... }
which returns translated text in desired language.
My application may work over slow internet connection. Single application
invocation usually uses 5% of records from tihs table.
So it seems not reasonable to make round strip to server for every label and
caption in application which needs to translated.
So I need to cache this table in C: drive.
Any idea how to implement caching ?
Installing and distributing SQLite or SQL server compact edition with my
application seems to be overkill for this small task.
I'm looking for a lightweight data structure which allows to store and
search data.
I can serialize and deserialize it as dictionary object in isolated storage.
However in this case I must load whole dictionary (9000 items, approx 6 MB )
in application startup.
I'm afraid that this cause some delay at application startup and consumes to
much memory.
Is using serialization/deserialization for this amout of data reasonable
solution ?
Any idea how to implement this ?
Andrus.