adding new language support with Angular2
See original GitHub issueOverview of the issue
I added support for a new lasnguage - kannada by doing the following steps ~
1Duplicate the src/main/webapp/i18/en folder to src/main/webapp/i18/new_lang (this is where all the front-end translations are stored) 2Translate all files under the folder src/main/webapp/i18/new_lang 3Add the language code new_lang to the LANGUAGES constant defined in src/main/webapp/app/components/language/language.constants.js 4 In the src/main/resources/i18n folder, copy the messages_en.properties file to messages_new_lang.properties (this is where the server-side translations are stored) 5 Translate all keys in the messages_new_lang.properties file 6. Add the new language’s name in the function of filter(‘findLanguageFromKey’) in the src/main/webapp/app/components/language/language.filter.js file But on cleaning and running the app - it is showing a blank screen ; server console is showing no errors;
Motivation for or Use Case
Adding a new language is an important thing = i was trying to add kannada - i found other languages from India - bangalore is the IT capital of India and Kannada is spoken here - but kannada does not find mention in the Jhipster list -
Reproduce the error
Related issues
How do i add kannada to the Jhipster list ?
Suggest a Fix
Add kannada also in the Jhipster list when choosing the language ~ or tell me i shall do it myself .
JHipster Version(s)
jhip 4.0
JHipster configuration
Entity configuration(s) entityName.json
files generated in the .jhipster
directory
{
"fieldId": 4,
"fieldName": "costOfCycle",
"fieldType": "Float",
"fieldValidateRules": [
"required"
]
},
{
"fieldId": 5,
"fieldName": "insuranceNo",
"fieldType": "String",
"fieldValidateRules": [
"required"
]
},
{
"fieldId": 6,
"fieldName": "moveStatus",
"fieldType": "Integer",
"fieldValidateRules": [
"required"
]
},
{
"fieldId": 7,
"fieldName": "insuranceStatus",
"fieldType": "Integer",
"fieldValidateRules": [
"required"
]
}
],
"changelogDate": "20170223163335",
"dto": "no",
"service": "serviceImpl",
"entityTableName": "bicycle",
"pagination": "pagination"
}
Employee.json
```yaml
{
"fluentMethods": true,
"relationships": [],
"fields": [
{
"fieldName": "name",
"fieldType": "String",
"fieldValidateRules": [
"required",
"minlength",
"maxlength"
],
"fieldValidateRulesMinlength": "3",
"fieldValidateRulesMaxlength": "10"
},
{
"fieldName": "age",
"fieldType": "Integer",
"fieldValidateRules": [
"required"
]
}
],
"changelogDate": "20170222114635",
"dto": "no",
"service": "serviceImpl",
"entityTableName": "employee",
"pagination": "pagination"
}
MemberMobile.json
{
"fluentMethods": true,
"relationships": [],
"fields": [
{
"fieldId": 1,
"fieldName": "firstName",
"fieldType": "String",
"fieldValidateRules": [
"required"
]
},
{
"fieldId": 2,
"fieldName": "lastName",
"fieldType": "String",
"fieldValidateRules": [
]
},
{
"fieldId": 3,
"fieldName": "dateOfBirth",
"fieldType": "LocalDate",
"fieldValidateRules": [
"required"
]
},
{
"fieldId": 4,
"fieldName": "emailId",
"fieldType": "String",
"fieldValidateRules": [
]
},
{
"fieldId": 5,
"fieldName": "mobileNo",
"fieldType": "String",
"fieldValidateRules": [
]
},
{
"fieldId": 6,
"fieldName": "address1",
"fieldType": "String",
"fieldValidateRules": [
]
},
{
"fieldId": 7,
"fieldName": "address2",
"fieldType": "String",
"fieldValidateRules": [
]
},
{
"fieldId": 8,
"fieldName": "city",
"fieldType": "String",
"fieldValidateRules": [
]
},
{
"fieldId": 9,
"fieldName": "state",
"fieldType": "String",
"fieldValidateRules": [
]
},
{
"fieldId": 10,
"fieldName": "zipcode",
"fieldType": "String",
"fieldValidateRules": [
"required"
]
},
{
"fieldId": 11,
"fieldName": "country",
"fieldType": "String",
"fieldValidateRules": [
]
},
{
"fieldId": 12,
"fieldName": "photo",
"fieldType": "byte[]",
"fieldTypeBlobContent": "image",
"fieldValidateRules": [
]
},
{
"fieldId": 12,
"fieldName": "photoIDProof",
"fieldType": "byte[]",
"fieldTypeBlobContent": "image",
"fieldValidateRules": [
]
},
{
"fieldId": 13,
"fieldName": "myCurrentRentUnits",
"fieldType": "Integer",
"fieldTypeBlobContent": "image",
"fieldValidateRules": [
]
},
{
"fieldId": 14,
"fieldName": "myChargedRentUnits",
"fieldType": "Integer",
"fieldTypeBlobContent": "image",
"fieldValidateRules": [
]
},
{
"fieldId": 15,
"fieldName": "behaviorStatus",
"fieldType": "Integer",
"fieldTypeBlobContent": "image",
"fieldValidateRules": [
]
},
{
"fieldId": 16,
"fieldName": "myCurrentFineCharges",
"fieldType": "Integer",
"fieldTypeBlobContent": "image",
"fieldValidateRules": [
]
} ,
{
"fieldId": 17,
"fieldName": "dateOfExpiration",
"fieldType": "LocalDate",
"fieldValidateRules": [
]
},
{
"fieldId": 18,
"fieldName": "userName",
"fieldType": "String",
"fieldValidateRules": [
]
},
{
"fieldId": 19,
"fieldName": "passWord",
"fieldType": "String",
"fieldValidateRules": [
]
} ,
{
"fieldId": 20,
"fieldName": "activated",
"fieldType": "Boolean",
"fieldValidateRules": [
]
}
],
"changelogDate": "20170223164859",
"dto": "no",
"service": "serviceImpl",
"entityTableName": "member_mobile",
"pagination": "infinite-scroll"
}
Browsers and Operating System
java version “1.8.0_102” Java™ SE Runtime Environment (build 1.8.0_102-b14) Java HotSpot™ 64-Bit Server VM (build 25.102-b14, mixed mode)
git version 2.11.1.windows.1
node: v6.9.5
npm: 3.10.10
yeoman: 1.8.5
yarn: 0.20.3
C:\jho>kk.txt
C:\jho>
Browsers and Operating System
CHROME AND FIREFOX
- [ X ] Checking this box is mandatory (this is just to show you read everything)
Issue Analytics
- State:
- Created 7 years ago
- Comments:8 (6 by maintainers)
I generated a new app:
./mvnw
yarn start
http://localhost:8080
-> OKyo jhipster:languages
http://localhost:8080
-> OK, the new language is hereSo, the sub generator languages works (that’s what I wanted to check)
Then it seems you wanted to add locally a new language. Did you launch
yarn start
or at leastyarn run webpack:build
after creating all your new files ?Oh ok, thanks @deepu105 I didn’t look in details your PR