Page 1 of 1

How to set output the name of currency according to the installed language?

Posted: Wed Oct 29, 2008 2:44 pm
by dad
Can anybody help me?

I would like to set output of the currency name according to the installed language.

Thanks for further help.

Re: How to set output of the currency title according to the installed language?

Posted: Wed Oct 29, 2008 7:50 pm
by Qphoria
Hmm.. well there was never a language code associated with that, and really it should be in the language files.

I will look into it.

I guess one way would be to remove the actual wording like "US Dollar" and just change the title to the code "USD"

But then that still wouldn't make sense for a Cyrillic language that doesn't have those letters.

Good question :)

Re: How to set output of the currency title according to the installed language?

Posted: Wed Oct 29, 2008 11:22 pm
by dad
Perhaps the right way is to add a database table "currency_description" and change all files
which are connected with output of the currency title. The same way as for image title,
category, products, etc.

Maybe there is somebody who knows well MySQL queries structure for these files.

Re: How to set output the name of currency according to the installed language?

Posted: Thu Nov 06, 2008 2:04 pm
by dad
Can anybody help?

Re: How to set output the name of currency according to the installed language?

Posted: Fri Nov 07, 2008 12:52 am
by Qphoria
well if you want to try the currency_description thing then look at how information_description is done and clone that behavior

Re: How to set output the name of currency according to the installed language?

Posted: Sat Dec 06, 2008 6:43 am
by Qphoria
I've done this on my dev server to how it works. It works as expected, but there is a larger "weakness" in the way that we use language_id's in database queries. Like if there is no setting for the current language in most things like products, categories, etc, then we simply don't show them. In reality we need to show all products and only show the proper language for the items that have the language, and show the default language for the ones that don't have a value for the current language.

I have a quickn''dirty way to get that to work as well but I'm working on a better way. Its not for 0.7.9 but will be one of hte first things I hope to add to v0.8

So back to the topic, the fix for currency selector based on language won't be added until we get proper language fallback working, otherwise we are just adding more fuel to the fire to clean up later.