用于tranlationexchange.com的python sdk
tml的Python项目详细描述
<;img src="https://avatars0.githubusercontent.com/u/1316274?v=3&s=200">;
<;/p>;
python的tml
===
[![构建状态](https://travis-ci.org/translationexchange/tml-python.png?branch=master)(https://travis ci.org/translationexchange/tml python)
[![覆盖状态](https://coveralls.io/repos/translationexchange/tml-python/badge.png?branch=master)(https://coveralls.io/r/translationexchange/tml-python?分支=主)
[![依赖状态](https://www.versioneye.com/user/projects/54c1457a6c0035208100416/badge.svg?style=flat)(https://www.versioneye.com/user/projects/54c1457a6c0035208100416)
python的tml库是一组为任何基于python的应用程序提供翻译功能的类。
该库使用翻译标记语言,允许您对复杂语言st结构简单但功能强大。
y应用程序密钥和密钥。
>如果计划在django应用程序中使用tml,则应使用tml python django包。
=======
要安装包,请使用pip:
``ssh
`pip install tml
`````
=>注册您的应用程序
==========br/>
申请。
在注册过程结束时,您将获得一个密钥和一个秘密。您需要在tml sdk的初始化函数中输入它们。
用法
=====
可以从irb调用库。要使用tml客户端,您必须要求它,并使用translationexchange.com上应用程序的密钥和机密实例化应用程序:
``python
>;>import tml
>;..
````
``python
>>>gt;…
````
>简单示例:
```python
>;…
`````
>
>
````python
``````python
`````python
>
>>
>>
>>简单示例:
>>;…
```
>性别规则:
``python
>>;…
>;…
```
``python
``python
……
`````
装饰代币:
``python
`` python
```
>嵌套装饰代币:
` ` ` ` `>
``python
…
```
带有修饰标记的数据标记:
``python
…
````
``python
…
`````
>的形式或以更简单的形式:
``python
…
````
使用tml的优点之一是能够轻松地切换标记值。在基于文本的电子邮件中,上面的示例可以重用翻译:
`` python
…
`````
>您还应该注意,您在实验中使用的所有翻译密钥都将由translationexchange.com服务在应用程序下注册。您可以在以下位置查看它们:
在机器翻译建议的帮助下)。
``python
…
````
>然后在不离开irb会话的情况下,可以调用以下方法重置应用程序缓存:
``python
…
`````
缺少翻译,您应该取回翻译后的值。
`` python
…
````
链接
=====
*在translationexchange.com上注册:http://translationexchange.com
*阅读translationexchange的文档:http://docs.translationexchange.com
*关注Twitter上的translationexchange:https://twitter.com/translationx
*连接Facebook上的translationexchange:https://www.facebook.com/translationexchange
*如果您有任何问题或建议,请联系我们:feedback@translationexchange.com
版权和许可证UT限制,包括但不限于使用、复制、修改、合并、发布、分发、再授权和/或销售软件副本的权利,以及允许向其提供软件的人员这样做的权利,但须满足以下条件:
ht通知和本许可通知应包含在软件的所有副本或实质性部分中。
软件按"原样"提供,无任何形式的保证,
明示或暗示,包括但不限于对
适销性、适用于某一特定对象的保证。目的性和非侵犯性。在任何情况下,作者或版权持有人均不应对任何索赔、损害或其他责任负责,无论是在合同、侵权或其他诉讼中,由软件或软件的使用或其他交易引起的、由软件引起的或与之相关的。