Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multilanguage support for frontend #75

Open
ghost opened this issue Feb 25, 2016 · 5 comments
Open

Multilanguage support for frontend #75

ghost opened this issue Feb 25, 2016 · 5 comments

Comments

@ghost
Copy link

ghost commented Feb 25, 2016

Please add multilanguage support for your frontend. I was able to modify and compile ascii-art-table-.go to translate Morning/Noon/Evening/Night but I don't how to translatate dateFmt function.

@schachmat
Copy link
Owner

There is no possibility from the standard packages, the english weekday and month names are hardcoded. An external library would be needed. Would you mind sharing your changes if they are not just hardcoded replacements to the one language of your choice?

@ghost
Copy link
Author

ghost commented Feb 27, 2016

Yes I understand, I was trying to figure it out by myself. To make it consistent you would need to check a value of wwo-lang variable in .wegorc. Create a list of supported langugages, then validate the string against supported languages and if true it would return a reference to a dictionary with a proper translation, 7 days + 12 month is not that much :) Unless there is a way to interact with OS...

In the attachment times of the day in polish.

ascii-art-table.go.zip

@schachmat
Copy link
Owner

Hm, I don't think adding it to one frontend is a good idea, since it will not scale. However I can imagine a third kind of plugin just for common translations of the weather conditions, and time strings. The different frontends could use the desired languages translation plugin then to localize the output.

@dolmen
Copy link

dolmen commented Mar 30, 2016

The CLDR has day of week names.
The i18n-dateformatter project may be helpful to use them (but I've not really dug into it).

@schachmat
Copy link
Owner

The project you mentioned does not seem fitting, since it requires the user to generate the code for his locale after installing which further complicates the installation process for new users. Also it does not support translations for the different times of day yet, which we would also want to use for the table headers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants