-
Notifications
You must be signed in to change notification settings - Fork 1
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
Documentation #15
base: master
Are you sure you want to change the base?
Documentation #15
Conversation
readme.md
Outdated
Call `flask_methods` with `app` and the function. | ||
After that, you can use the function `_` or `trans` in your template for translation. | ||
|
||
A minimal example : |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no space before ":" in English
readme.md
Outdated
@@ -24,3 +24,28 @@ from tcii18n import Translator | |||
translator = Translator('my_file.csv') | |||
translator.translate('My string') | |||
``` | |||
|
|||
For using this project into a Flask application. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of this block here, I'd rather read the code sample first and then explaining the code under the sample:
(code samples that you wrote)
…
Where:
get_translations_file()
is a function that returns the appropriate translation file path,flask_methods(app, get_translation_file)
initializes the template processor withapp
as your Flask instance andget_translation_file
is the reference to the callable method.
|
||
Where: | ||
|
||
-get_translations_file() is a function that returns the appropriate translation file path |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-get_translations_file() > add a space after "-" and use backticks ` for showing it as code.
Where: | ||
|
||
-get_translations_file() is a function that returns the appropriate translation file path | ||
-flask_methods(app, get_translation_file) initializes the template processor |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
|
||
-get_translations_file() is a function that returns the appropriate translation file path | ||
-flask_methods(app, get_translation_file) initializes the template processor | ||
with app as your Flask instance and get_translation_file is the reference |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here for get_translation_file
2f4228c
to
f397a4f
Compare
No description provided.