Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Use of default set of FAQs, news, categories etc. #1593
Not sure if this is a bug or feature request since I get the feeling there is an intention of this but that it doesn’t function this way.
The use case is simple. We have users in two countries (say Germany and France). For the most part they need the same information. We don’t want to (or have the time to) translate all FAQs news etc so we decide we’ll start with an English FAQ that both countries can use, and then later on translate to each language as we find the time. Yet some FAQs are specific to Germany and others are specific to France and we’d need to publish them as well. This would be solved if there was an ability to have a “default” language that was always used as the base for finding FAQs news etc and only if there was a specific language version for your current language would that get picked instead.
Example 1: We have two FAQs (ID 1 and 2) in the default language. We have translated ID 1 to German. If you were to look at the site using “German” you would see the ID1 German version and the ID 2 Default version. A user with say Russian language code would se both FAQs in the Default version.
Example 2: Say we have the need to specifically make a German version that is not at all relevant to any other country (say how to handle German tax law) we make a new FAQ with ID 3 and only makes it in a German version. Now the German user would se ID 1 in German, ID 2 in “default” and ID 3 in German. The Russian user would still se only ID 1 and 2 in “Default” language.
This also means we can focus on getting FAQs up in one unified language, but the user can still use phpMyFAQ in whatever language they choose (ie the user interface language can be whatever they like but still get access to the FAQs from the default language.
I would argue this would make a multi-language situation much more flexible and powerful.
Since this basically has to do with what FAQs/news etc are fetched from the database, that part would probably be rather simple tom implement as it is basically just the SQL that needs to be adjusted. I’d be more than happy to contribute with that. However, it demands that there are no dependencies in the code where data that data that depends on the entity (FAQ, Category, news etc) are used based on the UI language. If there are such dependencies, I would argue it would be a good idea to rewrite those parts to getting the language info from the entity instead anyway. As that, IMHO would make more architectural sense.