You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tailchat/client/web/plugins/com.msgbyte.miaolang/src/miaotrans.ts

19 lines
440 B
TypeScript

import Miao from 'miao-lang';
import { Translate } from './translate';
import { getLanguage } from '@capital/common';
export function encode(human: string): string {
return Miao.encode(human, {
calls: Translate.calls,
halfwidthSymbol: getLanguage() !== 'zh-CN',
});
}
export function decode(miao: string): string {
return Miao.decode(miao);
}
export function isMiao(input: string): boolean {
return Miao.isMiao(input);
}