diff --git a/jinja-kr/docs/api.rst b/jinja-kr/docs/api.rst index 2cde1368e9a4a34343304fabb72b32d748da9742..2bb8a8dc3484caa8028a074843fa33b40711903d 100644 --- a/jinja-kr/docs/api.rst +++ b/jinja-kr/docs/api.rst @@ -6,27 +6,20 @@ API :synopsis: public Jinja API 이 문서는 템플릿 언어가 아닌 Jinja의 API를 설명합니다.(탬플릿 언어는 다음을 참조 : :doc:`/templates`) -. It will be most useful as reference -to those implementing the template interface to the application and not -those who are creating Jinja templates. +Jinja 탬플릿을 만드는 사람들 보다는 어플리케이션의 인터페이스를 구성하는 분들이 유용하게 참조할 수 있습니다. Basics ------ -Jinja uses a central object called the template :class:`Environment`. -Instances of this class are used to store the configuration and global objects, -and are used to load templates from the file system or other locations. -Even if you are creating templates from strings by using the constructor of -:class:`Template` class, an environment is created automatically for you, -albeit a shared one. +Jinja는 핵심 개체로 탬플릿 :class:`Environment`를 사용합니다. +이 개체의 instance는 구성과 전역변수를 저장하고 파일 시스템 또는 다른 위치로부터 탬플릿을 로드합니다. +당신이 :class:`Template`의 생성자를 사용하여 탬플릿을 만들더라도, 공유되는 :class:`Environment`를 자동적으로 생성합니다. -Most applications will create one :class:`Environment` object on application -initialization and use that to load templates. In some cases however, it's -useful to have multiple environments side by side, if different configurations -are in use. +대부분의 어플리케이션은 초기 실행될때 하나의 :class:`Environment` 객체를 생성하고 탬플릿들을 호출합니다. +다만 다른 구성들이 사용되는 경우에는 경우에 따라 복수의 환경을 사용하는 것이 유리합니다. + +어플리케이션의 탬플릿을 불러오기 위해 Jinja를 구성하는 가장 간단한 방법은 :class:`~loaders.PackageLoader`을 사용하는 것 입니다. -The simplest way to configure Jinja to load templates for your -application is to use :class:`~loaders.PackageLoader`. .. code-block:: python