AbanteCart Development > Languages and Zones
Why language files are xml?
Msun:
I would like to know why AbanteCart uses xml files for language translations, what are the advantages? I'm comparing to OpenCart that use simple php files (list of vars with the translated strings).
From the point of view of a translator, that is bad, there are more text susceptible to type errors, so I would like to know the advantages of xml files.
In time, the "Extenstions and Add-Ons" section is misspelled, right: "Extensions and Add-Ons"
abantecart:
Hello Msun,
We have covered the reason for this in the document below (look for Languages and translations):
http://www.abantecart.com/document_wiki/index.php/AbanteCart_Architecture_Overview
AbanteCart uses XML language files only for initial load and save to the database. This is needed for extension when you install them.
We want to give Shopping Cart owners ability to search and edit text in the cart as they need.
These XML files can be translated with google API V2 to get them into different language as for AbanteCart and for extensions.
Hope this helps.
Msun:
Thank you for your reply, I read the wiki and now I understand :)
gob33:
A major disavantage is the complexity introduced by storing in DB instead of flat files.
When developping extensions, each time you change a language text, you need to uninstall/install your extension for the change to take place in DB, AND then clear the cache otherwise you spend hours asking why the page dont change, like me.
abantecart:
Reason for these due to abatecart ability to edit translations after language is loaded initially. Language XML files act as installation files only. We could have kept them as SQLs but that would be even more harder to manage.
I can see a pain with this, that is why we started on dev tools extension to wrap process and make it easier.
Extension dev tool should help with this. We are continuously working on it.
Feel free to help with improving and adding easier process with resetting translations.
Navigation
[0] Message Index
[#] Next page
Go to full version