umi3 国际化只提供了useIntl 和injectIntl别的情况下怎么办? #7124
Unanswered
liangshuiying
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
现在在utils中定义了一些公共方法:如
export const getTitle = ( route: any, path: string) => {
if (route && route[path] && route[path].locale) {
return
${formatMessage({ id: route[path].locale }) } - $formatMessage({ id: 'zhilan' })}
;} if(route && route[path] && route[path].name) {
return
${route[path].name } - ${formatMessage({ id: 'zhilan' })}
;}
return formatMessage({ id: 'zhilan' });
};
想要这个方法正常运行应该怎么办
Beta Was this translation helpful? Give feedback.
All reactions