Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesBuilding Multi-lingual Custom ModulesBuilding Multi-lingual Custom Modules
Previous
 
Next
New Post
10/19/2016 1:38 PM
 

Any good resources, guides, approaches or tips to building custom modules with multi-lingual data? I don't mean localizing static text, but dynamic content. For instance, say I have a table called tblProducts with this data:

ProductID
ModuleID
ProductFamilyID (fk)
ProductTitle
ProductDescription
IsVisible
DateCreated
LastUpdated

I would want to store localized versions of the title and description. I could have up to 10 languages, so I want to design this smartly. My initial thought is to break out the title & description fields into a separate translation table with the ID and the local as keys.

tblProductTranslation

ProductID
Locale
ProductTitle
ProductDescription

When querying, I would always pass in the locale, join the tables etc etc.

Is this the general approach that most others use? It makes sense in my head, but if there are other examples or some DNN API stuff I should take advantage of, please comment. 

Thanks!

 

 
New Post
10/19/2016 2:02 PM
 
Not directly DNN related - you could buy Guy Smith-Ferrier's book on .Net Internationalization. https://www.amazon.co.uk/s/ref=nb_sb_...

Full disclosure - GS-F is a friend of mine...and I still think it 's a good book!

Best wishes,
- Richard
Agile Development Consultant, Practitioner, and Trainer
www.dynamisys.co.uk
 
New Post
10/19/2016 7:27 PM
 
Erik,
there are generally multiple approaches, depending on the concrete situation. If you are having to localize a table like yours, you may
a) either separate the localizable properties into a dependent table using parent key + locale and use an inner join and filter by locale.
benefit: there is a guarantee that there might be a single translation only, but there is no guarantee, it exists
b) if there is a significant preference for one language and this is always populated, you may keep the columns in master table and use child table for additional languages only
Benefit: there is always at least one language available, but there might be a value for same language in base and translation table. You would need to use (slower) left JOIN.
c) if there is not always same initial language you may store initial language in base table as well. Benefit nearly same as b), a little bit more flexible but difficult to retrieve.
d) same base table as b) or c) and a central translation table with key (keyObject, keyID, keyproperty, language) key. you just need a single central table, but it is difficult to implement integrity, as it is not supported by SQL.

Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
10/20/2016 10:27 AM
 

Thanks for the input. Option A makes the most sense to me. 

Any other insights from the DNN community?

 
Previous
 
Next
HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesBuilding Multi-lingual Custom ModulesBuilding Multi-lingual Custom Modules


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out