-
Notifications
You must be signed in to change notification settings - Fork 91
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
MMD localization #37
Comments
The missing german translation for |
Thanks. You don't start sentences in English with lower case letters, either, but we're probably more relaxed about whether something is a sentence or not. :) I changed the German translations to start with uppercase letters for you though... |
Thanks! I saw that Although it seems to be fairly easy to add translations for additional languages this is only possible for users with software development skills. One solution which would add a lot of flexibility to MMD is the use of metadata in the document to provide translations for these strings. It could look like this:
If one (or all) of the keys above is missing the default value form Together with the
In the example above MMD would use the |
German is fixed. Thanks! I added the French as well. It actually doesn't take much in the way of software development skills to copy and paste a few lines in the code, but either way I'm happy to update when people send translations to me. As per the other discussion, I think a complex metadata system is the wrong way to go. In this case, it would require a different system that would have a more negative impact on performance as well. |
For the most part, the language used in MultiMarkdown documents don't matter. Whatever language you write in is the same text used in the output document.
An exception to this, however, is that there are a few phrases used in the HTML source, such as:
MMD-6 includes the
i18n.h
file to allow automatic translation of these phrases to other languages, without a performance hit.The default language is English. Support is built in for German (missing 1 translation). Template strings are in place for Spanish.
Additional languages can be added easily.
kNumberOfLanguages
needs to be incremented.lc_lookup()
needs to be modified -- a new language should be added to that function following the template for English/Spanish/German. The order is CRUCIALLY IMPORTANT.lc_languages()
needs to be updated. The language added must be at the end of the list (in other words, the order must match that oflc_lookup()
. The two letter code should be the official one for the new language.i18n_language_from_string()
needs to be updated for the new language as well, using the lower case two letter code. Again, follow the template for German and Spanish.Adding a new string is a bit more complicated, and should not generally need to be done. The
TranslateTest()
function is useful when doing so, however.If you want to add/improve the translation functionality, please submit a pull request with the proposed changes. (Please use the
develop
branch for pull requests so I can properly merge and test.)Thanks!!
The text was updated successfully, but these errors were encountered: