Answers.Body: <p>My solution for this was to</p>
  
  <ol>
  <li>Setup Field with Alphanumeric and Select Properties, assigning it to any existing option set.</li>
  <li>Directly in the Database: Find Table: "civicrm_option_group" In that table find the option group you are trying to use (e.e: Languages). Take note of that row's "id".</li>
  <li>Directly in the Database: Find Table: "civicrm_custom_field" In that field find the field you created in Step 1.</li>
  <li>In the row of that field, edit the column: "option_group_id" to the id number you notated in Step 2.</li>
  </ol>
  
  <p>This worked for me when trying to use the Languages list.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-01-29T20:30:36.547Z
Answers.Text: In some ways I like this solution better than my own.  I might update my extension to use this method.  The advantage is that you can uninstall the extension and it will continue to work.  There's a theoretical performance boost too, but it's a minimal difference.
Answers.UserDisplayName: Jon G - Megaphone Tech
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-03-02T02:02:07.610Z
Answers.LastActivityDate: 2016-03-02T02:02:07.610Z
Answers.UserDisplayName: Jonathan Miller
Answers.Body: <p>In CiviCRM, custom fields have the ability to re-use options from another custom field, but not from a core field like <em>Preferred Language</em>. So this is not currently possible via the UI.</p>
  
  <p>2 Solutions come to mind, both using small amounts of custom code:</p>
  
  <ol>
  <li><p>Write a short script that uses the api to fetch all languages and then copy them into the options of one of your custom fields. Then re-use those same options in 3rd, 4th language fields.</p></li>
  <li><p>Write a tiny extension that implements <a href="http://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_customFieldOptions" rel="nofollow">hook_civicrm_customFieldOptions</a> and populates those options dynamically by outputting the languages in the system.</p></li>
  </ol>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-02-18T14:03:10.900Z
Answers.Text: I put following in my extension:
Answers.UserDisplayName: ñull
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-02-18T14:13:18.307Z
Answers.Text: https://gist.github.com/com2/cda5bb57d2adf8cc3bbd
  which worked just fine.
Answers.UserDisplayName: ñull
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-09-24T20:39:11.040Z
Answers.LastActivityDate: 2015-09-24T20:39:11.040Z
Answers.UserDisplayName: Coleman
Answers.Body: <p>I had this need today, and wrote a general version of the extension @ñull wrote above.  This lets anyone take advantage of this feature without knowing how to code: <a href="https://lab.civicrm.org/extensions/languagecustomfield" rel="nofollow noreferrer">https://lab.civicrm.org/extensions/languagecustomfield</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-12-11T21:19:20.900Z
Answers.LastActivityDate: 2019-12-11T21:19:20.900Z
Answers.UserDisplayName: Jon G - Megaphone Tech
Body: <p>There is the <strong><em>Preferred language</em></strong> field in <strong><em>Communication Preferences</em></strong> which allows to choose the contact's preferred language. </p>
  
  <p>However when I try to create custom fields for a contact's second, third language, I don't find <strong><em>Language</em></strong> as a choice among the other <strong><em>Data and Input Field Types</em></strong> What would be the recommended way to make the language select like in <strong><em>Preferred language</em></strong> available for re-use in custom fields?</p>
  
  <p>With all the languages in a select field defined and available somewhere, what I try to avoid here is that I need to re-enter all these languages by hand for my custom fields. </p>
  
Tags: <custom-fields>
Title: How to reuse Preferred language select?
ThreadText: # How to reuse Preferred language select?
  
  (Asked by: username_0 on 2015-09-22)
  
  There is the ***Preferred language*** field in ***Communication Preferences*** which allows to choose the contact's preferred language.
  
  However when I try to create custom fields for a contact's second, third language, I don't find ***Language*** as a choice among the other ***Data and Input Field Types*** What would be the recommended way to make the language select like in ***Preferred language*** available for re-use in custom fields?
  
  With all the languages in a select field defined and available somewhere, what I try to avoid here is that I need to re-enter all these languages by hand for my custom fields.
  
  **Tags:** custom-fields
  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_2 on 2019-12-11. Score: 4 | Accepted answer
  
  I had this need today, and wrote a general version of the extension @username_0 wrote above. This lets anyone take advantage of this feature without knowing how to code: <https://lab.civicrm.org/extensions/languagecustomfield>
  
  
  ---
  
  ### Answer by username_1 on 2016-03-02. Score: 3
  
  My solution for this was to
  
  1. Setup Field with Alphanumeric and Select Properties, assigning it to any existing option set.
  2. Directly in the Database: Find Table: "civicrm\_option\_group" In that table find the option group you are trying to use (e.e: Languages). Take note of that row's "id".
  3. Directly in the Database: Find Table: "civicrm\_custom\_field" In that field find the field you created in Step 1.
  4. In the row of that field, edit the column: "option\_group\_id" to the id number you notated in Step 2.
  
  This worked for me when trying to use the Languages list.
  
  > **Comments:**
  > **username_2**: In some ways I like this solution better than my own.  I might update my extension to use this method.  The advantage is that you can uninstall the extension and it will continue to work.  There's a theoretical performance boost too, but it's a minimal difference.  
  
  ---
  
  ### Answer by username_3 on 2015-09-24. Score: 3
  
  In CiviCRM, custom fields have the ability to re-use options from another custom field, but not from a core field like *Preferred Language*. So this is not currently possible via the UI.
  
  2 Solutions come to mind, both using small amounts of custom code:
  
  1. Write a short script that uses the api to fetch all languages and then copy them into the options of one of your custom fields. Then re-use those same options in 3rd, 4th language fields.
  2. Write a tiny extension that implements [hook\_civicrm\_customFieldOptions](http://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_customFieldOptions) and populates those options dynamically by outputting the languages in the system.
  
  > **Comments:**
  > **username_0**: I put following in my extension:  
  > **username_0**: https://gist.github.com/com2/cda5bb57d2adf8cc3bbd which worked just fine.  
  
  ---
  
  