internationalization

internationalization backend or frontend

穿精又带淫゛_ 提交于 2020-05-29 07:55:09
问题 I'm creating a website with front-end angularJs and back-end Java API server. I've already done error message internationalization in API server, but I'm wondering if I should do the translation of api result in server-side? e.g. if a french user requests an apple object, should I return him translated apple object, or just let front-end translate the apple object for him? 回答1: Do it at the backend for the error messages by sending the locale in the rest call, for front end in the templates

Translations for constants files in react

和自甴很熟 提交于 2020-05-27 07:18:28
问题 I am trying to find best concept of translations for my react app. I have a higher order component for translations and use it by: export default translate('MyComponent')(MyComponent); And inside a component I have all texts available by props - it works fine for me. But, I have a lot of pure javascript files with constants and also need a tranlations there. There is for example validation schema's with error messages or constats with select elements like: export default [ { value: 'aaa',

Which Locale should I specify when I call String#toLowerCase?

岁酱吖の 提交于 2020-05-25 09:30:05
问题 In Java the String#toLowerCase method uses the default system Locale to determine how to handle lowercasing. If I am lowercasing some ASCII text and want to be sure that this is processed as expected which Locale should I use? EDIT: I'm mainly concerned about programming identifiers such as table and column names in a schema. As such I want English lower casing to apply. Locale.ROOT states that it is the language/country neutral locale for the locale sensitive operations Locale.ENGLISH would

Making a variable length list translatable

巧了我就是萌 提交于 2020-05-18 02:30:25
问题 I want to display a list of values from an array, and have it be translatable. My translation method of choice is gettext. An example of what I am trying to do is to turn a variable-length array like: $array = ('apple', 'plum', 'watermelon', [...]); into a string like apple, plum and watermelon . Doing it only in English would not be a problem, but making it translatable is, because other languages may not necessarily use a comma to separate values and/or may not have the word "and" without a

Making a variable length list translatable

旧城冷巷雨未停 提交于 2020-05-18 02:29:18
问题 I want to display a list of values from an array, and have it be translatable. My translation method of choice is gettext. An example of what I am trying to do is to turn a variable-length array like: $array = ('apple', 'plum', 'watermelon', [...]); into a string like apple, plum and watermelon . Doing it only in English would not be a problem, but making it translatable is, because other languages may not necessarily use a comma to separate values and/or may not have the word "and" without a

Angular 9: i18n in TypeScript

回眸只為那壹抹淺笑 提交于 2020-05-13 05:35:06
问题 I studied the new i18n feature in Angular 9. https://angular.io/guide/i18n How to translate text in TypeScript, e.g. SnackBar messages? 回答1: Check this blog https://blog.ninja-squad.com/2019/12/10/angular-localize/ @Component({ template: '{{ title }}' }) export class HomeComponent { title = $localize`You have 10 users`; } And You have to manually add it to your messages.fr.xlf <trans-unit id="6480943972743237078"> <source>You have 10 users</source> <target>Vous avez 10 utilisateurs</target> <

Angular 9: i18n in TypeScript

寵の児 提交于 2020-05-13 05:34:48
问题 I studied the new i18n feature in Angular 9. https://angular.io/guide/i18n How to translate text in TypeScript, e.g. SnackBar messages? 回答1: Check this blog https://blog.ninja-squad.com/2019/12/10/angular-localize/ @Component({ template: '{{ title }}' }) export class HomeComponent { title = $localize`You have 10 users`; } And You have to manually add it to your messages.fr.xlf <trans-unit id="6480943972743237078"> <source>You have 10 users</source> <target>Vous avez 10 utilisateurs</target> <

How to integrate QT internationalization to CMake?

淺唱寂寞╮ 提交于 2020-04-08 00:16:14
问题 Greetings all, I am trying to use QT internationalization with CMake. I have configured my cmake file as follows : #Internalization - this should generate core_jp.ts ? SET(rinzo_core_TRANSLATIONS i18n/core_jp.ts ) #these are my source files in the project SET(FILES_TO_TRANSLATE ${rinzo_core_srcs} ${rinzo_core_moh_srcs} ) QT4_CREATE_TRANSLATION(QM_FILES ${FILES_TO_TRANSLATE} ${rinzo_core_TRANSLATIONS}) QT4_ADD_TRANSLATION(QM ${rinzo_core_TRANSLATIONS}) But it doesnt genereate any TS nor QM

How to integrate QT internationalization to CMake?

巧了我就是萌 提交于 2020-04-08 00:15:27
问题 Greetings all, I am trying to use QT internationalization with CMake. I have configured my cmake file as follows : #Internalization - this should generate core_jp.ts ? SET(rinzo_core_TRANSLATIONS i18n/core_jp.ts ) #these are my source files in the project SET(FILES_TO_TRANSLATE ${rinzo_core_srcs} ${rinzo_core_moh_srcs} ) QT4_CREATE_TRANSLATION(QM_FILES ${FILES_TO_TRANSLATE} ${rinzo_core_TRANSLATIONS}) QT4_ADD_TRANSLATION(QM ${rinzo_core_TRANSLATIONS}) But it doesnt genereate any TS nor QM

How to integrate QT internationalization to CMake?

六眼飞鱼酱① 提交于 2020-04-08 00:12:37
问题 Greetings all, I am trying to use QT internationalization with CMake. I have configured my cmake file as follows : #Internalization - this should generate core_jp.ts ? SET(rinzo_core_TRANSLATIONS i18n/core_jp.ts ) #these are my source files in the project SET(FILES_TO_TRANSLATE ${rinzo_core_srcs} ${rinzo_core_moh_srcs} ) QT4_CREATE_TRANSLATION(QM_FILES ${FILES_TO_TRANSLATE} ${rinzo_core_TRANSLATIONS}) QT4_ADD_TRANSLATION(QM ${rinzo_core_TRANSLATIONS}) But it doesnt genereate any TS nor QM