I think the best would be to let the admin sort all the languages in the database settings.
How would it work?
Then... when a user enters the faq, display the record in:
- the user default language if a translation of the record in this language exists,
- else, parse the sorted list until you find an existing translation for that record and use it
Why so?
A global default language setting would not be enough. Consider a faq written in english by the admin, then a german user ads a record in german ; this new record will not be available in the global default language (at least for a while) but should still be viewable by users.
If that german record is also translated in french, what to display?
Let's consider that the faq has the following list sorted by admin: "english, chinese, french, german, ..." So my answer is, french for french user, german for german one, and for other users, as there are no english and no chinese versions, use the french one.
Display suggestion:
For now, a record that is available in several languages is displayed several times. This makes the faq harder to navigate, especialy when many languages are available.
I suggest to display each record id only once in the language suggested above, but followed by the list of available languages in brackets with links to the translations. See the example below for a record available in french and english (same id), with english as top sorted language:
Sample with current version wrote:
- My question in english [en]
- Ma question en français [fr]
Hope this helps and is not too long...Suggested display wrote:For french users... (with en linking to "My question in english")For english and all other users... (with fr linking to "Ma question en français")
- Ma question en français [fr] [en]
- My question in english [en] [fr]
